Files
kandev/docs/plans/create-local-repository/task-02-task-create-selector.md
T
2026-09-12 16:29:16 +01:00

3.1 KiB

id, title, status, wave, depends_on, plan, spec
id title status wave depends_on plan spec
02-task-create-selector Task-create local repository selector done 2
01-backend-initialization
plan.md ../../specs/workspaces/requirements/create-local-repository.md

Task 02: Task-Create Local Repository Selector

The availability follow-up replaces the single-row restriction recorded below and preserves multi-row executors.

Acceptance

  • A task-create repository picker exposes Create new repository, and success selects the returned repository with main only in the originating row, moves the first task to a compatible direct local executor, explains that change, and preserves the rest of the task draft.
  • Multi-repository tasks do not expose the action because they require worktree execution.
  • The shared directory browser drives name/parent validation, target preview, retryable errors, and idempotent active-workspace cache insertion without changing the None mode picker.
  • Desktop Dialog and mobile Drawer satisfy the spec's focus, scroll, safe-area, touch-target, and no-hover mobile contract; Quick Chat does not gain the action, and no compatible direct local profile blocks creation before the API call.

Verification

make fmt
make typecheck
(cd apps && pnpm --filter @kandev/web test -- --run \
  components/create-local-repository-surface.test.tsx \
  components/task-create-dialog-pill.test.tsx \
  components/task-create-dialog-repo-chips.test.tsx \
  components/task-create-dialog-handlers.test.ts)
(cd apps/web && pnpm run lint)

Files Likely Touched

  • apps/web/lib/api/domains/workspace-api.ts
  • apps/web/components/folder-picker.tsx
  • apps/web/components/create-local-repository-surface.tsx
  • apps/web/components/create-local-repository-surface.test.tsx
  • apps/web/components/task-create-dialog-pill.tsx
  • apps/web/components/task-create-dialog-pill.test.tsx
  • apps/web/components/task-create-dialog-workspace-repo-chips.tsx
  • apps/web/components/task-create-dialog-repo-chips.tsx
  • apps/web/components/task-create-dialog-repo-chips.test.tsx
  • apps/web/components/task-create-dialog-handlers.ts
  • apps/web/components/task-create-dialog-handlers.test.ts
  • apps/web/components/task-create-dialog-types.ts
  • apps/web/components/task-create-dialog-prop-builders.ts
  • apps/web/components/task-create-dialog.tsx

Dependencies

Task 01's endpoint and response/error contract.

Inputs

  • Spec: What, API Surface, Mobile Design Contract, Scenarios.
  • Shared browser pattern: apps/web/components/folder-picker.tsx.
  • Mobile geometry exemplar: apps/web/components/task/mobile/mobile-picker-sheet.tsx.
  • Selector constraint: the cmdk-only note in apps/web/components/task-create-dialog-pill.tsx.
  • Repository cache: apps/web/lib/state/slices/workspace/workspace-slice.ts and apps/web/hooks/domains/workspace/use-repositories.ts.

Output Contract

Report desktop/mobile behavior, state and focus handling, tests run, files touched, blockers, and remaining visual risks. Mark this file done and update the plan entry only after targeted tests pass.