2.3 KiB
2.3 KiB
id, title, status, wave, depends_on, plan, spec
| id | title | status | wave | depends_on | plan | spec |
|---|---|---|---|---|---|---|
| 01-save-coordinator | Save coordinator and navigation guard | done | 1 | plan.md | ../../specs/ui/settings-manual-save.md |
Task 01: Save Coordinator and Navigation Guard
Acceptance
- Settings descendants can register stable dirty contributors and one fixed action saves all valid dirty contributors in stable order with revision-safe partial-failure handling.
- The action is hidden when clean, accessible on desktop/mobile, uses safe-area offsets, and does not cover the final page controls.
- Dirty in-app/history navigation offers Save and leave, Discard and leave, and Continue editing; reload/external exit installs a native warning.
Verification
cd apps && pnpm --filter @kandev/web test -- --run components/settings/settings-save-provider.test.tsx components/settings/settings-layout-client.test.tsx components/routing/app-link.test.tsx lib/routing/client-router.test.ts
cd apps/web && pnpm run typecheck
Files Likely Touched
apps/web/components/settings/settings-save-provider.tsxapps/web/components/settings/settings-save-provider.test.tsxapps/web/components/settings/settings-floating-save.tsxapps/web/components/settings/settings-layout-client.tsxapps/web/components/settings/settings-layout-client.test.tsxapps/web/lib/routing/navigation-guard.tsapps/web/lib/routing/client-router.tsapps/web/lib/routing/client-router.test.tsapps/web/components/routing/app-link.tsxapps/web/components/routing/app-link.test.tsx
Dependencies
None.
Inputs
- Spec: What, State Machine, Failure Modes, navigation and mobile Scenarios.
- ADR 0042.
Output Contract
Report registry API, save ordering/error semantics, navigation behavior, rendered mobile checks, tests run, files touched, blockers, and update this task plus plan.md.
Result
- Added a keyed contributor registry with stable ordering, validation state, revision snapshots, sequential partial-failure saves, retries, and discard callbacks.
- Added the safe-area-aware fixed action and dirty-navigation dialog to the settings shell.
- Guarded Link/router/history navigation and installed native unload protection while the route is dirty.
- Targeted component/routing tests, TypeScript typecheck, and targeted ESLint pass.