web: spawn form revamp — command/host tiles, recent-dirs picker, worktree-by-branch, generated name #27

Closed
opened 2026-06-20 14:38:57 +01:00 by naps62-yolo · 0 comments
Collaborator

Rework the web spawn form (web/src/spawn.ts) from raw text boxes into a low-friction, tile-first flow. Default spawn = pick host tile → pick command tile → pick recent dir → Spawn, name already filled.

Command presets

One-click tiles from the daemon's advertised preset list (claude / opencode / zsh / custom). custom reveals the existing free-text command input; others set command and hide it.

Host tiles

Replace the <select> with a tile row (label hostname, sub short daemon_id); most-recently-spawned-on host sorts first + pre-selected; overflow behind "More…".

Recent-dirs picker

Recent dirs for the selected host (from /recent-dirs), one-click rows showing dir + last command, re-queried on host change. Persistent "Other directory…" row drops to the existing raw input + NAP-329 autocomplete (the escape hatch). Empty history → raw input prefilled with home_dir as today. Picking a recent dir can pre-select its last command preset.

Worktree by branch alone

Toggle on → base_repo inferred via /gitroot from the chosen dir (no base-repo input); user fills only the branch. Non-repo dir → toggle disabled with an inline hint. WorktreeSpec.base_repo filled by the client from the probe (wire type unchanged).

Generated name

Name field prefilled with a generated cyberpunk handle on open; ↻ rerolls.

Progressive disclosure: presets/recents are the default surface; raw command and raw dir only appear when chosen. Depends on the config-presets and wire/HTTP issues.


Part of #21 (spawn dialog rework).

Rework the web spawn form (`web/src/spawn.ts`) from raw text boxes into a low-friction, tile-first flow. Default spawn = pick host tile → pick command tile → pick recent dir → Spawn, name already filled. ### Command presets One-click tiles from the daemon's advertised preset list (claude / opencode / zsh / custom). `custom` reveals the existing free-text command input; others set `command` and hide it. ### Host tiles Replace the `<select>` with a tile row (label `hostname`, sub short `daemon_id`); most-recently-spawned-on host sorts first + pre-selected; overflow behind "More…". ### Recent-dirs picker Recent dirs for the selected host (from `/recent-dirs`), one-click rows showing dir + last command, re-queried on host change. Persistent **"Other directory…"** row drops to the existing raw input + NAP-329 autocomplete (the escape hatch). Empty history → raw input prefilled with `home_dir` as today. Picking a recent dir can pre-select its last command preset. ### Worktree by branch alone Toggle on → `base_repo` inferred via `/gitroot` from the chosen dir (no base-repo input); user fills only the branch. Non-repo dir → toggle disabled with an inline hint. `WorktreeSpec.base_repo` filled by the client from the probe (wire type unchanged). ### Generated name **Name** field prefilled with a generated cyberpunk handle on open; ↻ rerolls. Progressive disclosure: presets/recents are the default surface; raw command and raw dir only appear when chosen. Depends on the config-presets and wire/HTTP issues. --- Part of #21 (spawn dialog rework).
naps62-yolo added a new dependency 2026-06-20 14:39:46 +01:00
naps62-yolo self-assigned this 2026-06-20 22:15:55 +01:00
This repo is archived. You cannot comment on issues.
1 Participants
Due Date
No due date set.
Reference: naps62/maestro#27