3.7 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-preserve-latest-queued-workflow | Preserve latest queued workflow | done | 1 | plan.md |
|
|
Task 01: Preserve Latest Queued Workflow
Summary
Make the frontend task-create overlay retain workflow history for unrelated workspaces while allowing the newest successful task creation to replace the entry for its own workspace. Prove the correction with a focused failing test before changing production code.
In scope
- Add a same-workspace consecutive-submission regression test.
- Correct map precedence in
queueTaskCreateLastUsedFromPayload. - Preserve queued entries for other workspaces and latest scalar defaults.
- Run focused unit, type, and existing production-dialog E2E checks.
Out of scope
- Backend or database changes.
- Workflow selector presentation or interaction changes.
- New preference fields or persistence sources.
- Changes to cancelled or failed task creation behavior.
Acceptance
- Queuing workflow one and then workflow two for the same workspace leaves
workflow two in
workflowIdsByWorkspace. - Consecutive submissions in different workspaces retain both workflow entries.
- Existing scalar last-used fields and settings-convergence behavior remain green.
Verification
Run from apps/web:
pnpm test -- --run components/task-create-dialog-handlers.test.ts hooks/use-ensure-user-settings.test.ts components/state-provider.test.tsx
pnpm run typecheck
pnpm e2e:run tests/task/create-task.spec.ts -- --grep "uses the remembered workflow instead of the board filter" --retries=0
In a fresh worktree, first run pnpm install --frozen-lockfile from apps.
Files likely touched
apps/web/components/task-create-dialog-handlers.tsapps/web/components/task-create-dialog-handlers.test.tsdocs/plans/task-create-workflow-overlay-recency/plan.mddocs/plans/task-create-workflow-overlay-recency/task-01-preserve-latest-queued-workflow.md
Dependencies
None.
Risks
- Merge order must distinguish a newer value for the same workspace from older values that still need preservation for other workspaces.
- The overlay is module-scoped and ordering-sensitive, so the test must reset it before each scenario and must not depend on timing.
Parallelism
sequential
Inputs
docs/specs/tasks/requirements/task-create-workflow-memory.mddocs/plans/task-create-workflow-memory/plan.mddocs/decisions/0028-task-create-last-used-source-of-truth.mddocs/decisions/0041-backend-owned-portable-user-settings.mddocs/decisions/2026-08-08-workspace-scoped-task-create-workflow-memory.mdapps/web/components/task-create-dialog-handlers.tsapps/web/components/task-create-dialog-handlers.test.tsapps/web/hooks/use-ensure-user-settings.ts
Results
The regression test failed before the production change. It expected workflow two but received workflow one after two submissions in the same workspace.
The production change now uses prior workflow history as the merge base. The latest successful payload replaces the entry for its workspace. Entries for other workspaces remain unchanged.
Final results:
pnpm test -- --run components/task-create-dialog-handlers.test.ts hooks/use-ensure-user-settings.test.ts components/state-provider.test.tsxpassed 3 files and 37 tests.pnpm run typecheckpassed.pnpm e2e:run tests/task/create-task.spec.ts -- --grep "uses the remembered workflow instead of the board filter" --retries=0passed 1 Chromium test.
The change uses shared state code. It does not change desktop or mobile composition, navigation, scrolling, focus, safe areas, or touch targets.