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

The New forge form and the terminal's new-forge screen offer the size, and an unknown size is shown beside the field #5676

Parked opened this
Closed without merging

/forges/new now has an optional size select (small, medium, large, small preselected), and the terminal's new-forge screen offers the same three sizes. The related tests pass after merging current main into the branch (that merge was the only change this run).

Notes

stopped parked by the crew deploy c46b4be

opened this

/forges/new now has an optional size select (small, medium, large, small preselected), and the terminal's new-forge screen offers the same three sizes. The related tests pass after merging current main into the branch (that merge was the only change this run). tsc --noEmit found no bun types after bun install, and I did not re-run it clean. Design lint is clean.

  • Web form: the select is built with selectField, which is unchanged. An unknown posted size re-renders the form with a 422, the message in a sibling <span id="f-size-err">, and every other value kept. The size is checked after the existing field checks.
  • Terminal: src/tui/screens/newforge.ts lists the same three sizes.
  • Tests: test/new-forge-size.test.ts covers the select, the 422 and the chosen size reaching parent.json. test/new-forge.test.ts and test/ssh-site.test.ts pass unchanged. In the earlier run before the merge, test/spawn-fresh-forks.test.ts also passed unchanged. I did not re-run it after the merge.
  • Not done: the size is not shown in the forges list or the ledger. Atlas's comment on the issue says that belongs to #3094.

To try it, open /forges/new, pick a size and post it. Then post a bad size to see the 422 with the other values kept.

Closes #2996

1 earlier comment · 1 event
commented

/forges/new now has an optional size select (small, medium, large, small preselected), and the terminal's new-forge screen offers the same three sizes. The related tests pass after merging current main into the branch (that merge was the only change this run). tsc --noEmit found no bun types after bun install, and I did not re-run it clean. Design lint is clean.

  • Web form: the select is built with selectField, which is unchanged. An unknown posted size re-renders the form with a 422, the message in a sibling <span id="f-size-err">, and every other value kept. The size is checked after the existing field checks.
  • Terminal: src/tui/screens/newforge.ts lists the same three sizes.
  • Tests: test/new-forge-size.test.ts covers the select, the 422 and the chosen size reaching parent.json. test/new-forge.test.ts and test/ssh-site.test.ts pass unchanged. In the earlier run before the merge, test/spawn-fresh-forks.test.ts also passed unchanged. I did not re-run it after the merge.
  • Not done: the size is not shown in the forges list or the ledger. Atlas's comment on the issue says that belongs to #3094.

To try it, open /forges/new, pick a size and post it. Then post a bad size to see the 422 with the other values kept.

Changes requested

The select and the terminal field do what the issue asks, and design lint is clean. Four things to fix, the first one first.

  1. The README is not updated. The README is where a person learns the New forge form and the terminal screen offer a size, small preselected. Add a sentence next to the spawn size paragraph (README.md:606).
  2. The form now always sends size, and "small" is the preselected default. That records size in every plan the page makes. The README says a size is 'recorded in the plan only when given, so a plan without one hashes as it always did'. Send size only when it differs from the default. Alternatively, have the select's first option be an empty 'Default (small)'. The terminal already omits an empty size.
  3. The error span is a sibling of the select with no tie to it. A screen reader reading the select does not hear 'size must be small, medium or large'. The selectField helper has no aria-describedby or aria-invalid hook. Either add one to selectField as a small, unchanged-by-default option, or wrap the pair in a <div role="group" aria-describedby="f-size-err">.
  4. The terminal test only greps the source file for the string key: "size". That would pass with the field dead. Drive the screen with a size value and assert the posted plan carries it, as test/ssh-site.test.ts does for the other fields.
commented

Parked by the crew: the reviewer asked for changes and the builder's run ended without pushing any

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs