5ee5161166
Co-authored-by: Kandev Agent <agent@kandev.dev>
3.9 KiB
3.9 KiB
id, title, status, wave, depends_on, plan, requirements, acceptance_criteria, system_design
| id | title | status | wave | depends_on | plan | requirements | acceptance_criteria | system_design | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 01-shared-confirmation-shell | Shared confirmation shell | done | 1 | plan.md |
|
|
|
Task 01: Shared Confirmation Shell
Summary
Implement one presentation-only confirmation shell for named saved task views. It adapts the existing anchored and inline primitives, centralizes copy and boundary handling, and invokes a captured target ID only after confirmation.
In scope
- Add
SavedTaskViewDeleteConfirmationand its target/prop contract. - Support fine-pointer popover and touch-density inline presentations.
- Reuse the existing confirmation-boundary marker and provide a shared target predicate for nested parent surfaces.
- Add localized title, consequence/reassurance, Cancel, Delete, and accessible names in all supported catalogs.
- Test cancellation, Escape, focus, stale anchors, pending confirmation, and exactly-once target dispatch.
Out of scope
- Wiring any saved-view surface or calling a store/provider mutation.
- Changing
ActionConfirmPopoverorInlineConfirmActionsbehavior beyond the small boundary adapter required by this contract. - Adding persistence, retry, or error state.
Acceptance
- Opening either presentation performs no mutation; Cancel, Escape, dismissal, and a disconnected anchor preserve the target and restore focus when possible.
- The visible and accessible confirmation names the supplied label, uses a destructive final action, and dispatches the captured ID once after close.
- Fine-pointer content exposes a nested-overlay boundary; inline content uses 44px touch actions and contains long localized text.
Verification
cd apps
pnpm install --frozen-lockfile
pnpm --filter @kandev/web test -- \
components/confirmation/saved-task-view-delete-confirmation.test.tsx \
components/confirmation/action-confirm-popover.test.tsx
cd web
pnpm run i18n:zh-hant
pnpm run i18n:pseudo
pnpm run i18n:check
pnpm run typecheck
Files likely touched
apps/web/components/confirmation/saved-task-view-delete-confirmation.tsxapps/web/components/confirmation/saved-task-view-delete-confirmation.test.tsxapps/web/components/confirmation/action-confirm-popover.tsxapps/web/components/confirmation/action-confirm-popover.test.tsxapps/web/src/locales/en/common.jsonapps/web/src/locales/pt-pt/common.jsonapps/web/src/locales/zh-cn/common.jsonapps/web/src/locales/zh-hk/common.jsonapps/web/src/locales/zh-tw/common.jsonapps/web/src/locales/pseudo/common.json
Dependencies
None.
Risks
- A generic boundary predicate must not treat unrelated portal content as part of the confirmation.
ActionConfirmPopoverandInlineConfirmActionsclose at different DOM locations; the adapter must preserve both primitives' existing focus rules.
Parallelism
sequential
Inputs
- Requirement acceptance criteria
.2,.3,.4,.6,.7,.8, and.10. - System-design sections Shared confirmation shell, Data and contracts, Control flow, and Responsive and accessibility behavior.
- Existing
WatcherDeleteAction,SavedLayoutDeleteConfirmation,ActionConfirmPopover, andInlineConfirmActionspatterns.
Results
- Installed the frozen pnpm workspace dependencies for this worktree.
- Added the shared fine-pointer/inline shell, captured-ID dispatch, and nested confirmation-boundary predicate.
- Added synchronized
commoncopy in all real locales and the pseudo locale;i18n:checkpassed. - Focused confirmation suites passed 15/15 and web typecheck passed.