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

A signed-out visitor to someone's hosted forge is told whose it is and offered Sign in, not the product page #13807

Merged opened this in answer to

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

Merged

A signed-out visitor to a claimed hosted forge now sees "This is riley's forge" at /, with Sign in as the one primary button. There is no "Start my forge" form and no product page. I ran the new test/home-claimed-forge.test.ts and the existing door, start-form and MCP-size tests, and they pass.

Notes

shipped production is serving it deploy 4adf612

opened this

A signed-out visitor to a claimed hosted forge now sees "This is riley's forge" at /, with Sign in as the one primary button. There is no "Start my forge" form and no product page.

I ran the new test/home-claimed-forge.test.ts and the existing door, start-form and MCP-size tests, and they pass. bun x tsc --noEmit is clean. design-lint reports nothing. I did not run the whole suite, and I haven't looked at the page in a browser.

What changed

  • New helper: claimedOwner(app) in src/spawn/claim.ts returns the owner's username when the forge has a parent.json and a claimed admin. It returns nothing for any other forge.
  • Door: studioDoor in src/web/studio/home.ts branches on that helper, only for /. The claimed-forge page has a heading, a sentence, Sign in, the public apps if any, and a quiet "Get your own forge" link. /front and unowned forges keep the full product page.
  • Top bar: its Sign in button goes through the platform sign-in if the forge uses it, and "Create an account" is dropped from it.
  • Sign out: it already redirects to /, so it now lands on the new page.
  • Test: an unowned forge still shows the start form. A claimed one shows the owner's name and Sign in, with no start-forge, and has the "Get your own forge" link.

Left out

  • Signup setting: I added no new owner setting for strangers signing up. The existing signup mode still applies, so /signin and /signup read as before.
  • Dead link: the top bar still shows "Made here", "Pricing" and "Code". "Made here" points at a section that isn't there when the forge has no public apps.
  • Owner pick: the owner is the earliest admin account.

To try: run a forge with a parent.json and a claimed admin, sign out, and open /.

The first push was refused until a commit message carried a Try: line, so the branch has an empty commit for that.

Closes #13795

4 earlier comments · 1 event
commented

A signed-out visitor to a claimed hosted forge now sees "This is riley's forge" at /, with Sign in as the one primary button. There is no "Start my forge" form and no product page.

I ran the new test/home-claimed-forge.test.ts and the existing door, start-form and MCP-size tests, and they pass. bun x tsc --noEmit is clean. design-lint reports nothing. I did not run the whole suite, and I haven't looked at the page in a browser.

What changed

  • New helper: claimedOwner(app) in src/spawn/claim.ts returns the owner's username when the forge has a parent.json and a claimed admin. It returns nothing for any other forge.
  • Door: studioDoor in src/web/studio/home.ts branches on that helper, only for /. The claimed-forge page has a heading, a sentence, Sign in, the public apps if any, and a quiet "Get your own forge" link. /front and unowned forges keep the full product page.
  • Top bar: its Sign in button goes through the platform sign-in if the forge uses it, and "Create an account" is dropped from it.
  • Sign out: it already redirects to /, so it now lands on the new page.
  • Test: an unowned forge still shows the start form. A claimed one shows the owner's name and Sign in, with no start-forge, and has the "Get your own forge" link.

Left out

  • Signup setting: I added no new owner setting for strangers signing up. The existing signup mode still applies, so /signin and /signup read as before.
  • Dead link: the top bar still shows "Made here", "Pricing" and "Code". "Made here" points at a section that isn't there when the forge has no public apps.
  • Owner pick: the owner is the earliest admin account.

To try: run a forge with a parent.json and a claimed admin, sign out, and open /.

The first push was refused until a commit message carried a Try: line, so the branch has an empty commit for that.

commented

<!-- look-pages b702bec38a5c --> Look pages for b702bec, from the gate:

  • look pages (inferred): this pull changes src/web/studio/home.ts; the forge pictures / (src/web/studio/home.ts), /docs (src/web/studio/home.ts), /explore (src/web/studio/home.ts) and 23 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
commented

The feedback asked for no code change, so I changed nothing and pushed nothing. It is the gate's automatic note listing which pages it will picture. It inferred them from src/web/studio/home.ts: /, /docs, /explore and 23 more.

This pull changes only the signed-out view of / on a claimed hosted forge. The other pages import home.ts but render the same as before. I did not add a Looks: line to a commit message to narrow the list, because that would need a new commit and the wider set of pictures is harmless.

What changed:

  • src/web/studio/home.ts: a signed-out visitor to a claimed hosted forge sees whose forge it is and a Sign in button, not the product page.
  • src/spawn/claim.ts: a small addition that supports this.
  • test/home-claimed-forge.test.ts: new tests for the claimed-forge view.

I left the product page unchanged for unclaimed forges and for signed-in users.

To try it, sign out of a claimed hosted forge and open /.

🤖 Generated with Claude Code

Changes requested — before the latest push

Changes requested. Fix first: the top bar on the claimed page still shows a "Made here" link to #made, which does not exist when the forge has no public apps, so it is a dead anchor for keyboard and screen-reader users. Also needed:

  1. Direction: the owner said pipeline first (#6534, #6611, #5276, #3316, #6217, #6428, #1242, #1073). This is a feature that is not on that list. Say in the pull why it goes ahead of them.
  2. Design system: .door-personal and .door-org are new component classes with no entry in docs/design/areas/<area>.md. Use the existing named components, or document them there. The h1 id="whose" is unused. Drop it.
  3. Plain markup: ${owner ?? ""} inside the branch that already knows owner is defined is a type workaround. Narrow the type once instead. The nested ternaries in title, description, scriptJs and tools make studioDoor harder to read. Move the claimed page into its own small module, for example src/web/studio/door_claimed.ts, rather than growing home.ts.
  4. Owner choice: "earliest admin" is a guess. If the forge has several admins, it names the wrong person. Say how the owner is recorded, or read it from parent.json or the claim record.
  5. Tests: add cases for /front, for a signed-in viewer, and for the platform-sign-in href (edge token). Also assert the title and that the owner name is escaped. The current test would not fail if those branches broke.
  6. Both doors and docs: add docs/features/<name>.md for this signed-out behaviour, and say what the terminal shows a guest of a claimed forge.
  7. Clean up the branch: the empty commit made to satisfy the Try: line should carry a real message. I did not look at the preview pictures in detail. The findings come from the diff.
commented

A signed-out visitor to a claimed hosted forge now gets a page that says whose forge it is and offers Sign in. I pushed the fixes for all seven review points except cleaning up the empty Try: commit (point 7).

The new claimed-forge tests pass, tsc is clean, and design-lint and gate report nothing. scripts/fast.ts named 2064 test files, so I ran the home, door and front test files instead. test/home-buttons-rest.test.ts was skipped because no chromium starts in this sandbox. I have not looked at the preview.

  • Dead anchor: the claimed page's top bar now has only Sign in. There is no #made link, and the "Made here" section has no id.
  • Direction: it goes ahead of the pipeline list because a stranger on a claimed forge was being sold the product they are already inside. It is a one-page change that touches no pipeline item. This is in the Direction: line of the latest commit and in the feature note.
  • Design system: the page now uses only classes already documented in docs/design/areas/front.md. .door-personal, .door-org and the #whose id are gone.
  • Structure: the claimed page is in src/web/studio/door_claimed.ts. home.ts gets one early return. The owner is a plain string, with no ?? "" and no nested ternaries.
  • Owner: I replaced "earliest admin" with src/spawn/forge_owner.ts.
    • parent.json names the organisation the forge was spawned as.
    • If a person took that name, they are the owner.
    • Otherwise it is the Owners team's single person.
    • If the Owners team has several people, it uses the forge's own name instead of picking one.
    • The claimant is not stored anywhere, so the several-owners case is the one the record cannot settle.
  • Tests: test/home-claimed-forge.test.ts now covers:
    • the escaped title and name;
    • no #made anchor;
    • /front;
    • a signed-in viewer;
    • the platform-edge sign-in href;
    • the ?next= query;
    • the organisation-owner case, with one and with several owners.
  • Docs: docs/features/claimed-forge-door.md is added and linked from the features README. It says what the terminal shows a guest. A guest's key is refused at the door with Permission denied (publickey), so there is no guest screen. The gate wanted that stated as a No door: line in a commit message, so it is there too.
  • Branch cleanup (not done): rewriting the Try: commit needs a force push, which the forge refuses for me. A person can squash it at merge. The follow-up commits have real messages.
commented

This pull makes a signed-out visitor to a claimed hosted forge see whose forge it is, with a Sign in offer, instead of the product pitch.

What changed:

  • src/spawn/forge_owner.ts names the owner from the forge's parent.json and the Owners team record. With one owner it gives their name. With several, or none, it gives the forge's own name rather than guessing among people.
  • src/web/studio/door_claimed.ts renders the claimed door. studioDoor in src/web/studio/home.ts shows it only to signed-out visitors at / on a claimed forge.
  • test/home-claimed-forge.test.ts covers it, with docs in docs/features/claimed-forge-door.md.

The red check: I think the two failures are timing flakes under shard load, not caused by this pull.

  • The failing tests were "signed-in home is answered from memory within the budget" (4.7 s in the shard) and "a cold home answers from the picture" (1.5 s).
  • Both passed on three local runs of test/home-frame.test.ts and test/observability-budget.test.ts (11 of 11 each time).
  • The check log says both files are green on main.
  • My change only affects the signed-out door. It adds one small file read that fails fast on a forge with no parent.json.

I made no code change. I pushed an empty commit, 583157278, to re-run the check. If the same two tests fail again, they need a look as budget tests under load.

I did not run bun scripts/gate.ts, tsc or the other pre-push steps again this turn, since nothing changed.

To try it: sign out of a claimed hosted forge and open /.

Approved

The preview at this head shows "This is preview-newcomer's forge" with Sign in for a signed-out visitor. Earlier asks are met: no dead #made anchor, only documented front classes, the owner is read from the record in a small module (forge_owner.ts), tests cover escaping, /front, signed-in, edge sign-in, ?next and the org owners, and the feature how-to is in docs/features. The terminal is unchanged and a guest key is refused at the door, which the doc states. I could not diff against b702bec in my clone, so I judged the final change as shown. Two things I would do next. Non-blocking: 1) with several owners the page names the forge itself, so a visitor to an org forge sees the org name; consider a line saying so. 2) squash the empty Try: commits at merge.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs