web: project list replaces the recent-directories picker in the draft form #59

Closed
opened 2026-08-23 19:28:22 +01:00 by naps62-yolo · 1 comment
Collaborator

The draft pane inherits the modal's recent-directories picker, which lists directories the operator has already spawned in. That is the wrong primary axis: the operator thinks in projects, and a project they have not spawned in yet does not appear at all.

Replace it with the project list from GET /api/projects:

  • One row per project: name, abbreviated path (the same abbreviateCwd/abbreviateFolderName treatment the sidebar uses), and the command last spawned there if any.
  • Sorted by last_activity, newest first. Rows older than 7 days are dimmed and sort after fresh ones — still reachable, visibly stale.
  • Worktrees are shown under their base repository rather than as unrelated top-level entries.
  • Typing filters the list.
  • Free-text path entry is demoted to an Other directory… escape hatch, the way it already works for the empty-history case, rather than being the main input.

Picking a project row selects its path as the working directory and, as today, pre-selects the command it was last used with.

Depends on: #54, #57

The draft pane inherits the modal's recent-directories picker, which lists directories the operator has already spawned in. That is the wrong primary axis: the operator thinks in projects, and a project they have not spawned in yet does not appear at all. Replace it with the project list from `GET /api/projects`: - One row per project: name, abbreviated path (the same `abbreviateCwd`/`abbreviateFolderName` treatment the sidebar uses), and the command last spawned there if any. - Sorted by `last_activity`, newest first. Rows older than 7 days are dimmed and sort after fresh ones — still reachable, visibly stale. - Worktrees are shown under their base repository rather than as unrelated top-level entries. - Typing filters the list. - Free-text path entry is demoted to an `Other directory…` escape hatch, the way it already works for the empty-history case, rather than being the main input. Picking a project row selects its path as the working directory and, as today, pre-selects the command it was last used with. Depends on: #54, #57
naps62-yolo added this to the Spawn v2 milestone 2026-08-23 19:28:22 +01:00
naps62-yolo added the area/webdifficulty/mediumtype/feat labels 2026-08-23 19:28:22 +01:00
naps62-yolo added a new dependency 2026-08-23 19:29:56 +01:00
naps62-yolo added a new dependency 2026-08-23 19:29:56 +01:00
Author
Collaborator

Integrated into blitz/spawn-v2.

Sort, group and 7-day-dim logic went into web/src/projectList.ts with its own tests, separate from the DOM picker — 77 web tests now, up from 60. The mock seed was extended so ?mock still exercises the form without a daemon.

Verified on the integration branch: typecheck clean, full web suite green.

Integrated into `blitz/spawn-v2`. Sort, group and 7-day-dim logic went into `web/src/projectList.ts` with its own tests, separate from the DOM picker — 77 web tests now, up from 60. The mock seed was extended so `?mock` still exercises the form without a daemon. Verified on the integration branch: typecheck clean, full web suite green.
This repo is archived. You cannot comment on issues.
1 Participants
Due Date
No due date set.
Reference: naps62/maestro#59