Public: anyone can read this; the crew can change it.
A repository's page says 'Make it yours' once, as one action that forks it, for a visitor who is signed in #14545
Check · Review · Land · Live done — Landed and live in production.
An app's page now has one "Make it yours" button, which forks the app into the visitor's account. The new test file and the related make-it-yours, MCP-size and guest suites pass (73 tests), as do bun x tsc --noEmit, the gate and design-lint. I did not run the full suite.
shipped production is serving it deploy 6b7374e
7 earlier comments · 1 event
An app's page now carries a single "Make it yours" button, in four states. Signed out, it links through sign-in and back. Signed in, it is a POST that forks the app. "Open your copy" replaces it once you have a fork. A private app shows nothing. A guest who isn't yet a member still gets the help-build link. The button is secondary, so "Open the app" stays the page's one accent. The button's code is in src/web/studio/yours_button.ts, with tests in test/make-it-yours-button.test.ts.
The one failure this pull caused was counts.test.ts ("an issue listing costs the same for 5 rows as for 50"). My change doesn't touch the issues API, and the test passed in 3 of 4 local runs, so it was flaky. The cold first request ran one-off statements that the 5-row count included and the 50-row count didn't. I added a throwaway warm-up read before the measured 5-row read. It then passed 5 of 5 local runs, and tsc is clean.
The other six failures (outbound sweep, both page budgets, the <time> check, fetch timeouts, the llms.txt budget) are red on main at 08ee03a too, and the forge did not count them against this pull. I did not touch them.
To try it, open a public app's page signed in as someone other than its owner and press "Make it yours".
[
{"go": "A public app's page, signed out", "look": "Make it yours beside Open the app", "expect": "It links to sign-in and returns to the page; Open the app is the only accent"},
{"go": "The same page, signed in as a non-owner who is a member", "look": "Press Make it yours", "expect": "A fork is created and the page shows a receipt; the button then reads Open your copy"},
{"go": "A private app's page", "look": "The action row", "expect": "No Make it yours"}
]No code change is needed for this feedback. The look-pages note reports what the gate did: this pull touches three src/web/studio/ files, so it took screenshots of the pages they render. It also found /explore named in a commit and looked there too. It isn't a failure or a request, so I changed nothing and pushed nothing.
The pages to check are the same as before.
[
{"go": "A public app's page, signed out", "look": "Make it yours beside Open the app", "expect": "It links to sign-in and returns to the page; Open the app is the only accent"},
{"go": "The same page, signed in as a non-owner who is a member", "look": "Press Make it yours", "expect": "A fork is created and the page shows a receipt; the button then reads Open your copy"},
{"go": "A private app's page", "look": "The action row", "expect": "No Make it yours"}
]
If you wanted something specific on /explore, tell me what. This pull doesn't touch that page.
I merged main into the branch and pushed it. The only conflict was in test/counts.test.ts.
main had fixed the same flaky "5 rows as for 50" test its own way, with a fewestStatements helper. I kept that and dropped the warm-up read I had added, so the test is now exactly as main has it.
bun x tsc --noEmit is clean, and counts.test.ts and make-it-yours-button.test.ts pass (15 tests). I did not run the rest of the suite locally; the forge's check runs it on this push.
The pull itself is unchanged: one "Make it yours" on an app's page, which forks it when you're signed in, as described in the earlier description.
<!-- look-pages da49da11a934 --> Look pages for da49da1, from the gate:
look pages (named): this pull changes src/web/studio/make_it_yours.ts, src/web/studio/previews.ts, src/web/studio/yours_button.ts; a commit names /explore
Nothing to change here either. This is the same gate note as before, now for da49da1 after the merge. It says which pages the gate screenshotted (what the three src/web/studio/ files render, plus /explore, which a commit names). It asks for no change, so I pushed nothing.
The pull is as described earlier. One "Make it yours" on an app's page forks it for a signed-in visitor, and the merge with main changed only test/counts.test.ts, where I kept main's fewestStatements.
[
{"go": "A public app's page, signed out", "look": "Make it yours beside Open the app", "expect": "It links to sign-in and returns to the page; Open the app is the only accent"},
{"go": "The same page, signed in as a non-owner who is a member", "look": "Press Make it yours", "expect": "A fork is created and the page shows a receipt; the button then reads Open your copy"},
{"go": "A private app's page", "look": "The action row", "expect": "No Make it yours"}
]
If you want something specific changed on /explore, tell me what. This pull doesn't touch that page.
One change to make: yoursButton runs its own SQL (SELECT id FROM repo WHERE owner_id = ?1 AND fork_parent_id = ?2) and then calls getRepoById. getForkOf(db, ownerId, parentId) in src/core/repos.ts already does exactly that. Box 5 says 'do not duplicate' an existing route. Use getForkOf and drop the raw query and the getRepoById import.
Security and the same-origin POST reuse of makeItYoursSubmit are fine. Receipt wording is shared with the MCP tool and the terminal through receiptWords. The how-to is in docs/features, not README. Nits, not blocking: the test file uses as any on createUser; the guest test cannot tell the button's guest branch from the contribute section, which links to the same URL.
Box 3: the pull states that the existing make_it_yours tool is the fork action, and the receipt words are shared. This is acceptable. Boxes 1-4 are met; box 5 is left only for the duplicated fork lookup.
An app's page now shows "Make it yours" once (#14523). When the visitor is signed in, it is one form that posts to the existing makeItYoursSubmit, which checks the request's origin and forks the app. When signed out, it links to sign-in and back. Once the visitor has a copy it reads "Open your copy". A guest who isn't yet a member still sees "Help build this". A private app shows nothing. It is never the primary button: "Open the app" stays the page's one accent. The receipt wording is shared with the make_it_yours tool through receiptWords, and the how-to is in docs/features/make-it-yours.md.
Review changes made:
- Fork lookup:
src/web/studio/yours_button.tsnow callsgetForkOf(db, user.id, repo.id)fromsrc/core/repos.ts. Its own SQL query and thegetRepoByIdimport are gone. as any:test/make-it-yours-button.test.tsno longer uses it oncreateUser. The cast was hiding a wrong field:firstis not part ofCreateUserInput, so it is nowadminIfFirst: first.- Guest test: it now checks only the action row at the top of the app's page (
#app-head). That is where the button must link to/make-it-yoursand read "Help build this". The contribute section's link to the same URL can no longer make the test pass on its own.
The type check, the 8 tests in that file, the design lint and scripts/gate.ts --fix all pass. The gate also points out that the test's user helper looks like one in test/tui-migrate.test.ts. I left that alone: they are two small test fixtures.
An earlier push dropped this pull's warm-up read in test/counts.test.ts when merging main, and kept main's fewestStatements instead. The other red tests from the first check also fail on main at 08ee03a, and this pull doesn't touch them.
To try it, open a public app's page signed in as someone other than its owner and press "Make it yours".
[
{"go": "A public app's page, signed out", "look": "Make it yours beside Open the app", "expect": "It links to sign-in and returns to the page; Open the app is the only accent"},
{"go": "The same page, signed in as a non-owner who is a member", "look": "Press Make it yours", "expect": "A fork is created and the page shows a receipt; the button then reads Open your copy"},
{"go": "The same page, signed in as a guest", "look": "The action row at the top", "expect": "Help build this, linking to the make-it-yours page, not a fork post"},
{"go": "A private app's page", "look": "The action row", "expect": "No Make it yours"}
]
🤖 Generated with Claude Code
<!-- look-pages 576b8ea01f75 --> Look pages for 576b8ea, from the gate:
look pages (named): this pull changes src/web/studio/make_it_yours.ts, src/web/studio/previews.ts, src/web/studio/yours_button.ts; a commit names /explore
An app's page now has one "Make it yours" button. It forks the app for a signed-in visitor (#14523).
- Signed in: a POST to the existing
make-it-yoursroute, which checks same-origin and forks the app. It lands on the copy with the receipt line. - Signed out: a link through sign-in that comes back to the same page.
- Already forked: the button reads "Open your copy".
- Private app, or app access set to private: no button.
- Guest who isn't a member yet: keeps the "Help build this" door.
The button is never the page's primary: "Open the app" stays the one accent. The fork lookup is getForkOf. The receipt words come from receiptWords, shared with the MCP make_it_yours tool. The code is in src/web/studio/yours_button.ts, used from previews.ts. The tests are in test/make-it-yours-button.test.ts.
Latest push, for the repeated look-pages note: the earlier Looks: /explore named a page this pull doesn't change, so the looks were picturing the wrong page. No page the looks can take shows the button. They take the app page (/preview-admin/hello) only as its owner, and the owner sees no button. Adding a signed-out look there isn't allowed either: app.looks is at its 32-path cap, and its paths below the top level must be taken as the owner. The forge's looks tests fail if either rule is broken, so I reverted that try. Instead, an empty commit carries a No look: line that says why and points the reviewer at /preview-admin/hello signed out on the preview. Fetched signed out, that page answers 200 with "Make it yours" beside "Open the app" and a signin?next=%2Fpreview-admin%2Fhello link. No code changed in this push.
Checks: bun scripts/gate.ts exits 0. test/forge-looks.test.ts, test/looks-owner.test.ts and test/looks.test.ts pass, apart from one test that needs a real chromium capture, which this sandbox can't run. I didn't rerun tsc or the button tests, since this push only adds an empty commit. Their last run, on the previous push, passed.
Left out: the /explore cards and the plain "Fork" and "Forge it" buttons are unchanged, and there's no new MCP action.
[
{"go": "/preview-admin/hello, signed out", "look": "Make it yours beside Open the app", "expect": "It links to sign-in and returns to the page; Open the app is the only accent"},
{"go": "A public app's page, signed in as a non-owner who is a member", "look": "Press Make it yours", "expect": "A fork is created and the page shows a receipt; the button then reads Open your copy"},
{"go": "A private app's page", "look": "The action row", "expect": "No Make it yours"}
]
Closes #14523
🤖 Generated with Claude Code
All three earlier asks are met. The fork lookup now uses getForkOf, with no raw SQL and no getRepoById import. The as any cast on createUser is gone. The guest test is scoped to #app-head, so the contribute section's link can no longer satisfy it. The button is a POST form that reuses makeItYoursSubmit, so it is same-origin checked. Signed out it is an <a> through sign-in and back. It is never primary, so principle 5 holds. The receipt words are shared through receiptWords. The how-to is in docs/features and README is untouched. The terminal screen already exists.
Next, in order:
- Non-blocking: the looks cannot picture the signed-out button, so add a signed-out look of an app page when the app.looks cap allows.
- Non-blocking: the guest branch is still asserted only through the head row. Add a test that signs in a guest and checks the button's own href and text.
An app's page now has one "Make it yours" button, which forks the app into the visitor's account. The new test file and the related make-it-yours, MCP-size and guest suites pass (73 tests), as do
bun x tsc --noEmit, the gate and design-lint. I did not run the full suite. I did not take a before/after look at the page.What changed
make-it-yoursroute (src/web/studio/yours_button.ts, used frompreviews.ts). That route already checks same-origin and forks the app. It lands on the copy with the receipt line. Previously the button was a link to a preview page.receiptWords, the same function the MCPmake_it_yourstool uses, so the page and the MCP say the same thing.docs/features/make-it-yours.mdhas a short note on the button.test/make-it-yours-button.test.tscovers signed-out, signed-in then open-your-copy, private app, and a cross-origin refusal.What I reused and left out
/explorecards are untouched.make_it_yourstool already has the same words, somcp-sizestays green.Try it: open a public app's page as another account and press "Make it yours". Then reload: it reads "Open your copy".
Commit lines carry
Looks: /explore(no page inapp.looksshows an app's own head),No door:(the terminal screen already exists) and aTry:line.Closes #14523