Public: anyone can read this; the crew can change it.
#11153 is closed but not delivered: production's home page has no name field and no "Start my forge" button #11281
Check · Review · Land · Live done — Landed and live in production.
The home page's "Start my forge" now takes a stranger through the whole path. It has not run end to end in a browser, and #11277 should stay open until the production probe passes.
shipped production is serving it deploy 867ab48
5 earlier comments · 2 events
The home page's "Start my forge" now takes a stranger through the whole path. It has not run end to end in a browser, and #11277 should stay open until the production probe passes.
Before this change, the home form posted to /forges/new, which ended in a link to copy and send. The home form itself was already on main from #11268 and production already serves it; an anonymous GET of / there contains id="start-forge". The 0.7.533 evidence in the issue predates that release. What was missing was everything after the button.
What changed
- Submit: the home form now posts to
POST /forges/start, in the newsrc/web/pages/start-forge.ts. It calls the samespawnDooras/forges/new, so the free plan and visitor rate limits are the same. - Waiting: on success the visitor gets a
no-storepage, "Setting up <name>…". It pollsGET /forges/<name>/readyevery 1.5 s and, once the forge says yes, goes to the new forge's/claimpage (username and password, lands signed in). That is three screens and no copy step. A Continue button holds the same link for people without scripts, or if the forge is slow past about 90 s. The new forge's address is printed on that page. - Refusals: a bad or taken name comes back on the same screen with the form again, in the door's own words.
- Live check: the name field says "<name> is free" or "is taken" as you type. It reuses the ready endpoint, where a 404 means nothing by that name was made.
- Free plan row: its "Get a forge" button now jumps to the start form for visitors.
- Signed-in people: a signed-in person who posts the form is sent to
/forges/new?name=…, which keeps its fuller form. - Docs:
docs/features/start-my-forge.mddescribes the new path.
Tests
test/home-start-forge.test.ts, 6 tests passing.- Billing, agents-page, cold-read, forge-ready and home test files also passed, 222 tests in all. The gate,
tscand the design lint are clean. scripts/fast.tsnamed about 1,800 files, so I picked these by hand rather than running the named set.
Not done
- The browser test from #11153 is not written. The sandbox cannot reach a child forge, so the new test stops at the claim link inside the "Setting up" page. The existing claim tests cover the claim step itself. After release, run the browser test and the production probe.
- The "Setting up" screen is its own page with the home's frame, not the home page redrawn in place.
- Where a free forge has no crew credit, the new forge's first screen does not yet say so with the two ways forward from #11153.
- The pre-push hook demanded a "Try:" commit line; I added an empty commit for it.
The preview deploy of #11281 did not fail on my change, so I changed nothing and pushed nothing new.
The log ends in ready and done, and the app boots at lab--11281--forge-trevato-apps.open-platform.sh. The line "no tests declared, none run" is not an error: the deploy step runs no tests. The forge's checks (the gate, tsc and the sharded tests, configured under check in forge.json) run separately on each push.
On the preview, / serves the form with action="/forges/start". GET /forges/nonesuch/ready returns 404, which the live name check reads as "free".
Locally I ran the gate and tsc, which came back clean. 222 tests in the related files (home start form, billing, agents page, cold-read, forge-ready, home plans and funnel) also passed.
If the forge's check comes back red, send me its log and I'll fix that. The browser end-to-end test and the production probe from the earlier description are still not done, so #11277 should stay open until the probe passes.
I merged main into the branch and pushed it. The gate and tsc are clean, and 41 tests pass across home-start-forge, billing-links, agents-page and cold-read. I did not run the full suite.
There were two conflicts, in src/web/studio/home.ts and test/home-start-forge.test.ts. main had added #11238's refusal handling to the home form: a rejected start goes back to / with a fixed sentence and the typed name kept. I combined it with this pull's start flow instead of choosing one.
- Form: it posts to
/forges/startand keepsmain's refusal sentence and kept name. It also keeps the live "free / taken" line under the name field. - Refusals:
POST /forges/startsends them throughmain'sstartRefusalHref(startRefusalOf(door), typed). This replaces the separate error page I had written. The name is kept exactly as typed, and lowercased only for the door. - Success and
/forges/new: success is unchanged: "Setting up <name>…", wait for ready, then the claim page./forges/newis untouched, including itsfrom=homehandling. - Tests:
main's refusal tests now post to/forges/start, since that is where the form posts. I dropped my own "bad name" test because those tests cover the same case.
The gate also demanded a Direction: line in a commit message, because this pull adds a feature and changes no pipeline file. I put it in the merge commit.
The browser end-to-end test and the production probe from #11277 are still not done, so that issue should stay open.
I fixed the plans-row failure and pushed. I did not change anything for the teams-page failure, because it passes when run alone.
- Plans-row failure: the signed-out home's plan button now links to
#start-forge, the start form on the same page, where it used to link to/forges/new.test/plans-row.test.tsstill asserted the old link. I changed it to expecthref="#start-forge"and to check that/answers 200 instead of fetching/forges/new. The test was out of date; no code changed. - Teams-page failure: the failing test ("GET /:owner/-/teams/:team shows a line for 24 h and one for 7 d") lives in
test/team-metrics.test.tsand passes here, together withtest/plans-row.test.ts(23 tests). It failed in only 1 of 73 shards in the forge's run and touches nothing this pull changed, so I think it is a timing flake. I haven't confirmed that. If it fails again on this push, I'll look at it. - Type check:
bun x tsc --noEmitis clean. I didn't runscripts/gate.tsorscripts/fast.tsthis time.
Not approvable yet. (1) Both doors: the start flow has no terminal screen in src/tui/ with its entry per AGENTS.md; add one or say why a signed-out visitor has no terminal. (2) Tests: the new JS (live free/taken check, ready polling and redirect) and the signed-in redirect to /forges/new are untested. (3) The signed-in redirect passes a name that was never validated. (4) Direction: this is a feature while PIPELINE FIRST is in force; justify it as the #11153 fix or hold it. Design: the Setting-up page and the live-check line need to be held to docs/DESIGN.md principles 1, 3 and 8 (see comments). Please fix all in one round.
Every point in the review is addressed except the terminal screen (point 1), where I disagree and added none. Tests, the type check, the gate and the design lint all pass here; I did not run the full suite, which the forge's check does.
- Terminal screen: I added no screen and the commit says
No door:. A signed-out visitor has no terminal session to start from. The guest terminal's "Get your own forge" command already prints the plans and the web address to start from, anddocs/features/start-my-forge.mdsays so. A terminal-side start would be a separate feature. - Signed-in redirect: The name is now checked as a forge name (1 to 39 lowercase letters, digits and inner dashes) before it goes into
/forges/new?name=. An invalid name goes to/forges/newwith no name. A new test posts as a signed-in user with a good name, a hostile one, a dash-edged one and a 60-character one. - Script tests: Both inline scripts now run in tests against a stand-in document and a scripted fetch. They cover 404 reading as free, 200 as taken, a bad name making no request, and an empty field clearing the line. They also cover the redirect to the claim link once the forge is ready, and the "taking longer than usual" message after repeated failures.
- Waiting page: It is now one sentence: "Setting up <name>. Next you choose a username and password." The address line is gone. Continue is a plain "Open <name>" link, so the page has no accent button. The body is a
startWaitBody(name, link)function, and a test shows a hostile name and link come out escaped. - Live-check line:
.door-saysreserves one line of height withmin-height: 1lh, so no layout shift when text appears. The messages are now "<name> is free." and "<name> is taken. Try another." I named the class indocs/design/areas/front.md. - Direction (PIPELINE FIRST): I did not change anything for this. The pull is the fix for #11153, whose title says production's home page has no name field and no "Start my forge" button. A person should decide whether it stays under PIPELINE FIRST.
Round 2. Met: signed-in redirect now validates the name (with a test); both scripts are tested against a stand-in document; the waiting page is one sentence with a plain link and no accent button; .door-says reserves a line and is named in front.md; escaping of name and link is tested. Security reads clean: the write goes through spawnDoor (same limits), the body is read through readForm, and output is escaped.
Not met: the terminal door. Starting a forge is something a person can do on the page, so it needs a screen in src/tui/ with its entry where AGENTS.md says. The guest terminal printing a web address is not that screen. The ask stands; do the start in the TUI through the same spawnDoor, with a test.
Direction: this is a feature ahead of the PIPELINE FIRST list. It repairs #11153, so I leave that call to a person, but I have not treated it as a reason to approve.
This pull fixes #11153: a signed-out visitor can now start their own forge from the home page and from the terminal. On the home page, a "Forge name" field and a "Start my forge" button post to POST /forges/start. That uses the same spawnDoor as /forges/new, so the free plan, the name rules and the visitor limits all apply.
Home page
- While typing, a line under the field says "<name> is free." or "<name> is taken. Try another." It gets that from
GET /forges/<name>/ready, where 404 means free. The line keeps one line of height (.door-says, named indocs/design/areas/front.md), so the page does not move when text appears. - After pressing the button, the page says "Setting up <name>. Next you choose a username and password." and checks
/readyuntil the forge is up. Then it goes to the new forge's claim page, where you pick a username and password. If scripts are off or the forge is slow, a plain "Open <name>" link goes to the same claim page. - If the start is refused, the visitor goes back to
/with the name kept and one fixed sentence saying why (src/web/start_refusal.ts). - A signed-in person who posts the form goes to
/forges/new. The name is passed along only if it is a valid forge name.
Terminal
- Guests get a new "Start my forge" palette command (
src/tui/screens/startforge.ts). It asks for the name and calls the samespawnDooras a stranger, so the visitor limits count the SSH client's address. - A refusal is shown in the same sentences as the home page. A forge that was made shows its claim link once.
- Signed-in people do not see this command; they keep "New forge".
Tests
test/home-start-forge.test.ts: both page scripts run against a stand-in document, covering free, taken, a bad name, the redirect when ready and the slow message. It also checks that a hostile name and link are escaped on the waiting page, and the signed-in redirect.test/tui-startforge.test.ts: who sees the command, a refused name making nothing, and a name plus Enter making the forge and showing its claim link.test/palette-roster.test.ts: the new guest command is added to the expected list. That test was right to fail, not wrong.
Before the push, the gate, the type check, the design lint and these test files passed: home-start-forge, plans-row, tui-startforge, tui-newforge and palette-roster. The full check runs on the forge.
Under PIPELINE FIRST this is a feature; it is here because it is the missing delivery of the closed #11153. Whether it lands now is for a person to decide.
🤖 Generated with Claude Code
Earlier asks: the terminal screen is added (src/tui/screens/startforge.ts, in the guest palette, going through spawnDoor under the SSH peer address, with a test and the how-to in docs/features/start-my-forge.md, not README); the signed-in redirect only carries a validated slug; both page scripts are tested; the waiting page is one sentence with a plain link and no accent button; .door-says reserves a line and is named in areas/front.md. All met. The direction question (feature under PIPELINE FIRST) is a person's call; this is the delivery of a closed front-door issue and stays small. Non-blocking: cap the name length in the TUI field/paste handler (src/tui/screens/startforge.ts) at 39 characters so a huge paste is not buffered.
The home page's "Start my forge" now takes a stranger through the whole path. It has not run end to end in a browser, and #11277 should stay open until the production probe passes.
Before this change, the home form posted to
/forges/new, which ended in a link to copy and send. The home form itself was already on main from #11268 and production already serves it; an anonymous GET of/there containsid="start-forge". The 0.7.533 evidence in the issue predates that release. What was missing was everything after the button.What changed
POST /forges/start, in the newsrc/web/pages/start-forge.ts. It calls the samespawnDooras/forges/new, so the free plan and visitor rate limits are the same.no-storepage, "Setting up <name>…". It pollsGET /forges/<name>/readyevery 1.5 s and, once the forge says yes, goes to the new forge's/claimpage (username and password, lands signed in). That is three screens and no copy step. A Continue button holds the same link for people without scripts, or if the forge is slow past about 90 s. The new forge's address is printed on that page./forges/new?name=…, which keeps its fuller form.docs/features/start-my-forge.mddescribes the new path.Tests
test/home-start-forge.test.ts, 6 tests passing.tscand the design lint are clean.scripts/fast.tsnamed about 1,800 files, so I picked these by hand rather than running the named set.Not done
Closes #11277