pour application android simpl-liste
- TypeScript 78.5%
- JavaScript 19.3%
- Python 2%
- Dockerfile 0.1%
- CSS 0.1%
Completing a recurring task on the site only set completedAt: the next occurrence was created by the app alone. PUT /api/tasks/[id] now creates it, through a function the MCP tools will call too. - lib/recurrence.ts: RECURRENCES, isRecurrence and nextOccurrence, computed in UTC without date-fns (a day, seven days, a month or a year later at the same UTC time, ends of months as date-fns). - lib/taskWrites.ts: completeTask and reopenTask. They take the transaction of their caller first, then userId; they open no transaction, send no notification and do not import the database client. completeTask moves the task from open to done with one UPDATE ... WHERE completed = false ... RETURNING, and creates the next occurrence only when that statement returns the row. - PUT /api/tasks/[id]: one transaction for the whole body; `completed` goes through completeTask or reopenTask, the other fields are written first. Two wanted changes: `completed: true` on a task already done no longer rewrites completedAt, and a body that carries `completed` answers 404 for a deleted task. The notification leaves once, after the commit. - POST /api/sync is untouched: the app creates and pushes the next occurrence of its own completions; a test locks it. - Tests: recurrence table (replayed under four time zones), parity with the app's getNextOccurrence under TZ=UTC in the folder of the sync harness, route tests of the completion, of its refusals and of the module contract. Resolves #201 Co-Authored-By: Claude Fable 5.2 <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-mcp-agents.md | ||
| spec-decisions-sync-suites.md | ||
| spec-plan-mcp-agents.md | ||
| spec-plan-sync-delai-comptes-etiquettes.md | ||
| spec-plan-sync-suites.md | ||
| spec-plan-sync-ws-tests-sonde.md | ||
| spec-simpl-liste-web.md | ||
| sql-transformer.js | ||
| STATE.md | ||
| tailwind.config.js | ||
| tsconfig.json | ||