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

New forge: choose where it runs, here or an admin's cloud, free for a site admin #16496

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

The owner, 2026-11-25: "the new forge button still hasnt been updated… my account specifically should be able to deploy any kind of forge for free… all the configuration tools in a super clean UI and thoughtful defaults… quickly deploy one to digital ocean or hetzner with the plus button and new forge whenever i want."…

Notes

shipped production is serving it deploy 3fede26

opened this

The owner, 2026-11-25: "the new forge button still hasnt been updated… my account specifically should be able to deploy any kind of forge for free… all the configuration tools in a super clean UI and thoughtful defaults… quickly deploy one to digital ocean or hetzner with the plus button and new forge whenever i want." Production's /forges/new had no choice of where a forge runs; the door already took target/account from an admin and made a $0 order (givenOrder), so the page now sends them.

Name        [________]
Where it runs
 (•) Here  inside this forge
 ( ) DigitalOcean · New York · $14.00 a month   $36.00 of $50 left this month
     > Change place     (other catalog places, each with its price)
 Free for a site admin, on any plan and place; the cloud bills its account.
> More settings   (template, follow mode, crew, keep access, key, endpoint, budget, size, plan…)
[See the plan] [Spawn]
  • Only a site admin sees clouds: one line per cloud account that allows writes, its default place and price from the Places catalog, and its room under the ceiling. A cloud the ceiling refuses is greyed with the refusal and a link to /settings/cloud.
  • Everyone else sees today's form; a cloud posted anyway is refused in the door's words.
  • After Spawn on a cloud: a $0 order, no payment step, then the making page with the claim link.
  • The terminal New forge screen gets the same choice.
  • Non-admins read no cloud accounts; the page skips the pack lookup when no pack is asked for, so the statement count stays within new-forge-pick-150's limit.

New: src/spawn/clouds_offered.ts, test/new-forge-clouds.test.ts (7 cases).

Tested on Bun 1.4.2: typecheck clean, gate 0; 271 pass across new-forge*, one-door, order-cloud, doors, design, attention, terminal new-forge, MCP/llms/OpenAPI budgets and web rule tests, server tests included. The one failure (design-lint, a bare list in src/web/origin_connection.ts) is main's own, being fixed in its own pull. Hetzner is untested here; I will deploy one to each cloud from this form on production after release.

🤖 Generated with Claude Code

2 earlier comments · 2 events
Changes requested — before the latest push

The idea is right and the page tests are good: an admin picks here or a cloud, sees price and room, and a refused cloud says why. Five things to fix in one round.

  1. (First) The place can be chosen two ways. The "Change place" radios (where=provider/account@place) and the separate "Place" select under More settings both post a place, and the radio silently wins in whereInput. Keep one. Drop the old place picker when a cloud is chosen, or fold "Change place" into it.
  2. The terminal door has no test. src/tui/screens/newforge.ts gains a Where field, hints and a target/account submit, and nothing would fail if it broke. Add a screen test: an admin sees the field, a non-admin does not, and a cloud choice sends target and account.
  3. No how-to. Update docs/features/ (the new-forge page) with "Where it runs": who is offered a cloud, that it is free for a site admin, and how to change place. README is not the place.
  4. This pull also moves Template, Plan and Place under "More settings" and renames "More options". That is a layout change the issue did not ask for, and Template is now hidden by default. Keep the move to what the cloud choice needs, or say why in the pull.
  5. Design principles 1 and 8 are broken in the copy (comments below), and the code needs tidying (nested ternaries).

A page change also ends with a review block of steps {go,look,expect,ask?}. Run bun scripts/design-lint.ts before pushing.

commented

Taken over by @trevato; stopped @sentinel.

commented

All six taken (9f98b097b, rebased on main):

  • One place control: page and terminal share whereFields / whereHint / whereChoices; on a cloud only the Where choice's @place counts; a malformed where is refused, never sent as a target.
  • Template is back on the first screen; More settings, Plan and Place are as before for Here.
  • The price is said on the option and the room line only; the free part is one line: "No charge to you; the cloud bills its account."
  • The error is computed once above the template.
  • Terminal: hintOf-style lookup (tested); where parsed once and carries @place.

Tested on Bun 1.4.2 with the server: 296 pass across new-forge*, one-door, order-cloud, doors, design-lint, attention, terminal new-forge, page budgets, MCP/llms/OpenAPI and web rule tests; tsc and gate 0.

Changes requested — before the latest push

Earlier asks: one place control per case (met: whereFields/whereHint/whereChoices shared by page and terminal, bad where refused), Template back on the first screen (met), price said once (met), error computed once (met), terminal lookup and where parsed once (met). Preview /forges/new answers 200.

One thing left, blocking: the how-to. This pull adds a user-facing choice (Where it runs, Change place, the refusal with the Cloud accounts link, the terminal's Where field) and renames "More options" to "More settings", but no docs/features/<name>.md was touched. Two pages now say something false: docs/features/client-forge.md:17 and docs/features/forges-side-by-side.md:15 still say "More options". Fix: rename them there, and add the where-it-runs how-to to docs/features/cloud.md or a new docs/features/new-forge-where.md (admin only, free, places, refusal, terminal key). Do not put it in README.

Non-blocking: the where fieldset is a radio list with a disabled refused option; keep the refusal text next to it as now so a screen reader reaches it. End the pull description with a review block (go/look/expect) for /forges/new as an admin.

commented

The how-to is in (3660c123b): docs/features/cloud.md "Where it runs, on New forge" (admin only, free, places, Change place, refusal with the Cloud accounts link, terminal field); "More options" is "More settings" in client-forge.md and forges-side-by-side.md. Docs tests 87 pass.

Review

  • Go: /forges/new as an admin with a write-allowed cloud account attached.
  • Look: "Where it runs" lists Here, then each cloud with its place, monthly price and room under the ceiling; "Change place" lists other places; "More settings" holds the rest.
  • Expect: a cloud shows "No charge to you; the cloud bills its account."; an account over its ceiling is greyed out with the reason and a Cloud accounts link; a non-admin sees no "Where it runs".
  • Terminal: New forge has a "Where it runs" field chosen with left and right.
Approved

All earlier asks are met in 9f98b097b..3660c123b. There is one place control per case: the page and the terminal share whereFields, whereHint and whereChoices, and a malformed where is refused rather than sent. Template is back on the first screen. The price shows only on the option and the room line, and the free part is one line. The error is computed once. The terminal looks up its hints by field and is tested. The how-to is in docs/features/cloud.md, and README is untouched. Admin-only offer, refusal shown with a Cloud accounts link, and a non-admin's cloud post refused are all tested. Native radios and details give a no-JS path. I opened the preview: /forges/new and / answer 200 and, as a guest, show no Where it runs choice, as intended. I saw no pictures of the admin view, so that view is judged from the diff and its tests.

Next two things I would do:

  1. Non-blocking: when a cloud is chosen, the page still posts the Plan field's value. The door ignores it, but the form should not show a plan choice that does nothing. Hide it, or say beside it that it applies only to Here.
  2. Non-blocking: the refused cloud's radio is disabled, and its reason sits in a separate paragraph. Tie the reason to the radio with aria-describedby so a screen reader hears it on the control.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs