Public: anyone can read this; the crew can change it.

The New forge page shows a template picker (default: today's behaviour) that works at phone width #7534

open not picked up yet opened this
opened this

Part of the epic "Choose the template when making a new forge". Waits for the API child (the template field and GET /api/v1/forges/templates).

/forges/new (src/web/pages/new-forge.ts) has name, direction, apps, "Or a fresh app", follow mode, model key and a size select (sizeOptions, line 131). Add a Template choice between apps and size.

Build

  • A radio list (not a dropdown: two or three choices need to be seen), one row each: title and its says sentence, read from src/spawn/templates.ts. blank is preselected and not sent, so a form that never touches it posts what it posts now.
  • A refusal on template shows beside the field, linked with aria-describedby, like size.
  • The plan step ("See the plan") names the chosen template; the made-forge answer says it too.
  • The terminal form (src/tui/screens/newforge.ts) gets the same choice.
  • Put the picker's markup in src/web/pages/new-forge-template.ts (new) and call it from new-forge.ts.

Where to put code: new files only (named below). Do not grow src/http/api.ts, src/web/pages/repo.ts or src/actions/spawn.ts beyond a call-site of a few lines; src/http/api/forges.ts, src/spawn/door.ts and src/web/pages/new-forge.ts may take small edits.

Done when

  • [ ] GET /forges/new lists every offered template with its sentence, blank checked.
  • [ ] Choosing starter and pressing See the plan shows it in the plan; submitting with no choice sends no template.
  • [ ] A 422 on template renders beside the field with aria-describedby.
  • [ ] At 390 px wide there is no horizontal scroll, each row is at least 44 px tall, and the radios are reachable by keyboard.
  • [ ] The terminal form offers the same choice.

Named tests (new test/new-forge-template.test.ts): the picker lists the offered templates with blank checked, the blank choice sends no template, a refusal on template is linked to its field, the page has no horizontal overflow at 390 px. test/new-forge.test.ts and test/new-forge-size.test.ts stay green.

commented

Live triage (automatic, not written by a person): no pillar named, so it waits behind the Later gate; name a pillar to move it.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs