Commit Graph

251 Commits

Author SHA1 Message Date
zetaloop 88eb9727b5 refactor(shop): aggregate services from embedded player profiles 2026-05-03 06:02:05 +08:00
zetaloop 7acde68d45 refactor(disputes): align type with backend and derive timeline in page 2026-05-03 06:02:05 +08:00
zetaloop be329865b3 refactor: drop unused local search catalog 2026-05-03 06:02:05 +08:00
zetaloop 0e7270aa8d refactor: align client state and ui with backend contract 2026-05-03 06:02:05 +08:00
zetaloop a3f0b49112 feat(chat): implement WebSocket chat client with useChatSocket hook
Replace the stubbed chat API with a real WebSocket hook that
connects to /ws/chat and supports DM creation, messaging,
session join/leave, and history retrieval. Keep REST stub
functions for backward compatibility with existing pages
that require listChatSessions/getChatSessionById imports.
2026-05-01 17:33:29 +08:00
zetaloop 1f20198f23 fix(api): remove unused listOrdersByConsumer helper
The function performed client-side filtering on top of listOrders
but was never called by any page. listPlayersByShop is kept as-is
since the backend has no dedicated shop players endpoint.
2026-05-01 17:33:29 +08:00
zetaloop b6002f5691 refactor: remove hardcoded display values and unused lib/id.ts
Delete hardcoded marketing stats in auth layout and ¥12,800
placeholder in owner dashboard. Remove lib/id.ts which is no
longer referenced by any module.
2026-05-01 17:33:05 +08:00
zetaloop cd469d3d54 refactor(notifications): fetch from backend API instead of local generation
Rewrite store/notifications.ts to fetch via listNotifications
API and remove local generateId-based notification creation.
The store now acts as a simple cache with fetch/invalidate methods.
Header unread count reads from this API-backed cache.
2026-05-01 17:33:05 +08:00
zetaloop d76866ac3b fix(auth): persist login state to localStorage
Save user data, role, and verification status on login so that
page refresh does not lose the session. On mount, AuthBootstrap
always verifies against the backend via getCurrentUserForLogin
to confirm the cookie JWT is still valid.

Remove unused verification store methods (submitVerification,
approveVerification, rejectVerification) — the verify page
already calls lib/api/users.ts directly.
2026-05-01 17:32:06 +08:00
zetaloop 86d1b05271 refactor: remove unused dispute store and orphaned domain stores
Delete store/disputes.ts and 8 other stores that are no longer
referenced by any page, component, or other store after the order
and wallet rewrites. All pages now use lib/api directly.

Also delete lib/domain/income.ts, order-machine.ts, and
resolve-current-shop.ts which were only used by these stores.
2026-05-01 17:32:06 +08:00
zetaloop 8f70c89fb0 refactor(wallet): remove local balance logic and orphaned domain modules
Delete store/wallet.ts which is no longer referenced anywhere.
Remove lib/domain/income.ts, order-machine.ts, resolve-current-shop.ts
and their test files — all depended on removed local state machines.
Wallet page already uses lib/api/transactions.ts for backend API calls.
2026-05-01 17:32:06 +08:00
zetaloop cf0fea9926 refactor(orders): replace local state machine with minimal cache
Strip store/orders.ts to a thin local cache with setOrders and
updateOrder only. Remove all client-side state transition logic,
actor validation, chat sync, notification generation, and wallet
integration — these are now handled by the backend API.

Fix components/order-actions.tsx and stores that depended on
the removed order store methods (markDisputed, autoTimeout*).
2026-05-01 17:32:06 +08:00
zetaloop 452004b194 refactor: remove demo timers and client-side timeout simulation
Remove lib/config/demo-timers.ts and all usages across stores
and pages. Order timeout scheduling, dispute auto-progression,
and hardcoded countdown displays are removed — timeouts are
now handled server-side by the backend.
2026-05-01 17:32:06 +08:00
zetaloop 0a1a4c877b chore: bump dependencies 2026-05-01 03:25:42 +08:00
zetaloop 58dc001146 feat(ui): unify content shell layout 2026-04-26 01:53:15 +08:00
zetaloop 30c336345e fix(api): normalize empty list responses 2026-04-26 01:53:05 +08:00
zetaloop 904148bd55 feat(ui): refine search input focus states 2026-04-25 21:51:24 +08:00
zetaloop ac382960dd feat(ui): refine dashboard configuration pages 2026-04-25 21:48:57 +08:00
zetaloop 14f6f5509a feat(ui): refine dashboard management pages 2026-04-25 21:45:32 +08:00
zetaloop 1ee512940e feat(ui): refine post interaction surfaces 2026-04-25 21:41:01 +08:00
zetaloop 29db9e5c0c feat(ui): refine static content pages 2026-04-25 21:36:29 +08:00
zetaloop e9a1bb4dac feat(ui): refine order management pages 2026-04-25 21:32:04 +08:00
zetaloop 8b71e7e70e feat(ui): refine order detail pages 2026-04-25 21:23:55 +08:00
zetaloop 8e02c8ca97 feat(ui): refine order chat pages 2026-04-25 21:15:43 +08:00
zetaloop b0cecd58b0 feat(ui): refine account pages 2026-04-25 20:24:18 +08:00
zetaloop 151fabe8c2 feat(ui): refine public detail pages 2026-04-25 20:12:23 +08:00
zetaloop 93b880f932 feat(ui): refine public discovery pages 2026-04-25 20:12:23 +08:00
zetaloop 0999f1905e feat(ui): add linear design foundation 2026-04-25 19:56:24 +08:00
zetaloop 42d7c50dc0 fix(orders): load shop dispatch rules 2026-04-25 15:05:03 +08:00
zetaloop b50464c854 fix(shop): use backend shop in navigation 2026-04-25 15:04:56 +08:00
zetaloop 9cff134cf2 fix(services): resolve owner shop from backend 2026-04-25 15:04:48 +08:00
zetaloop 9c7e207dfe fix(post): persist creation through backend 2026-04-25 14:55:39 +08:00
zetaloop be7f957ca4 feat(api): add post creation client 2026-04-25 14:55:30 +08:00
zetaloop 65db255e20 fix(shop): render backend template defaults 2026-04-25 14:49:57 +08:00
zetaloop c3843b3671 fix(shop): load orders and income from backend 2026-04-25 14:49:50 +08:00
zetaloop 33f8f82e07 fix(shop): manage staff through backend 2026-04-25 14:49:44 +08:00
zetaloop fc0b754056 fix(shop): persist settings through backend 2026-04-25 14:49:36 +08:00
zetaloop 358bfc7ac9 feat(api): add shop management clients 2026-04-25 14:49:25 +08:00
zetaloop e559204347 feat(services): manage services through backend 2026-04-25 14:31:04 +08:00
zetaloop 074ad8f35b test(api): set server origin for API tests 2026-04-25 14:24:27 +08:00
zetaloop 874ee5cb9a fix(wallet): persist balance actions through backend 2026-04-25 14:22:45 +08:00
zetaloop e4a57b54ca feat(wallet): add balance mutation clients 2026-04-25 14:22:37 +08:00
zetaloop 2661cfcd8a fix(account): submit verification through backend 2026-04-25 14:17:51 +08:00
zetaloop e3572bf86b fix(account): persist profile actions through backend 2026-04-25 14:13:55 +08:00
zetaloop d7cc6b0141 feat(api): add account mutation clients 2026-04-25 14:13:45 +08:00
zetaloop 70230483f8 fix(api): skip unavailable backend routes 2026-04-25 14:04:53 +08:00
zetaloop 54cd6d29fe chore: bunp dependencies 2026-04-25 03:08:29 +08:00
zetaloop 8813f7493f fix(search): move router updates out of state updaters 2026-04-24 09:19:38 +08:00
zetaloop adfded0e40 fix(api): resolve server-side api urls from request context 2026-04-24 09:19:28 +08:00
zetaloop 774c62ec1c fix(lint): avoid effect self-references in async loaders 2026-04-24 09:06:55 +08:00