Public: anyone can read this; the crew can change it.
Every preview of the forge takes looks of a new forge's first screen by itself: light and dark, phone and desktop #11299
Check · Review · Land · Live done — Landed and live in production.
Every preview of the forge now seeds a newcomer and takes their home as a look. I couldn't take pictures here, so the eight pictures and the looks-page link are not checked. Open the pull's preview looks page after the push deploys; the new look is `/?as=newcomer`, at desktop and phone, light and dark.
shipped production is serving it deploy f21b126
Every preview of the forge now seeds a newcomer and takes their home as a look. I couldn't take pictures here, so the eight pictures and the looks-page link are not checked. Open the pull's preview looks page after the push deploys; the new look is /?as=newcomer, at desktop and phone, light and dark.
What changed
- The newcomer.
src/spawn/preview-seed.tsseedspreview-newcomer, an admin who has claimed and made no tell, plus an organisation and aparent.jsonso the preview reads as a spawned forge. Their home is the first-login card at "What do you want built?". - Self-check. The seed fetches that home as the newcomer and refuses to finish unless it is 200, has the "What do you want built?" box, and has no passkey form above it. It only runs in previews, behind the same
seedPreviewguard as the preview admin. - The look.
src/spawn/preview-looks.tsadds/?as=newcomerto the owner looks, taggedas: "newcomer". It needs its own page key because the admin's/is already a look and the looks are keyed by page. Noforge.jsonedit. - Taken as the newcomer.
src/looks/service.tssigns those grants as the newcomer instead of the preview admin.src/spawn/preview-owner.tsmaps that signed name to the newcomer. This adds no new power: a preview already treats the parent's admins as its admin. - Admin pages stay full. The new
parent.jsonwould have turned the preview admin's home into the lean first-steps view.src/core/next-steps.tstherefore skips any user carrying the seeded-preview setting, so the admin's other looks are unchanged. - Tests.
test/preview-newcomer.test.tscovers all of the following:
- the newcomer's home answers 200 with the box and the data-first-tell marker;
- the home check refuses a non-200, a missing box, and a passkey form above the box;
- the preview admin's home is still the full one;
- the look is listed for desktop and phone as the newcomer;
- nothing is seeded outside a preview.
What I checked
bun x tsc --noEmit,bun scripts/gate.tsandbun scripts/design-lint.tsare clean.- I ran the related test files (
preview-*,looks-owner,first-login,next-steps-card,api-user-next-steps,everyday,home-fit) and they pass. - Three
test/looks.test.tscapture tests fail here because there is no working chromium in the sandbox. They fail identically without my change. fast.tssaid the diff was too broad to name tests, so I picked those files myself.
Left out
- Other pages as the newcomer (
/apps, the composer after a first tell). The issue asks for the first screen only. - Because the preview now has a
parent.json, pages that check for a hosted forge, such as the crew-key note, may read differently in the preview admin's looks. I haven't seen them rendered.
Every preview of the forge now takes looks of a new forge's first screen: a seeded newcomer's home, on desktop and phone, in light and dark.
The earlier check failure came from the census test "every caller of createUser says where its account comes from". My change added a third createUser(..., origin: "seed") call in src/spawn/preview-seed.ts, for the preview newcomer. The test still listed two such calls for that file.
I changed the test, not the code. The newcomer is a preview-only seeded account, the same kind as the other two in that file, so the new call is legitimate. test/signup-gate-parent.test.ts now expects three "seed" entries for that file. That test passes locally (4 tests), and I pushed the fix. I did not re-run the full check here, so the forge's rerun on this push is the real verdict.
To try it, open the preview of this pull at https://lab--11299--forge-trevato-apps.open-platform.sh.
The idea is sound and well tested at the unit level, but the issue's box 4 is not met and the picture result is unverified. Fix, in one round:
- FIRST: the pull description must link the preview's looks page where the eight pictures appear, and you must have opened it and confirmed the newcomer look shows the 'What do you want built?' card at phone and desktop, light and dark. The description says the pictures and link are 'not checked'. Check them on the deployed preview and say what you saw.
- Unverified side effect: seeding a parent.json makes the preview read as a spawned forge for every other look (signup gate, crew-key note, hosted-forge checks). You only guarded next-steps. Open the admin's existing looks on the preview and confirm none changed, or add a test that pins one or two of them (e.g. the admin's settings page and /apps) as unchanged with parent.json present.
- Every boot of a preview now builds a full forgeHttp, a session and a render of / just to self-check, even when already seeded (the early-return path). Run the self-check only when the newcomer was just created, so boot stays fast.
- The test mutates process.env.FORGE_APP_ENV in beforeAll and deletes it in afterAll; pass the env through instead, or restore the prior value, so it cannot leak into parallel files.
- src/core/next-steps.ts now imports a constant from src/spawn/preview-looks.ts: core depending on a preview module. Move PREVIEW_SEEDED to a core-level settings home (it is a user-setting key) and import it from there in both places.
- The service.ts grant uses a magic id 'preview-newcomer'; use the PREVIEW_NEWCOMER constant for the id too, and compute the newcomer test once rather than re-scanning ownerLooks inline in the nested ternary.
Items 2–6 are fixed and pushed (e7240260a). Item 1 is not met: I could not open the eight newcomer pictures or confirm what they show.
Item 1, the pictures. The pull's looks API and the preview's / answer 200, but the API lists no newcomer pictures, so there was nothing to open.
- It lists 30 pictures, all at the earlier commit f7d9bcfd6. None is a newcomer look.
- No picture exists yet for the new commit e7240260a. I polled for about two minutes after the push.
- Guessed URLs for the newcomer slots at f7d9bcfd6 returned 404.
- My shell has no chromium and cannot sign in as the newcomer, so I could not render the card myself.
- Please open the pull's looks page once the e7240260a deploy has taken its pictures. The look is
/?as=newcomer, desktop and phone, light and dark. I have not seen the 'What do you want built?' card at phone or desktop, light or dark. - The test
the newcomer's home answers 200 with the one box and no passkey form above itfetches/as the newcomer with a session and checks the card is there. The boot self-check runs the same check.
Item 2, other looks. A new test, parent.json leaves the admin's settings page and /apps as they were, fetches /settings and /apps as the preview admin with parent.json present, then with it moved away. It checks the two renderings are identical, after stripping scripts, styles and clock text. This covers those two pages only. I did not render the signup gate, the crew-key note or the hosted-forge checks.
Item 3, boot cost. seedNewcomer builds the server, session and render for the self-check only when it just created the newcomer, the organisation or parent.json. An already-seeded preview returns early.
Item 4, env. The test no longer sets or deletes process.env.FORGE_APP_ENV. It passes the env to seedPreview explicitly.
Item 5, core import. PREVIEW_SEEDED now lives in src/core/settings.ts. next-steps.ts and preview-seed.ts import it from there, and preview-looks.ts no longer exports it.
Item 6, grant id. src/looks/service.ts uses PREVIEW_NEWCOMER for the grant id. The newcomer grant is built once, and an isNewcomerLook(page) helper replaces the nested ternary.
Checks.
bun test test/preview-newcomer.test.tspasses (6 tests).bun x tsc --noEmitandbun scripts/gate.tsare clean.scripts/fast.tssaid the diff was too broad to name tests, so I ran thepreview,next-steps,first,looksandsettingstest files by name.- All pass except three
test/looks.test.tscapture tests that need a working chromium here. They failed the same way before the change, per my earlier run on the previous commit.
Closes #11285
Earlier asks 2–6 (parent.json leaving /settings and /apps unchanged, boot cost only on first seed, explicit env in the test, PREVIEW_SEEDED in core/settings, grant id via PREVIEW_NEWCOMER and isNewcomerLook) are met in the diff. Ask 1 (the pictures) I cannot confirm: the looks API still lists only 30 pictures at f7d9bcf and none is a newcomer look, so I did not see the card at phone or desktop, light or dark. Two things I would do next: (1) open the looks page once this head has taken its pictures and check the eight newcomer pictures, including the phone width where the first-tell box must sit above the fold; (2) render the signup gate and the crew-key note in the preview admin looks, since parent.json now exists in every preview.
Left #11285 open: 1 unticked item remain (bun test and bun scripts/design-lint.ts pass; the pull links the preview's looks page where the eight pictures appear).
Every preview of the forge now seeds a newcomer and takes their home as a look. I couldn't take pictures here, so the eight pictures and the looks-page link are not checked. Open the pull's preview looks page after the push deploys; the new look is
/?as=newcomer, at desktop and phone, light and dark.What changed
src/spawn/preview-seed.tsseedspreview-newcomer, an admin who has claimed and made no tell, plus an organisation and aparent.jsonso the preview reads as a spawned forge. Their home is the first-login card at "What do you want built?".seedPreviewguard as the preview admin.src/spawn/preview-looks.tsadds/?as=newcomerto the owner looks, taggedas: "newcomer". It needs its own page key because the admin's/is already a look and the looks are keyed by page. Noforge.jsonedit.src/looks/service.tssigns those grants as the newcomer instead of the preview admin.src/spawn/preview-owner.tsmaps that signed name to the newcomer. This adds no new power: a preview already treats the parent's admins as its admin.parent.jsonwould have turned the preview admin's home into the lean first-steps view.src/core/next-steps.tstherefore skips any user carrying the seeded-preview setting, so the admin's other looks are unchanged.test/preview-newcomer.test.tscovers all of the following:- the newcomer's home answers 200 with the box and the
data-first-tellmarker; - the home check refuses a non-200, a missing box, and a passkey form above the box; - the preview admin's home is still the full one; - the look is listed for desktop and phone as the newcomer; - nothing is seeded outside a preview.What I checked
bun x tsc --noEmit,bun scripts/gate.tsandbun scripts/design-lint.tsare clean.preview-*,looks-owner,first-login,next-steps-card,api-user-next-steps,everyday,home-fit) and they pass.test/looks.test.tscapture tests fail here because there is no working chromium in the sandbox. They fail identically without my change.fast.tssaid the diff was too broad to name tests, so I picked those files myself.Left out
/apps, the composer after a first tell). The issue asks for the first screen only.parent.json, pages that check for a hosted forge, such as the crew-key note, may read differently in the preview admin's looks. I haven't seen them rendered.Closes #11285