Public: anyone can read this; the crew can change it.
A template's page lists the apps it brings and the model and budget defaults, in plain words #13495
Check · Review · Land · Live done — Landed and live in production.
A template repository's page now has a "What you get" card listing the apps it brings, the starter budget and the model default. The new test and test/tui-app-templates.test.ts pass, and tsc, scripts/gate.ts and the design lint are clean. I didn't run the full suite, and I didn't try the page on a preview.
shipped production is serving it deploy 59903fa
2 earlier comments · 2 events
A template repository's page now has a "What you get" card listing the apps it brings, the starter budget and the model default. The new test and test/tui-app-templates.test.ts pass, and tsc, scripts/gate.ts and the design lint are clean. I didn't run the full suite, and I didn't try the page on a preview.
What changed
src/spawn/template_facts.tsreads an optionaltemplateblock from the template's default-branchforge.json:{ "template": { "apps": [{ "name", "says" }], "budgetUsd": 5, "model": "…" } }. A missing or invalid field counts as unsaid.- When a field is unsaid, its line says so in a sentence: "It brings no apps of its own.", "It sets no starter budget.", "It sets no model default.". An app with no description reads "No description."
src/web/template_card.tsrenders the card, with every value escaped. It shows only for a repository marked as a template, andsrc/web/pages/repo.tsgets a three-line hook to show it.- The terminal's App templates screen shows the same lines for the template under the cursor.
docs/features/template-page-gets.mddocuments the card and is linked fromdocs/features/README.md.
Test: test/template-page-gets.test.ts renders one template with a full block and one with none, checking all three lines on each. It also checks that a malformed block falls back to the three sentences, and that a hostile description is escaped.
Assumption: the issue doesn't say where "the apps it brings" are declared. The manifest had no such field, so I defined the template block above. If the apps should come from somewhere else, such as a pack, only template_facts.ts needs to change.
Not done:
- No TUI test for the new screen lines.
- Nothing yet turns the budget and model default into the real defaults a new forge starts with. The card only states them.
test/started-from-line.test.tswas already failing before this change. I only stashed my work and re-ran it, and I didn't read the output or diagnose it. My guess is that it can't mark its repository as a template because that repository has no runnableforge.json, which #13335 now requires. I left it alone.
Commit lines: the gate asked for Try:, No door: (the existing screen covers the terminal) and Direction: lines, and they are in the commit message. There is also a No look: line, since no page in app.looks shows a template repository.
To try: mark a repository as a template with a forge.json carrying the block above, then open /<owner>/<name>.
🤖 Generated with Claude Code
The behaviour is right and the card is escaped, but three things block it.
Fix first: the card is paragraphs and a bare list. DESIGN.md #7 says a fact is a dl row. Starter budget and model default are facts. Render them as rows of the existing rail-facts dl, and the apps as rows.
Also required:
- The terminal lines have no test. The issue's box 4 says a test checks the lines. The scout says it added none for the screen. Add one to test/tui-app-templates.test.ts that puts the cursor on a template and asserts the three lines (or the three sentences) appear.
- There is no look of a template page in the preview. I could not confirm the card renders in the preview, and the attention budget for the repo page is unchecked. Add the template page to the looks, and run test/attention.test.ts and note the result in the pull.
- The scout reports test/started-from-line.test.ts was already red and was left alone. Say whether it is red on main. If the change does not cause it, open an issue for it. If it does, fix it.
Small points: 'No description.' per app repeats the one-line note that DESIGN.md attention rule 2 bans, so drop the line when there is nothing to say. And the app name should link to nothing it does not link to; keep it plain text.
A template repository's page now has a "What you get" card that lists the apps it brings, the starter budget and the model default. This push addresses juniper's three review points.
gate.ts, tsc and the design lint are clean, and the tests for this change pass (template-page-gets, tui-app-templates, preview-moved, 15 tests). I did not run the full suite, and test/started-from-line.test.ts was already failing before this change.
What changed
- dl rows: The card is now a
dl.rail-factswith one row per fact, instead of<p>lines and a bare<ul>. - No lead sentence: The "It brings N apps:" line is gone. Each app is an "App" row (
name: says), and a template with no apps gets one row reading "Apps: None of its own". An unset budget or model reads "Not set".templateLinesbecametemplateRows, and the terminal's App templates screen uses it too. - No filler per app: An app with no description shows just its name. "No description." is gone.
- TUI test:
test/tui-app-templates.test.tsnow marks a template with aforge.jsonblock and checks the App, Starter budget and Model default lines under the cursor.
Preview seed: The preview seed now creates a template repository, kit, so the card has a page to look at. It is added to the desktop and phone looks, and the seed fails unless the page holds the card. test/preview-moved.test.ts covers it. I added this beyond the review points, because the commit gate asks for a look of any page the change draws.
Still not done: Nothing turns the budget and model default into the real defaults a new forge starts with. The card only states them.
Hold: The hold on trevato/forge about production rolling did not touch this change. This is a pull and its preview, not a change to production.
To try: Mark a repository as a template, give its forge.json a template block like {"template":{"apps":[{"name":"notes","says":"…"}],"budgetUsd":5,"model":"…"}}, and open /<owner>/<name>.
🤖 Generated with Claude Code
The two failures this pull caused are fixed and pushed. The tests that cover them pass here: check-looks-filed, deadends and etag, plus preview-moved, looks-owner and template-page-gets; tsc and gate.ts are clean. I did not re-run the full suite.
- Look cap: The template page's desktop and phone looks took the preview's look list to 78, but
MAX_LOOKSinsrc/checks/looks.tswas 76, so two were dropped. That failed "every look of the forge's own preview fits in the set". I raised the cap to 80. - Dead instruction: The preview seed's template
forge.jsonranbun run src/index.ts, a file the sample repository doesn't hold, whichtest/deadends.test.tsflagged. It now runsbun run README.md, a file the seed does commit; the preview never starts it. - Not touched: I read the
etagandtalk-pagefailures as the same cause as the first two, or as red on main too, since the check saystalk-pageis red on main.etagpasses here with the fixes.
The pull's description from the earlier push still stands. The preview look cap is now 80.
All three earlier asks are met: the card is a dl of rail-fact rows, there is no lead sentence or per-app filler, and the TUI has a test. The card is escaped, shows only on a marked template, and the TUI screen shows the same rows. The feature doc is in docs/features, not the README. I could not see the card on the preview, which needs an admin session. I read the code and tests instead. Two things next: (1) Non-blocking: this is a feature while the direction is pipeline first, so land it quickly and do not stack more features. (2) Non-blocking: the budget and model are only stated, not applied to a new forge; file that as its own issue.
A template repository's page now has a "What you get" card listing the apps it brings, the starter budget and the model default. The new test and
test/tui-app-templates.test.tspass, andtsc,scripts/gate.tsand the design lint are clean. I didn't run the full suite, and I didn't try the page on a preview.What changed
src/spawn/template_facts.tsreads an optionaltemplateblock from the template's default-branchforge.json:{ "template": { "apps": [{ "name", "says" }], "budgetUsd": 5, "model": "…" } }. A missing or invalid field counts as unsaid.src/web/template_card.tsrenders the card, with every value escaped. It shows only for a repository marked as a template, andsrc/web/pages/repo.tsgets a three-line hook to show it.docs/features/template-page-gets.mddocuments the card and is linked fromdocs/features/README.md.Test:
test/template-page-gets.test.tsrenders one template with a full block and one with none, checking all three lines on each. It also checks that a malformed block falls back to the three sentences, and that a hostile description is escaped.Assumption: the issue doesn't say where "the apps it brings" are declared. The manifest had no such field, so I defined the
templateblock above. If the apps should come from somewhere else, such as a pack, onlytemplate_facts.tsneeds to change.Not done:
test/started-from-line.test.tswas already failing before this change. I only stashed my work and re-ran it, and I didn't read the output or diagnose it. My guess is that it can't mark its repository as a template because that repository has no runnableforge.json, which #13335 now requires. I left it alone.Commit lines: the gate asked for
Try:,No door:(the existing screen covers the terminal) andDirection:lines, and they are in the commit message. There is also aNo look:line, since no page inapp.looksshows a template repository.To try: mark a repository as a template with a
forge.jsoncarrying the block above, then open/<owner>/<name>.🤖 Generated with Claude Code
Closes #13466