3.8 KiB
3.8 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-resolve-launch-preview-data | Resolve launch preview data | done | 1 | plan.md |
|
|
|
Task 01: Resolve Launch Preview Data
Summary
Create the shared launch-step and prompt-composition projection. Preserve prompt data when the dialog fetches steps for a different effective workflow, and keep the visible workflow's cached steps current through workflow-step events.
In scope
- Add pure action-sensitive launch destination and composed-preview helpers.
- Retain
promptin fetched task-create step data. - Derive one launch-preview model for the effective workflow.
- Add unit tests for routing precedence, stale data, and prompt substitution.
Out of scope
- Rendered controls or localized copy.
- Backend routing or prompt changes.
- Browser E2E tests.
Acceptance
- The resolver matches the backend auto-start, configured-start, and positional fallback order.
- Fetched steps can contribute only when their workflow ID matches the effective workflow. A successful empty fetch is authoritative over the snapshot.
- Workflow-step create, update, and delete events keep loaded workflow snapshots current for the visible and non-visible workflows.
- Composition replaces only the first
{{task_prompt}}and preserves all server-owned placeholders.
Verification
cd apps/web
pnpm test -- --run components/task-create-dialog-launch-preview.test.ts components/task-create-dialog-effects.test.ts components/task-create-dialog-prop-builders.test.ts
pnpm run typecheck
Files likely touched
apps/web/components/task-create-dialog-launch-preview.tsapps/web/components/task-create-dialog-launch-preview.test.tsapps/web/components/task-create-dialog-types.tsapps/web/components/task-create-dialog-effects.tsapps/web/components/task-create-dialog-effects.test.tsapps/web/components/task-create-dialog-prop-builders.tsapps/web/components/task-create-dialog-prop-builders.test.tsapps/web/lib/ws/handlers/workflows.tsapps/web/lib/ws/handlers/workflows.test.ts
Dependencies
None.
Risks
- A copied routing rule can drift from
ResolveAutoStartStep. - Stale fetched steps can display another workflow's prompt without strict workflow filtering.
Parallelism
sequential
Inputs
- Requirement IDs and the launch-step projection section in the system design.
workflow.Service.ResolveAutoStartStepandorchestrator.Service.buildWorkflowPromptWithTrustedContext.- Existing task-create workflow default and fetch tests.
Results
- Added the pure launch-step resolver and prompt-composition helper with the backend's auto-start, configured-start, and positional fallback order.
- Preserved
promptand workflow identity in fetched task-create steps, then derived one effective-workflow launch-preview model in dialog prop assembly. - Added unit coverage for routing precedence, stale workflow data, and server-owned prompt placeholders.
cd apps/web && pnpm test -- --run components/task-create-dialog-launch-preview.test.ts components/task-create-dialog-effects.test.ts components/task-create-dialog-prop-builders.test.tspassed (40 tests).cd apps/web && pnpm run typecheckpassed.- Review fixup coverage passed: plan-mode routing, authoritative empty fetch, and workflow snapshot step-event synchronization. Disabled-tooltip focus coverage passed with the task-create component tests.