3.3 KiB
3.3 KiB
id, title, status, wave, depends_on, plan, spec
| id | title | status | wave | depends_on | plan | spec |
|---|---|---|---|---|---|---|
| 01-reset-source-executor | Reset executor on source transition | done | 1 | plan.md | ../../specs/tasks/requirements/task-create-executor-default.md |
Task 01: Reset Executor on Source Transition
Intent
Invalidate the executor selected for repository-less mode when the user returns to Repo so the existing destination-source policy can choose the correct profile.
Acceptance
- Entering repository-less mode clears the previous executor and continues to resolve direct Local.
- Leaving repository-less mode also clears Local so Repo resolves the valid workspace default or Worktree fallback.
- Source flags, selected repositories and branches, remote rows, and last-used persistence behavior remain unchanged.
TDD sequence
- Add a focused
useDialogHandlersregression for leaving repository-less mode with a populated Local executor. - Run the regression. Verify that it fails because the executor setters are not called.
- Add or retain the paired entering-mode assertion.
- Move the executor invalidation to the shared part of
handleToggleNoRepositoryand run the focused handler and executor-policy suites to GREEN. - Run the web typecheck.
Files likely touched
apps/web/components/task-create-dialog-handlers.tsapps/web/components/task-create-dialog-handlers.test.ts
Dependencies
None.
Parallelism
sequential. This task owns the shared state transition required by Task 02.
Inputs
- Spec scenario for Repo to repository-less mode to Repo.
- Plan sections
Confirmed root causeandSource transition reset. - Existing
useDefaultSelectionsEffectpolicy and ADRdocs/decisions/2026-08-01-repository-task-executor-defaults.md.
Verification
cd apps && pnpm install --frozen-lockfile && pnpm --filter @kandev/web test -- components/task-create-dialog-handlers.test.ts components/task-create-dialog-effects-executor.test.ts && cd web && pnpm run typecheck
Risks
- Do not select Worktree directly in the handler. Explicit workspace defaults and fallback policy belong to the existing effects.
- Assert both executor ID and profile invalidation because either populated field can suppress or conflict with recomputation.
Output contract
Report the RED failure, changed files, exact results, blockers, and risks. Then update this task and
plan.md in the same conversation.
Results
RED:
cd apps/web && pnpm test -- --run components/task-create-dialog-handlers.test.ts -t "clears the executor when leaving repository-less mode"- Failed with the expected assertion because the executor setters received no empty value.
GREEN and task checks:
cd apps/web && pnpm test -- --run components/task-create-dialog-handlers.test.ts -t "clears the executor when leaving repository-less mode"— 1 passed.cd apps && pnpm install --frozen-lockfile— dependencies were ready.cd apps && pnpm --filter @kandev/web test -- components/task-create-dialog-handlers.test.ts components/task-create-dialog-effects-executor.test.ts— 37 passed across 2 files.cd apps/web && pnpm run typecheck— passed.
Changed files:
apps/web/components/task-create-dialog-handlers.tsapps/web/components/task-create-dialog-handlers.test.ts
Cleanup and side effects: no temporary files or external services were created.