pour application android simpl-liste
- TypeScript 78.5%
- JavaScript 19.3%
- Python 2%
- Dockerfile 0.1%
- CSS 0.1%
The task forms of the companion send what <input type="date"> gives, a date alone, and the task schemas only took a full date-time: POST /api/tasks answered 400 for any dated task, PUT /api/tasks/[id] for any task that already had a due date, and both forms closed as if the write had worked. - dueDate.ts (new, import-free): parseDueDate turns a date alone into that day at 12:00 UTC, keeps the instant of an ISO 8601 date-time with Z or an offset, and refuses the rest (a date-time without a time zone, a day that does not exist, a year PostgreSQL cannot store). localDay and dueDateField hold the logic of the edit form's date field. - validators.ts: dueDateSchema (40 characters at most, parseDueDate, a Date out) for createTaskSchema and updateTaskSchema. It lives there, not in dueDate.ts, so that zod stays out of the client bundle. The two routes write the Date the schema gives; a PUT without dueDate leaves the due date alone. - TaskItem.tsx: the date field is prefilled with the local day (it was the UTC day), and dueDate is only sent when the field changed, so the time of a due date set on the phone is not rewritten to noon UTC. - TaskForm.tsx, TaskItem.tsx: res.ok is read. On a refusal or a network error the form stays open with its values and shows task.saveError. - vitest.config.mts: hookTimeout of 30 s, for the PGlite boot of each route test file. test: reproduces #198 (web/src/app/api/tasks/route.test.ts, written first: 5 of its 15 tests fail on the tree before the fix, 400 instead of 201 and 200). Resolves #198 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 | ||