pour application android simpl-liste
- TypeScript 78.5%
- JavaScript 19.3%
- Python 2%
- Dockerfile 0.1%
- CSS 0.1%
The companion never told an open page that its data changed:
broadcastToUser() had no caller, and the client set existed twice
because server.ts is bundled apart from the Next routes, so the routes
(and /api/health) saw an empty set.
- Keep the client set on globalThis.__wsClients, like the ticket store.
- WsMessage sync variant is now { type: 'sync' } with no detail.
- notifyUserChanged(userId) coalesces per account with a 1 s trailing
debounce; a send that throws drops the socket instead of crashing.
- POST /api/sync notifies once per batch when at least one operation
is applied; every REST mutation handler of lists, tasks and tags
notifies after success.
- useSync refreshes only on a sync message, debounced 500 ms;
auth_expired no longer triggers a refresh.
Tests: ws.test.ts (payload, coalescing, shared set across module
instances, source guard on mutation handlers) and sync route tests
(one notification per applied batch, none for refused or duplicate
batches, never another account).
Refs #177
Refs #167
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
||
|---|---|---|
| .claude | ||
| .vscode | ||
| app | ||
| assets | ||
| patches | ||
| scripts | ||
| src | ||
| tests | ||
| web | ||
| .gitignore | ||
| app.json | ||
| babel.config.js | ||
| CLAUDE.md | ||
| DECISIONS.md | ||
| drizzle.config.ts | ||
| eas.json | ||
| index.js | ||
| masterplan.md | ||
| metro.config.js | ||
| nativewind-env.d.ts | ||
| package-lock.json | ||
| package.json | ||
| REVIEW.md | ||
| SECURITY.md | ||
| spec-decisions-sync-suites.md | ||
| spec-plan-sync-delai-comptes-etiquettes.md | ||
| spec-plan-sync-suites.md | ||
| spec-simpl-liste-web.md | ||
| sql-transformer.js | ||
| STATE.md | ||
| tailwind.config.js | ||
| tsconfig.json | ||