Public: anyone can read this; the crew can change it.
Every app on /explore carries a 'make it yours' button that forks it into the visitor's forge in one POST #13686
Check · Review · Land · Live done — Landed and live in production.
Almost all of this was already on main, so this pull adds only the test, test/explore-fork.test.ts. The row button, the sign-in return and the same-origin check were already built. bun scripts/gate.ts --fix, bun x tsc --noEmit and the new test pass; I did not run bun test on the rest of the suite.
shipped production is serving it deploy 751373a
Almost all of this was already on main, so this pull adds only the test, test/explore-fork.test.ts. The row button, the sign-in return and the same-origin check were already built. bun scripts/gate.ts --fix, bun x tsc --noEmit and the new test pass; I did not run bun test on the rest of the suite.
What was already there:
- Button on each row: a signed-in visitor gets a one-POST button on every copyable app row (
src/web/studio/explore.ts). - Fork action: the POST goes to
/:owner/:name/make-it-yours(src/web/studio/make_it_yours.ts,src/actions/make_it_yours.ts). - Same-origin: the POST is checked for same origin.
- Signed out: the row links to the same action, and that page sends the visitor to
/signin?next=…, so they return to it after signing in.
What the new test checks:
- Signed out: the row's link leads to
/signin?next=/alice/open/make-it-yours?receipt=1. A signed-out POST is sent the same way and forks nothing. - Private app: an outsider and a signed-out visitor see no row and no button for it. Posting to it directly returns 404 and forks nothing.
- Signed in: one POST forks the app. The test posts without the row's
receipt=1field, so it checks the redirect to the fork at/bob/openand that the fork's parent is set. - Cross-origin: a POST from another origin is refused with 403.
Left alone:
- Receipt page: the row's own button also sends
receipt=1, so a visitor lands on a "bob/x is yours" page with Open mine and Undo rather than straight on the fork. That page is the existing design (#10728, #10976), covered bytest/explorer-make-it-yours.test.ts, so I did not change it. - Private apps for members: a private app does show the button to someone who can already enter it as a member (the #922 rule in
copyable). The issue says a private row "never shows it". I read that as outsiders and left the member case as it is. Tell me if you want it stricter. - No new code:
src/web/pages/explorer.ts, which the issue names, is the file-tree explorer, not /explore. I did not touch it, and there is no new page orsrc/webchange, so no look or terminal screen. The commit saysNo door:.
To try it, run bun test test/explore-fork.test.ts. Or open /explore?q=kind:app signed in, press "Make it yours" on a public app, and you land on the receipt page.
🤖 Generated with Claude Code
Test-only pull; the feature was already on main and the preview row shows the button (make-it-yours?receipt=1). The new test is sound. Two things I would do next: (1) have the test post the row's real form (with receipt=1) and assert the receipt page with Open mine and Undo, since that is what a visitor really sees; (2) decide whether a private app's row should show the button to members, and pin that choice with a test either way. Box 1 is ticked on the reading that the receipt page counts as landing on the fork. Box 3 is ticked for outsiders only; members still see the button on private apps (the #922 rule).
Almost all of this was already on main, so this pull adds only the test,
test/explore-fork.test.ts. The row button, the sign-in return and the same-origin check were already built.bun scripts/gate.ts --fix,bun x tsc --noEmitand the new test pass; I did not runbun teston the rest of the suite.What was already there:
src/web/studio/explore.ts)./:owner/:name/make-it-yours(src/web/studio/make_it_yours.ts,src/actions/make_it_yours.ts)./signin?next=…, so they return to it after signing in.What the new test checks:
/signin?next=/alice/open/make-it-yours?receipt=1. A signed-out POST is sent the same way and forks nothing.receipt=1field, so it checks the redirect to the fork at/bob/openand that the fork's parent is set.Left alone:
receipt=1, so a visitor lands on a "bob/x is yours" page with Open mine and Undo rather than straight on the fork. That page is the existing design (#10728, #10976), covered bytest/explorer-make-it-yours.test.ts, so I did not change it.copyable). The issue says a private row "never shows it". I read that as outsiders and left the member case as it is. Tell me if you want it stricter.src/web/pages/explorer.ts, which the issue names, is the file-tree explorer, not /explore. I did not touch it, and there is no new page orsrc/webchange, so no look or terminal screen. The commit saysNo door:.To try it, run
bun test test/explore-fork.test.ts. Or open/explore?q=kind:appsigned in, press "Make it yours" on a public app, and you land on the receipt page.🤖 Generated with Claude Code
Closes #13660