spawn form: collapse the worktree section, closed by default #93

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

The worktree fieldset is always expanded, and it is the largest block in the form. It is rarely the part being edited — most spawns take the defaults.

Collapse it behind a disclosure, closed by default, in the style the sidebar already uses. "Advanced options" is the intended label unless something more specific reads better once the section also holds the branch controls.

The collapsed header should still say whether a worktree will be created, so the default is visible without expanding. Expanding must not move the fields above it.

Same change in the TUI draft pane, using whatever collapse affordance the TUI already has.

Depends on nothing, but note that the branch-label issue edits the same fieldset markup.

The worktree fieldset is always expanded, and it is the largest block in the form. It is rarely the part being edited — most spawns take the defaults. Collapse it behind a disclosure, closed by default, in the style the sidebar already uses. "Advanced options" is the intended label unless something more specific reads better once the section also holds the branch controls. The collapsed header should still say whether a worktree will be created, so the default is visible without expanding. Expanding must not move the fields above it. Same change in the TUI draft pane, using whatever collapse affordance the TUI already has. Depends on nothing, but note that the branch-label issue edits the same fieldset markup.
naps62-yolo added this to the Spawn v2 milestone 2026-08-24 14:28:12 +01:00
naps62-yolo added the area/tuiarea/webtype/featdifficulty/easy labels 2026-08-24 14:28:12 +01:00
Author
Collaborator

Out-of-scope bug spotted while wiring this up: .wt-body (web/src/spawnForm.ts) is display: flex unconditionally in styles.css, and toggling its hidden attribute does not actually hide it — an author-origin display declaration beats the UA [hidden] { display: none } rule at equal specificity. So whenever wtBody.hidden = true (e.g. no cwd chosen yet, or the gitroot probe fails), the branch-mode/branch-input controls stay visually rendered even though the hint text says otherwise. Fixed the same bug for the new .wt-collapsible element in #93's change (added a .wt-collapsible[hidden] { display: none } override, following the existing .wt-confirm[hidden] pattern), but left .wt-body alone since it's pre-existing and out of scope. Needs the same one-line CSS fix: .wt-body[hidden] { display: none; }.

Out-of-scope bug spotted while wiring this up: `.wt-body` (web/src/spawnForm.ts) is `display: flex` unconditionally in styles.css, and toggling its `hidden` attribute does not actually hide it — an author-origin `display` declaration beats the UA `[hidden] { display: none }` rule at equal specificity. So whenever `wtBody.hidden = true` (e.g. no cwd chosen yet, or the gitroot probe fails), the branch-mode/branch-input controls stay visually rendered even though the hint text says otherwise. Fixed the same bug for the new `.wt-collapsible` element in #93's change (added a `.wt-collapsible[hidden] { display: none }` override, following the existing `.wt-confirm[hidden]` pattern), but left `.wt-body` alone since it's pre-existing and out of scope. Needs the same one-line CSS fix: `.wt-body[hidden] { display: none; }`.
This repo is archived. You cannot comment on issues.
1 Participants
Due Date
No due date set.
Reference: naps62/maestro#93