spawn: shared maestro-names crate + GET /api/names #53

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

Session handles are generated in web/src/names.ts and nowhere else. The TUI has no generator at all, and the maestro-names crate that #23 called for never landed. Give the wordlists one home in Rust and let the daemon serve them, so the three clients cannot drift.

  • New crate crates/maestro-names/, holding the musical adjective and noun wordlists currently in web/src/names.ts, and a generator returning adjective-noun.
  • GET /api/names?count=N (default 1, capped) returns a batch. Route constant goes in maestro-protocol::routes, payload type alongside DaemonInfo.
  • The web form fetches a batch when a draft pane opens and rerolls locally through it, refetching when exhausted. Reroll stays instant with no round trip, which is why #23 put the list client-side in the first place — a batch preserves that without a second copy of the words.
  • Delete web/src/names.ts and its wordlists.

Non-goals: no per-project or themed wordlists; no collision checking against live session names.

Session handles are generated in `web/src/names.ts` and nowhere else. The TUI has no generator at all, and the `maestro-names` crate that #23 called for never landed. Give the wordlists one home in Rust and let the daemon serve them, so the three clients cannot drift. - New crate `crates/maestro-names/`, holding the musical adjective and noun wordlists currently in `web/src/names.ts`, and a generator returning `adjective-noun`. - `GET /api/names?count=N` (default 1, capped) returns a batch. Route constant goes in `maestro-protocol::routes`, payload type alongside `DaemonInfo`. - The web form fetches a batch when a draft pane opens and rerolls locally through it, refetching when exhausted. Reroll stays instant with no round trip, which is why #23 put the list client-side in the first place — a batch preserves that without a second copy of the words. - Delete `web/src/names.ts` and its wordlists. Non-goals: no per-project or themed wordlists; no collision checking against live session names.
naps62-yolo added this to the Spawn v2 milestone 2026-08-23 19:28:04 +01:00
naps62-yolo added the area/daemonarea/protocoldifficulty/easytype/feat labels 2026-08-23 19:28:04 +01:00
Author
Collaborator

Integrated into blitz/spawn-v2.

crates/maestro-names holds the wordlists, GET /api/names?count=N serves batches, the form rerolls locally through a fetched batch so reroll stays instant, and web/src/names.ts is deleted — no second copy survives.

Merged by hand against #55: both issues added a route constant and a router line in the same two spots. Additive on both sides, resolved keeping both.

Verified on the integration branch: just test green through the gate, web typecheck clean, 82 web tests.

Integrated into `blitz/spawn-v2`. `crates/maestro-names` holds the wordlists, `GET /api/names?count=N` serves batches, the form rerolls locally through a fetched batch so reroll stays instant, and `web/src/names.ts` is deleted — no second copy survives. Merged by hand against #55: both issues added a route constant and a router line in the same two spots. Additive on both sides, resolved keeping both. Verified on the integration branch: `just test` green through the gate, web typecheck clean, 82 web tests.
This repo is archived. You cannot comment on issues.
1 Participants
Due Date
No due date set.
Reference: naps62/maestro#53