3.5 KiB
3.5 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-recent-profile | Resolve the recent Add Agent profile | done | 1 | plan.md |
|
|
|
Task 01: Resolve the Recent Add Agent Profile
Summary
Add a pure initial-profile resolver for the New Agent dialog. Use the recent
task_session profile before the current session. Preserve handoff, manual
choice, eligibility, and fallback behavior.
In scope
- Write the failing resolver test before production code.
- Resolve compatible profiles by handoff, recency, current session, and source order.
- Track whether the selection came from handoff, recency, fallback, or manual input.
- Send
profile_explicit: truefor the recent-use default. - Prevent later store and compatibility updates from replacing manual input.
- Keep recency recording success-only.
Out of scope
- Backend request or routing changes.
- Changes to non-
task_sessionselectors. - Dialog presentation or user-facing copy.
- Playwright coverage.
Acceptance
- A compatible recent profile becomes the selected and explicit launch profile.
- A handoff target or manual input remains authoritative.
- Empty or ineligible history keeps the existing fallback and does not block the dialog.
Verification
cd apps && pnpm --filter @kandev/web test -- --run components/task/new-session-profile-selection.test.ts components/task/new-session-dialog.test.tsx components/task/new-session-form-actions.test.ts lib/agent-profile-recent-use.test.ts
cd apps/web && pnpm run typecheck
Files likely touched
apps/web/components/task/new-session-profile-selection.tsapps/web/components/task/new-session-profile-selection.test.tsapps/web/components/task/new-session-dialog.tsxapps/web/components/task/new-session-dialog.test.tsxapps/web/components/task/new-session-form-actions.test.ts
Dependencies
None.
Risks
profile_explicit: truelets the recent default override workflow-step profile resolution.- An effect-based reconciliation can replace manual input after the dialog opens.
Parallelism
sequential
Inputs
REQ-AGENTS-PROFILE-RECENT-USE-001- Frontend ordering and failure sections in the profile recent-use design.
- Existing selection and launch logic in
new-session-dialog.tsx.
Results
- Added
new-session-profile-selection.tswith handoff, compatible recent-use, current-session, and source-order resolution plus provenance. - Wired the resolver into
NewSessionDialog; recent defaults are explicit, manual choices are protected, and invalid selections still fall back safely. - Added focused resolver and dialog regressions, including unavailable and empty recent-use state, invalid manual selections, and incompatible handoff fallback.
cd apps && pnpm --filter @kandev/web test -- --run components/task/new-session-profile-selection.test.ts components/task/new-session-dialog.test.tsx components/task/new-session-form-actions.test.ts lib/agent-profile-recent-use.test.tspassed (34 tests).cd apps/web && pnpm run typecheckpassed.