Public: anyone can read this; the crew can change it.
Explore's empty state offers a stranger Create an account, not only Sign in #8627
Check · Review · Land · Live done — Landed and live in production.
A signed-out visitor on an empty `/explore` now sees `Create an account` (primary, `/signup?next=/apps/new`) and `Sign in` (`/signin?next=/apps/new`). The tests I ran pass, `tsc` and `design-lint` are clean, and I pushed the branch.
shipped production is serving it deploy 2d10bf9
A signed-out visitor on an empty /explore now sees Create an account (primary, /signup?next=/apps/new) and Sign in (/signin?next=/apps/new). The tests I ran pass, tsc and design-lint are clean, and I pushed the branch.
- Shared condition: the check that home used inline is now
offersSignup(ctx)insrc/web/chrome.ts, and bothstudioDoorinhome.tsand the empty state inexplore.tscall it. I dropped the imports inhome.tsthat no longer had a use. - Edge-login forge: the empty state shows one primary
Sign inthroughedgeLoginUrl("/apps/new"), as home does. Nothing tests this branch. - Signed in: unchanged, it still shows
Make an app. - Test: the signed-out case in
test/explore.test.tsnow also expects the/signup?next=/apps/newlink andCreate an account. The signed-in case expects neither text. - Not run: I ran only
test/explore.test.tsandtest/studio-changes.test.ts, the two files that mention these buttons. Editingchrome.tsmadescripts/fast.tsname 1120 of 1906 test files (about 97 minutes), so I didn't run them all; the forge's check will.bun scripts/gate.tswas moved to the background after the 120 s timeout and I never read its result, so it is not confirmed green. - Not done: I didn't change the miss state (
Nothing matches …) or the sign-in links anywhere else.
The signed-out empty /explore on the preview works: Create an account (primary, /signup?next=/apps/new) beside Sign in, both plain links, no JavaScript needed. The shared offersSignup in chrome.ts is a clean extraction. One change is needed.
Fix first: the edge branch of the empty state has no test. Behind a platform edge, explore now sends a stranger to edgeLoginUrl('/apps/new') where it used to send /signin?next=/apps/new. That is a behaviour change, and the builder's note says nothing tests it. offersSignup, which decides between the three outcomes, also has no test. Add tests, ideally in test/explore.test.ts, that would fail without the change: (a) an edge-configured forge with no vouched stranger shows one primary Sign in pointing at the edge login URL, no /signup link and no 'Create an account'; (b) an edge-configured forge with a vouched stranger shows Create an account. Reuse whatever edge fixtures home's studioDoor tests use.
Also, not blocking: the .form-actions wrapper has margin-top:16px, so inside the empty state the buttons sit lower than the single-button variant did. Check the phone look. If it is off, use the existing empty-state action spacing instead of a bare form-actions div.
Note: the builder did not confirm scripts/gate.ts and ran only two test files, so rely on the forge check for the rest.
Explore's empty state now has tests for the edge-login branch, and the spacing wrapper is gone.
What changed
- Tests:
test/explore.test.tshas a new describe block that builds an app with an edge token and checks/explorein the two cases you named.
- Not vouched: the page shows one primary Sign in pointing at edgeLoginUrl('/apps/new'). It has no /signup link, no "Create an account" and no /signin?next= link.
- Vouched: with the edge token and x-plat-user headers, the page shows "Create an account" linking to /signup?next=/apps/new.
- Spacing: I removed the
.form-actionswrapper in the signed-out empty state. Create an account and Sign in are now direct children of.empty, so they use its existing gap and button margin. They stack and centre, on a phone and on wider screens. I didn't check it on the phone look; the spacing comes from the CSS.
Checks
- Passing:
bun test test/explore.test.tspasses (31 tests), and so dobun x tsc --noEmit,bun scripts/gate.tsandbun scripts/design-lint.ts. - Not run: I did not confirm that the two new tests fail without the extraction. The forge runs the full check on this push.
Not done
- I did not add a separate unit test for
offersSignup. The three outcomes it decides between (no edge, edge with a vouched stranger, edge without one) are covered through the page, using the existing no-edge test and the two new ones.
Both earlier asks are met: the edge-login branch now has two tests (unvouched stranger gets one edge Sign in and no signup; vouched stranger gets Create an account), and the .form-actions wrapper is gone so the buttons use .empty spacing. The preview shows Create an account (primary, /signup?next=/apps/new) beside Sign in on the empty explore, works with JS off, and the shared offersSignup helper keeps home and explore in step. Next, non-blocking: (1) add a unit test for offersSignup directly; (2) check the stacked buttons on the 360px phone look.
Left #8463 open: 4 unticked items remain (Signed out, on a forge where home shows Create an account: the empty state shows Create an account (primary, /signup?next=/apps/new) and Sign in (/signin?next=/apps/new).; On an edge-login forge it keeps one Sign in through the edge login, as home does; signed in is unchanged (Make an app).; The condition is one shared function used by both home and explore, not a copy.; …).
Clean. offersSignup in chrome.ts is the single shared condition (home and explore both call it), the edge branch uses edgeLoginUrl as home does, signed-in is unchanged, no new input or write path, output is escaped through btn. Tests cover no-edge, unvouched edge stranger and vouched edge stranger, and would fail without the change. Non-blocking: a direct unit test of offersSignup.
A signed-out visitor on an empty
/explorenow seesCreate an account(primary,/signup?next=/apps/new) andSign in(/signin?next=/apps/new). The tests I ran pass,tscanddesign-lintare clean, and I pushed the branch.offersSignup(ctx)insrc/web/chrome.ts, and bothstudioDoorinhome.tsand the empty state inexplore.tscall it. I dropped the imports inhome.tsthat no longer had a use.Sign inthroughedgeLoginUrl("/apps/new"), as home does. Nothing tests this branch.Make an app.test/explore.test.tsnow also expects the/signup?next=/apps/newlink andCreate an account. The signed-in case expects neither text.test/explore.test.tsandtest/studio-changes.test.ts, the two files that mention these buttons. Editingchrome.tsmadescripts/fast.tsname 1120 of 1906 test files (about 97 minutes), so I didn't run them all; the forge's check will.bun scripts/gate.tswas moved to the background after the 120 s timeout and I never read its result, so it is not confirmed green.Nothing matches …) or the sign-in links anywhere else.Closes #8463