5.4 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 | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 02-departure-presentation | Integrate departure presentation | done | 2 |
|
plan.md |
|
|
|
Task 02: Integrate departure presentation
Summary
Connect accepted UI removal actions to the coordinator and prevent outgoing task content or effects from remaining active. Preserve the current desktop and phone navigation shells while the destination becomes ready.
In scope
- A subscribed removal boundary above live task-detail and preview effects.
- Gate
useEnsureTaskSessionat enablement and dispatch; prevent initial-route task props or delayed session hydration from restoring the outgoing task. - Integrate desktop sidebar, phone switcher, board CRUD, sidebar bulk actions, archive-confirmation/command/banner callers, and task-action message deletion.
- Close selected previews with their URL parameters; restore conditionally on failure.
- Localized status, one notification per operation/batch, focus transfer, and menu dismissal; avoid duplicate dirty-conflict toasts.
- A call-site inventory recording intentional Quick Chat/session-only exclusions.
Out of scope
Backend lifecycle changes, new mobile composition, session-only deletion, Quick Chat close/expiration, and browser suite implementation.
Acceptance
- After acceptance, no outgoing task-dependent content mounts or ensure request dispatches during early WS events or delayed HTTP; confirmation cancellation leaves both content and requests unchanged.
- Every ordinary task removal entry point uses shared intent before mutation; unselected removal preserves current view/focus and bulk results retain retries.
- Desktop/phone loading, focus, preview closure, and failure recovery satisfy the same contract with localized copy and usable navigation.
Verification
Run from the repository root after 01 has installed dependencies.
(cd apps/web && rtk pnpm exec vitest run components/task/task-page-content.test.tsx components/kanban-with-preview.test.ts components/task-preview-panel.test.tsx hooks/domains/session/use-ensure-task-session.test.ts hooks/use-task-actions.test.ts hooks/use-task-crud.test.ts hooks/use-sidebar-multi-select.test.ts hooks/use-task-archive-confirm.test.ts components/task/task-archive-confirm-dialog.test.tsx)
(cd apps/web && rtk pnpm run typecheck)
(cd apps/web && rtk pnpm run i18n:check)
(cd apps/web && rtk pnpm run i18n:ratchet)
rtk git diff --check
hooks/use-task-crud.test.ts is a planned new suite. Add behavioral RED tests
before integrating each surface. Run the relevant command again after its last
change. If additional test suites are changed, add their exact paths here.
Files likely touched
apps/web/components/task/task-page-content.tsxandtask-page-inner.tsxapps/web/components/task/task-removal-boundary.tsx(proposed new component)apps/web/components/kanban-with-preview.tsx,task-preview-panel.tsx, and testsapps/web/hooks/domains/session/use-ensure-task-session.tsand testsapps/web/components/task/task-session-sidebar.tsxapps/web/components/task/mobile/session-task-switcher-sheet-hooks.tsapps/web/hooks/use-task-crud.ts,use-sidebar-multi-select.ts, and testsapps/web/hooks/use-task-archive-confirm.tsand archive confirmation testsapps/web/components/task/chat/messages/action-message-actions.tsxapps/web/hooks/use-task-actions.tsapps/web/src/locales/{en,pt-pt,zh-cn,zh-hk,zh-tw}/{common,tasks}.jsonapps/web/AGENTS.mdonly if the resulting shared lifecycle guidance changes
Dependencies
01 supplies operation state, ownership tokens, and coordinator.
Risks
Returning early after task data hooks leaves side effects alive. Hiding a
Dockview tree with CSS leaves its panels mounted. Dialog focus restoration may
target the removed task; override it only for the accepted departure.
Read components/task/chat/AGENTS.md before editing action-message code.
Parallelism
sequential
Inputs
- Removal design: Presentation boundary and Entry points and mobile composition.
- Mobile exemplar:
components/task/mobile/session-task-switcher-sheet.tsx. - Existing task-page, preview, ensure-session, archive-confirmation, and bulk tests.
docs/i18n.md; generate Traditional Chinese usingpnpm run i18n:zh-hant.
Results
Done on 2026-09-10.
- Added the shared detail/preview departure boundary, ensure-session gate, desktop and phone coordinator entry points, bulk integration, action-message deletion, localized status and success notifications, and guarded preview closure.
- Presentation verification command: 9 files, 94 tests passed.
- Web lint, i18n check, and i18n ratchet passed.
- The direct archive/delete audit keeps
/taskslist mutations transport-only; Quick Chat and session-only deletion remain intentional exclusions. - Repository typecheck still reports only the pre-existing duplicate declarations
in
lib/types/http.tsandlib/ws/handlers/workflows.ts.