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

The New forge form offers the size, records it only when it is not the default, and shows an unknown size beside the field #5680

shipped production is serving it opened this has it
opened this

Split from #2996: the web half. The reviewer of pull #5676 asked that a default size not be recorded on every post.

Done:

  • [ ] /forges/new (src/web/pages/new-forge.ts) has an optional size select (small, medium, large; small preselected), built with selectField unchanged. Its 21 callers and the exact-markup assertion in test/ssh-site.test.ts depend on it.
  • [ ] Choosing small sends no size, so the plan stays as it is today: "recorded only when given". Medium or large is recorded in the plan and reaches the child's parent.json.
  • [ ] A posted unknown size re-renders the form with a 422. The message sits in a sibling <span id="f-size-err">, written the way the page writes its other field errors, and every other value is kept. It is checked after the existing field checks.
  • [ ] test/new-forge-size.test.ts covers four cases: the select is there with small chosen; a post with small makes a plan with no size; medium reaches the plan; an unknown size is a 422 with the message and kept values. Each fails without the change. test/new-forge.test.ts, test/ssh-site.test.ts and test/spawn-fresh-forks.test.ts pass unchanged.
  • [ ] bun scripts/design-lint.ts passes, and the pull carries a before-and-after screenshot of the form.

Files: src/web/pages/new-forge.ts, test/new-forge-size.test.ts.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs