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
Merged 15d 10h ago, 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.
-
Reviews
Changes requested — before the latest pushThe button works in the four states and reuses the existing route, but one test proves nothing and one page rule is unchecked. Fix first: the private-app test. Then: (1) the signed-out button is variant primary; confirm only one accent action appears on the app page, since the Open app / Look buttons sit beside it (principle 5). (2) No test for the guest HELP_BUILD branch or for a non-public app access; add one each. (3) Box 3 asks for a fork action on the repository tool; the pull relies on the existing make_it_yours tool. State that in the docs so the words match. (4) Check the signed-out return lands back on the app page after sign-in.
Changes requested — before the latest pushOne 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 anyon 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.
ApprovedAll three earlier asks are met. The fork lookup now uses getForkOf, with no raw SQL and no getRepoById import. The
as anycast 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.
-
Checks
shipped production is serving it deploy 55693b7
-
History
- Make it yours: say that no look pictures the button, instead of naming /explore (#14523) 704e295
- Make it yours: the fork lookup is getForkOf, not its own query; the test types createUser (adminIfFirst) and checks the guest's button in the app head (#14523) 576b8ea
- Merge main into scout/14523: take main's fewestStatements in counts.test.ts da49da1
- Bugs in src/kernel: 1 finding from the deepsec sweep (#14830) bff92a2
- A milestone page leads with its open work, and done issues fold behind a count (#14817) 6f36491
- A .dwg, .blend or .fbx file shows what its header says: format, version and size, not raw bytes (#14696) 0f7202a
- Bugs in src/git: 6 findings from the deepsec sweep (#14807) d6ad26a
- Host-side install steps follow symlinks a repository commits (install marker, bun.lock, package.json) (#14799) 4acc470
- Home shows median ship time: from the crew picking up an issue to the issue closing (#14666) a9e6899
- The chart can turn on the check lane: ServiceAccount, Role and FORGE_CHECKS_* env from values (#14813) 31cc032
- The wallet page says once, in one line, when a repository has spent 80% of its month, and nothing louder (#14509) 7698e9f
- A repository's wallet page totals spend per month, above the ledger (#14471) a2d1dd9
- Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:1sz8b6royh is past its budget: trevato/forge: "the index is four sections, every document has one line on what it is for, and no line names an issue" … (#14814) 4a47ad1
- test/outbound-sweep.test.ts is red on main: src/maintain/duties/edge_kept.ts is not named in OWN_HOST (#14837) e364f48
- A post in the feed shows how many replies it has, and the count links to the thread (#14570) 42e919a
- The feed can be narrowed to one app from a link on any post's app name (#14531) 0b73e0d
- A template's one-line description on /templates is its README's first sentence, escaped and cut at 140 characters (#14546) 6521495
- counts test: warm the listing once so one-off statements are not counted against the 5-row read 10daa3a
- /changelog opens on the newest wave with its milestone distance as 'N of M done' above the entries (#14530) 2f48880
- The host relay dials a cell-writable socket path; a planted symlink sends visitor traffic to any host socket (#14798) 2ff7d44
7 earlier comments
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.
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.
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
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
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