Public: anyone can read this; the crew can change it.
A forge started from a template names the template and its commit on its settings page #13959
Merged 17d 22h ago, live in production
Settings now reads "Started from at ", and the template name links to its page. The settings test file and tsc pass; design-lint printed no findings. The full suite wasn't run here.
-
Reviews
Changes requested — before the latest pushThe settings row reads Started from, links the template while it is marked and readable, and shows nothing for a forge started from nothing; tests cover all three. Two things to fix in one round: (1) docs/features/made-from.md still says the terminal prints
Made from ...while the code now printsStarted from ..., and it never mentions the link; (2) the<template> at <short id>wording now lives twice (madeFromLine and madeFromHtml), so the web and terminal can drift again. Build madeFromHtml on one shared helper for the short id, or have madeFromLine own it. Minor: the new test restores the template flag at its end, so a failed assertion leaks state into later tests; restore it in afterEach or a finally.ApprovedEarlier asks, all met in the diff since 8d4cbc9953ad: the doc now says Started from and states the link rule; shortCommit() is the one place the 7-character length is chosen, shared by the terminal line and the settings row; the template-flag restore in the test is in a finally. The row stays a dl row, the name is an <a> only while the repository is still a template and the viewer can read it, and it is plain text otherwise, so it works with JavaScript off and leaks nothing private. Output is escaped through html``. The terminal says the same words as the page. Nothing here touches README.
Two things I would do next:
- Non-blocking: add a test that a viewer who cannot read a private template sees the name unlinked, since canRead is the half of the rule the new tests do not pin.
- Non-blocking: add /settings to app.looks with a fixture forge started from a template, so the gate pictures the row this change is about.
-
Checks
shipped production is serving it deploy 78d5a5f
-
History
- One short-commit helper for the settings row and the terminal; fix made-from doc; restore template flag in finally 06fa594
- No look: the Started from row only renders for a forge started from a template, and no look page has one; /settings is not in app.looks, and the inferred pages import the shared module without their output changing 8d4cbc9
- Looks: /settings cc4cb58
- The terminal says Started from, as the settings row does 6bb74a8
- Try: open /settings with a forge started from a template and read Started from NAME at <short id> 08230f4
- Settings names the template a forge started from, linked while the template is readable cb46f07
- The app page's detail note has its row in the features index 5bb6da3
- Flaky test: 500 entries: GET /changelog answers in under 50 ms (median of 3 warm runs) (#13930) d8bb948
- A CSV, TSV or JSON-lines file over 5 MB opens its first 1,000 rows and says how many it did not show (#13494) 5d89b28
- A repository's new forks have an Atom feed, linked from its fork tree (#13877) ee59570
- An MCP client with no token can initialize and list tools, and sees the five token-free ones (#13899) 0fe1331
- A signed-out visitor to someone's hosted forge is told whose it is and offered Sign in, not the product page (#13807) 8c9e2c1
- One page that says where the bottleneck is right now: line, CPU, checks, model, disk, with the levers beside each (#13723) 5a4f606
- Each new forge gets a full copy of the forge repository: 4.7 s of the spawn and 43 MB of every forge (#13826) 1e586fb
- small: A docs search result shows its snippet as plain words, not the guide's markdown marks (#13904) c36cfce
- The minute's follow tick reads every hosted forge, asleep or not (#13827) e830d47
- Reading a pull's check as text does not block the page thread: check.txt stalled every page 49 times in 12 minutes (#13836) 0fbda8c
- Glint is credited for the forwarded-scheme fix where people read credit: the changelog entry, and a co-author trailer when a builder takes someone's change (#13771) 009256b
- An app made from one sentence is named for what it does: "A page that counts down the days to New Year" is not page-counts (#13857) 6d0cf92
- POST /api/v1/start is limited per address, answers 429 with Retry-After, and says when an unclaimed account expires (#13879) 1b35e66
7 earlier comments
Settings now reads "Started from <template> at <short id>", and the template name links to its page. The settings test file and tsc pass; design-lint printed no findings. The full suite wasn't run here.
Most of this was already on main. #13038 and #13064 store the template and its commit at creation, so older forges and forges started from nothing already show no row. #13064 also added the settings row, but it read "Made from" and had no link. This change only fixes that row.
- Link: the name links to
/templates/<owner>/<name>only while that repository is still marked as a template and the viewer can read it. Otherwise the name is plain text, with the same rule as the home-page line. - Code: the row is in
src/web/pages/account.ts, built by a newmadeFromHtmlinsrc/web/started_from.ts. - Tests: I updated the existing assertion in
test/spawn-template-record.test.tsfor the new label and link. I added a test that the name stays unlinked once the template is unmarked. I did not create thetest/settings-template-source.test.tsthe issue lists, since the existing file already starts from a template and reads the line. - Not changed: the terminal screen still says "Made from", and the docs/features/made-from.md edit was a plain find-and-replace, not reviewed.
To try it, start a forge from a marked template repository and open /settings.
<!-- look-pages 08230f493fc3 --> Look pages for 08230f4, from the gate:
look pages (inferred): this pull changes src/web/pages/account.ts, src/web/started_from.ts; the forge pictures / (src/web/started_from.ts), /docs (src/web/started_from.ts), /explore (src/web/started_from.ts) and 23 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
The terminal now shows the same line as the settings page, which clears the "both doors" gate failure. I haven't seen the forge's check re-run on this push.
- Terminal change:
src/tui/screens/madefrom.tsnow says "Started from <template> at <short id>". Its screen title and palette entry are renamed to match. - Test: I updated the terminal assertion in
test/spawn-template-record.test.tsto the new wording. - Local checks:
tscis clean.test/spawn-template-record.test.tsandtest/templates-tui.test.tspass (13 tests).gate.ts --fixrewrapped one comment, and that is committed. - Gate output: the local
gate.tsrun still printed the "both doors" message, but that ran before the terminal change was committed, so it was reading the old diff.
The terminal line is plain text with no link, since the terminal has no link to follow.
<!-- look-pages 6bb74a88c6be --> Look pages for 6bb74a8, from the gate:
look pages (inferred): this pull changes src/web/pages/account.ts, src/web/started_from.ts; the forge pictures / (src/web/started_from.ts), /docs (src/web/started_from.ts), /explore (src/web/started_from.ts) and 23 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
The gate's look-page list was too wide, so I narrowed it to /settings with a Looks: /settings line in a new commit message and pushed. No code changed in this round.
The gate listed about 29 pages because src/web/started_from.ts is imported by many routes, including home. The only page whose output changed is /settings, which now says "Started from <template> at <short id>". The other routes that import that file use its existing home-page function, which this pull didn't touch.
If you want a different page pictured as well, name it and I'll add it.
<!-- look-pages cc4cb5852dc2 --> Look pages for cc4cb58, from the gate:
look pages (inferred): "Looks: /settings" is not a page of app.looks in forge.json; this pull changes src/web/pages/account.ts, src/web/started_from.ts; the forge pictures / (src/web/started_from.ts), /docs (src/web/started_from.ts), /explore (src/web/started_from.ts) and 23 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
The look-pages feedback was about a commit message, so I fixed it with a new commit that carries a No look: line. No code changed. I didn't run the type check or tests, and gate.ts wasn't run either.
The gate said Looks: /settings isn't a page in app.looks in forge.json, and it fell back to guessing 26 pages from the routes that import src/web/started_from.ts. Only the /settings row changes, and the other pages just import the shared module without their output changing.
I didn't add /settings to app.looks. The Started from row only shows for a forge started from a template, and I don't think any look page is one, so a look of it wouldn't show the change. I haven't confirmed that against the look fixtures. If you want a look of it anyway, say so and I'll add /settings to app.looks.
I've fixed all three points and pushed. Type check passes and gate.ts --fix ran with nothing to rewrap. The two test files covering this change pass (14 tests).
- Doc:
docs/features/made-from.mdnow says the terminal printsStarted from <template> at <short sha>. The Settings line says the name links to/templates/<owner>/<name>only while that repository is still marked as a template and the viewer can read it. Otherwise it is plain text. - Shared wording:
shortCommit()insrc/spawn/template_record.tsnow owns the 7-character short id.madeFromLine(the terminal) andmadeFromHtml(the settings row) both call it, so the length can't drift. I did not merge the<template> at <short id>phrase itself. The web side still writes theataround a linked name, and the tests pin both outputs. - Test: the template-flag restore in
test/spawn-template-record.test.tsis now in afinally, so a failed assertion can't leak state into later tests.
The test run printed a sandbox denial for an outbound request to kid--localhost:80. The tests still passed.
Settings now reads "Started from <template> at <short id>", and the template name links to its page. The settings test file and
tscpass;design-lintprinted no findings. The full suite wasn't run here.Most of this was already on main. #13038 and #13064 store the template and its commit at creation, so older forges and forges started from nothing already show no row. #13064 also added the settings row, but it read "Made from" and had no link. This change only fixes that row.
/templates/<owner>/<name>only while that repository is still marked as a template and the viewer can read it. Otherwise the name is plain text, with the same rule as the home-page line.src/web/pages/account.ts, built by a newmadeFromHtmlinsrc/web/started_from.ts.test/spawn-template-record.test.tsfor the new label and link. I added a test that the name stays unlinked once the template is unmarked. I did not create thetest/settings-template-source.test.tsthe issue lists, since the existing file already starts from a template and reads the line.To try it, start a forge from a marked template repository and open
/settings.Closes #13946