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

A signed-out visitor who taps Make it yours signs up and lands on their own fork, not on the home page #16616

opened this

Check · Review · Land · Live — Its check is red. Next: builder, its check is red.

Ready to land

Signed out, "Make it yours" now goes to sign-up carrying the app's page. Signing up still doesn't make the fork on its own, and the new owner isn't shown first-steps. The new test and the existing explorer, deadends and make-it-yours tests pass.

Notes · 11 files · +135 −21

stopped failed before it answered deploy 7bfbef5

Check failed: check failed: gate: rule "both doors": this pull edits src/web/pages/first_step…Check of 7bfbef5checked against main at 583a790fast tier: red in 27s

Website spec: 25 findings (report only)

Look

9 pages beside main · 0 new to this pull

/apps

main

at f411bbe ·

this pull

In the dark

main

at f411bbe ·

this pull

at 7bfbef5 ·

/changelog

main

at f411bbe ·

this pull

In the dark

main

at f411bbe ·

this pull

at 7bfbef5 ·

/docs

main

at f411bbe ·

this pull

In the dark

main

at f411bbe ·

this pull

at 7bfbef5 ·

/explore

main

at f411bbe ·

this pull

In the dark

main

at f411bbe ·

this pull

at 7bfbef5 ·

/looks/failed

main

at f411bbe ·

this pull

In the dark

main

at f411bbe ·

this pull

at 7bfbef5 ·

/looks/missing

main

at f411bbe ·

this pull

In the dark

main

at f411bbe ·

this pull

at 7bfbef5 ·

/notes

main

at f411bbe ·

this pull

In the dark

main

at f411bbe ·

this pull

at 7bfbef5 ·

/review

main

at f411bbe ·

this pull

In the dark

main

at f411bbe ·

this pull

at 7bfbef5 ·

/security

main

at f411bbe ·

this pull

In the dark

main

at f411bbe ·

this pull

at 7bfbef5 ·

opened this

Signed out, "Make it yours" now goes to sign-up carrying the app's page. Signing up still doesn't make the fork on its own, and the new owner isn't shown first-steps. The new test and the existing explorer, deadends and make-it-yours tests pass. tsc, gate and design-lint are clean.

What changed

  • A signed-out visit to /:owner/:name/make-it-yours (the explorer button) redirects to /signup?next=<that page>. ?receipt=1 is kept. src/web/studio/make_it_yours.ts
  • The signed-out "Make it yours" button on an app page links to /signup?next=/owner/name/make-it-yours. src/web/studio/yours_button.ts
  • The new signUpHref in src/web/chrome.ts checks the return path with safeNext and uses sign-in where the forge doesn't offer sign-up.
  • Sign-up already honours next and re-checks it. I reused safeNext, withReturn, offersSignup and signInHref, and wrote no new redirect code.
  • Two existing tests now expect /signup?next=… instead of /signin?next=….
  • A new test in test/make-it-yours-button.test.ts covers the path:
    • signed out redirects to sign-up;
    • the sign-up page carries the app;
    • the visitor returns to the confirm page and no fork exists yet;
    • three repeated POSTs leave exactly one fork;
    • a reload shows "Open mine".
  • A second new test checks that safeNext refuses https://…, //…, backslash, tab and javascript: targets.

What I left out

  • Fork not made on return. The visitor lands on the existing confirm page and taps once; the fork is then made once. Making it on a GET, or minting a signed token at sign-up, would be a bigger change, and a GET shouldn't write.
  • First-steps not shown. First-steps exist only on the home page, so the new owner lands on their fork with the receipt flash, not the first-steps list. Adding them to the repo page is a separate change.
  • Sign-up test shortcut. The test creates a user and session directly instead of going through the sign-up form, which has its own tests.

Try it Signed out, open /explore?q=kind:app and tap "Make it yours". You should arrive at /signup?next=%2F…%2Fmake-it-yours%3Freceipt%3D1. After signing up you return to the preview, and one tap makes the copy.

[
 {"go":"/explore?q=kind:app","look":"tap Make it yours on an app, signed out","expect":"the sign-up page opens, and its Sign in link carries the app's make-it-yours address"},
 {"go":"/alice/garden","look":"signed out, the Make it yours button","expect":"it links to /signup?next=%2Falice%2Fgarden%2Fmake-it-yours"},
 {"go":"/signup?next=//evil.example","look":"sign up","expect":"you land on / and never leave the forge"}
]

The push hook asked for a "Try:" commit, so the branch has a second, empty commit.

Closes #16304

5 earlier comments
commented

Signed out, "Make it yours" now goes to sign-up carrying the app's page. Signing up still doesn't make the fork on its own, and the new owner isn't shown first-steps. The new test and the existing explorer, deadends and make-it-yours tests pass. tsc, gate and design-lint are clean.

What changed

  • A signed-out visit to /:owner/:name/make-it-yours (the explorer button) redirects to /signup?next=<that page>. ?receipt=1 is kept. src/web/studio/make_it_yours.ts
  • The signed-out "Make it yours" button on an app page links to /signup?next=/owner/name/make-it-yours. src/web/studio/yours_button.ts
  • The new signUpHref in src/web/chrome.ts checks the return path with safeNext and uses sign-in where the forge doesn't offer sign-up.
  • Sign-up already honours next and re-checks it. I reused safeNext, withReturn, offersSignup and signInHref, and wrote no new redirect code.
  • Two existing tests now expect /signup?next=… instead of /signin?next=….
  • A new test in test/make-it-yours-button.test.ts covers the path:
    • signed out redirects to sign-up;
    • the sign-up page carries the app;
    • the visitor returns to the confirm page and no fork exists yet;
    • three repeated POSTs leave exactly one fork;
    • a reload shows "Open mine".
  • A second new test checks that safeNext refuses https://…, //…, backslash, tab and javascript: targets.

What I left out

  • Fork not made on return. The visitor lands on the existing confirm page and taps once; the fork is then made once. Making it on a GET, or minting a signed token at sign-up, would be a bigger change, and a GET shouldn't write.
  • First-steps not shown. First-steps exist only on the home page, so the new owner lands on their fork with the receipt flash, not the first-steps list. Adding them to the repo page is a separate change.
  • Sign-up test shortcut. The test creates a user and session directly instead of going through the sign-up form, which has its own tests.

Try it Signed out, open /explore?q=kind:app and tap "Make it yours". You should arrive at /signup?next=%2F…%2Fmake-it-yours%3Freceipt%3D1. After signing up you return to the preview, and one tap makes the copy.

[
 {"go":"/explore?q=kind:app","look":"tap Make it yours on an app, signed out","expect":"the sign-up page opens, and its Sign in link carries the app's make-it-yours address"},
 {"go":"/alice/garden","look":"signed out, the Make it yours button","expect":"it links to /signup?next=%2Falice%2Fgarden%2Fmake-it-yours"},
 {"go":"/signup?next=//evil.example","look":"sign up","expect":"you land on / and never leave the forge"}
]

The push hook asked for a "Try:" commit, so the branch has a second, empty commit.

commented

<!-- look-pages 1a540a97560b --> Look pages for 1a540a9, from the gate:

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

A signed-out visitor who taps Make it yours now goes to /signup?next=…, carrying the app's make-it-yours path. The copy is made once, on the return after sign-up. The four failing tests were still asserting the old /signin?next= redirect, so the code was right and the tests were stale.

I changed those assertions to /signup?next= in test/friend-journey.test.ts, test/explore-fork.test.ts, test/guest-contribute.test.ts and test/explore.test.ts. Those four files now pass (65 tests). bun x tsc --noEmit is clean and scripts/gate.ts --fix changed nothing. I did not run the full suite. The forge runs it on this push.

The gate notes one comment line over 100 columns in src/web/chrome.ts and leaves it for the nightly rewrap on main.

To try it: open /explore signed out, tap Make it yours on an app, and land on sign-up with the app carried through.

[{"go":"/explore","look":"tap Make it yours on any app while signed out","expect":"lands on /signup?next=<the app's make-it-yours path>, not /signin"}]
commented

<!-- look-pages 1a541a3c87cd --> Look pages for 1a541a3, from the gate:

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

The feedback is the gate's automatic note on which pages it will picture for 1a541a3: /, /docs, /explore and 28 more, inferred from the files this pull changes. It doesn't ask for a change, so I made none and pushed nothing.

The inference is right. The edit to src/web/chrome.ts is a link target on the Make it yours button. That file is imported by most routes, which is why the list is long. The page that shows the change is /explore, signed out.

The review step from my last message still applies: open /explore signed out, tap Make it yours on an app, and you should land on /signup?next=<the app's make-it-yours path>.

Changes requested — before the latest push

The signed-out tap now reaches /signup carrying the app, and the redirect is safe (safeNext, falling back to sign-in where there is no sign-up). That is box 1. But the issue's title is that the visitor lands on their own fork, and this head stops short: after sign-up the visitor is returned to the confirm page and must tap again; no fork is made on return and no first-steps are shown (the description says so). Fix first: carry the intent through sign-up so the return makes the copy once (the POST is already idempotent) and lands on the fork with first-steps (src/web/pages/first_steps.ts exists; show it for a new owner). Then make the whole-path test go through the real sign-up form rather than createUser and assert the landing is /erin/garden with first-steps. Also: test/explore-fork.test.ts still slices '/signin?next=' (same length by luck); and the safeNext import in make-it-yours-button.test.ts sits above the bun:test import, out of the file's order. No page markup changed, so no design finding.

commented

A signed-out visitor who taps Make it yours on an app page now signs up, has the copy made once on return, and lands on /erin/garden with a Next steps block. The tests I ran pass: the make-it-yours, explore, friend-journey, guest-contribute and first-steps suites. bun x tsc --noEmit and design-lint are clean. I did not run the full suite; scripts/fast.ts named 2,732 files, so the forge's check does that.

What changed

  • Return from sign-up: the button's sign-up link carries ?welcome=1 through to the return. If the account was made in the last 30 minutes, the confirm page submits itself from its own origin with the existing requestSubmit script, and the form keeps the flag. The POST is idempotent, so a repeat opens the copy rather than making a second one. I did not use a GET that mutates.
  • Landing: the POST redirects to /<you>/<app>?welcome=1. The app page then shows the owner the Next steps block (firstSteps, with an optional per-step href), with one step, "Tell the crew something", linking to #tell. It is not shown without the flag or to anyone but the owner.
  • Tests: the whole-path test now posts the real /signup?next=… form and asserts the landing is /erin/garden?welcome=1 with id="first-steps", and that there is exactly one copy. A second test checks that a link saying welcome does nothing for an account older than 30 minutes. I also fixed the stale /signin?next= slice in test/explore-fork.test.ts and moved the safeNext import in make-it-yours-button.test.ts into order.

Where it falls short of "lands on their own fork"

  • Verified members only: the auto-copy works only for a member with a verified email. A brand-new self-signed-up account is a guest, so the return shows the Help build this page, not a copy. The test promotes and verifies erin, as an admin and the email link would. If the forge should admit or verify on sign-up, that is a separate policy change.
  • No script: without JavaScript the visitor taps once more on the confirm page.
  • Explore link: the explore link keeps ?receipt=1 and returns to the receipt page, not to the fork. The welcome flow is only on the app page's button.
  • First steps: nextStepsFor only produces them on a spawned forge, so I reused the firstSteps renderer with one fixed step rather than that logic.

The 30-minute rule: welcome=1 is not signed, so I limited the auto-submit to accounts made in the last 30 minutes. That way a crafted link cannot make a copy for an established user.

[{"go":"/alice/garden/make-it-yours?welcome=1","look":"signed out","expect":"redirect to /signup?next=…make-it-yours%3Fwelcome%3D1"},{"go":"/erin/garden?welcome=1","look":"signed in as erin, who owns the copy","expect":"a Next steps block above the tell box; without ?welcome=1 it is absent"}]
commented

<!-- look-pages 7bfbef52f1ec --> Look pages for 7bfbef5, from the gate:

  • look pages (inferred): this pull changes src/web/chrome.ts, src/web/pages/first_steps.ts, src/web/studio/app.ts and 2 more; the forge pictures / (src/web/chrome.ts), /docs (src/web/chrome.ts), /explore (src/web/chrome.ts) and 28 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs