web: project picker as boxes with full paths, worktree choice as its own step #95

Closed
opened 2026-08-24 14:28:12 +01:00 by naps62-yolo · 1 comment
Collaborator

The working-directory picker is hard to navigate. Each entry renders as a row carrying the project name and, under it, an abbreviated path that ends in that same name:

nixos-config
~/t/nixos-config

The second line adds nothing where it repeats the name, and its abbreviation hides the part that actually distinguishes two projects with the same basename. Worktrees are mixed into the same list (project-row is-worktree, e.g. bulgarians at ~/t/n/w/bulgarians), so the list is a flat mix of two different kinds of thing.

Rework it as two steps:

  1. Projects, as boxes rather than rows. Show the full path, unabbreviated. The name stays as the primary line.
  2. Worktrees, in their own area below, populated only once a project is picked. Include + new as the default selection, so taking the default creates a worktree and picking an existing one runs there.

Selecting a worktree here is what sets the working directory, so it must agree with the worktree-toggle default: choosing an existing worktree means running in it, not creating another.

The TUI counterpart is a separate issue that follows whatever this settles.

Non-goals: no change to how projects are discovered or ranked — the scan and its recency ordering stay as they are.

The working-directory picker is hard to navigate. Each entry renders as a row carrying the project name and, under it, an abbreviated path that ends in that same name: ``` nixos-config ~/t/nixos-config ``` The second line adds nothing where it repeats the name, and its abbreviation hides the part that actually distinguishes two projects with the same basename. Worktrees are mixed into the same list (`project-row is-worktree`, e.g. `bulgarians` at `~/t/n/w/bulgarians`), so the list is a flat mix of two different kinds of thing. Rework it as two steps: 1. **Projects, as boxes rather than rows.** Show the full path, unabbreviated. The name stays as the primary line. 2. **Worktrees, in their own area below, populated only once a project is picked.** Include `+ new` as the default selection, so taking the default creates a worktree and picking an existing one runs there. Selecting a worktree here is what sets the working directory, so it must agree with the worktree-toggle default: choosing an existing worktree means running in it, not creating another. The TUI counterpart is a separate issue that follows whatever this settles. Non-goals: no change to how projects are discovered or ranked — the scan and its recency ordering stay as they are.
naps62-yolo added this to the Spawn v2 milestone 2026-08-24 14:28:12 +01:00
naps62-yolo added the area/webdifficulty/mediumtype/feat labels 2026-08-24 14:28:12 +01:00
naps62-yolo added a new dependency 2026-08-24 14:28:31 +01:00
Author
Collaborator

Out-of-scope bug found while reworking the picker, left unfixed here.

.wt-body { display: flex } outranks the UA stylesheet's [hidden], so the
worktree fieldset's branch-mode radios and Branch input stay on screen while
wtBody.hidden === true. With no directory picked you see the hint "Choose a
working directory first." directly above a live "New branch / Existing branch"
radio group.

The picker had the same defect on .raw-wrap[hidden], which this branch fixes
because the two-step flow depends on hiding actually hiding. The fieldset half
belongs to #93, which collapses that fieldset anyway — a .wt-body[hidden] { display: none } rule fixes it in one line if #93 keeps the element.

Out-of-scope bug found while reworking the picker, left unfixed here. `.wt-body { display: flex }` outranks the UA stylesheet's `[hidden]`, so the worktree fieldset's branch-mode radios and Branch input stay on screen while `wtBody.hidden === true`. With no directory picked you see the hint "Choose a working directory first." directly above a live "New branch / Existing branch" radio group. The picker had the same defect on `.raw-wrap[hidden]`, which this branch fixes because the two-step flow depends on hiding actually hiding. The fieldset half belongs to #93, which collapses that fieldset anyway — a `.wt-body[hidden] { display: none }` rule fixes it in one line if #93 keeps the element.
This repo is archived. You cannot comment on issues.
1 Participants
Due Date
No due date set.
Reference: naps62/maestro#95