Public: anyone can read this; the crew can change it.
A template card lists the files it will create before it is chosen #16822
Check · Review · Land · Live done — Landed and live in production.
Each template row on /templates now has a Files fold that lists its top-level files and folders. The lists are cut at 40 entries and then say "and N more". bun test on test/templates-page.test.ts and test/tui-app-templates.test.ts passes (20 tests).
-
Reviews
Changes requested — before the latest pushThe fold works in the preview: /templates renders a collapsed 'N entries' fold with escaped code names, server-rendered with no extra request, and it works with JavaScript off. Fixes for one round:
- An empty template repository renders a '0 entries' fold that opens onto nothing. Say 'Holds no files.' (HOLDS_BLANK) instead, as the page already does for blank.
- Principle 8, plain words: the summary reads '2 entries'. The page and docs say 'files', so use 'N files' ('1 file'), and keep 'and N more' inside.
- The Files row is now built twice: holdsRows makes it, then the page filters it out and rebuilds it by hand. Keep one way: split the Files row out of holdsRows so the TUI and the page each use it.
- The tests added in test/templates-page.test.ts have missing semicolons on the new expect lines (and 5 more, f39, f40, README.md). Add them.
- Check on a 360px phone that the 40-name paragraph inside the fold wraps and does not scroll sideways, and that the summary has a visible focus style from the existing tokens.
The terminal needs no change: it shares holdsRows and so gets the 40 limit. Rewrap the long docs line.
ApprovedEvery earlier ask is met. The empty template now says "Holds no files." with no fold. The summary reads "N files" and "1 file". There is one Files row, built from filesRow and runRows. Focus-visible and wrapping styles are added, and the new classes are named in docs/design/areas/templates.md. The preview serves collapsed folds ("2 files", "12 files") in server-rendered HTML with no extra request, and the names are escaped. I opened the preview at this head and saw the Files fold as a collapsed "N files" summary on /templates. The forge pictures are outside what my tools may read, so I did not see them and have no 360px finding.
Two things I would do next:
- Non-blocking: add a test for a template repository with zero files. The "Holds no files." branch in holdsView only has coverage through the blank template.
- Non-blocking: give filesRow and runRows a direct test. The page tests already cover them indirectly.
-
Checks
shipped production is serving it deploy 01e9b02
-
History
- Template Files fold: 'N files', blank when empty, one Files row, focus style 65c0245
- Revert the /templates look: app.looks is full at 32 paths 841ba04
- Look /templates: the Files fold is on it 1498fe5
- Gate lines for the template Files fold 4074ace
- Try: open /templates and open the Files fold under a template 9c40f9e
- A template's row folds its top-level files, up to 40 then a count 6789c10
- Delete the dead exports scripts/unused-exports.ts finds, area by area (#16800) 7f8d28a
- The terminal opens the board's returns, in the same rows as /board/returns (#16798) 6c3a514
- Reverts need two reds on the same test, and close themselves when main goes green (#16721) 62b9907
- The crew says why it is waiting: the pace's reason on the tick, in flow why, and in the idle words (#16722) ab7816e
- A forge revert is exempt from both doors and the test-with-change rule (#16719) 7eb9bda
- Motion that feels native: one strong ease-out, transform and opacity only, interruptible enters, no motion on frequent actions, lint-enforced (#16816) c5744d4
- Crew accounts you can understand: one pool, the account each run spends said plainly, held runs released on any change (#16498) 00fa396
- Stall log: a long-polled runner claim is resting, not in flight (#16712) 708e62f
- Main's full check gets its own shard count (default 8): about 43 → 21 min (#16723) fe10a9b
- Looks write and read through a theme key, so a release that drops the "dark:" prefix can roll safely (#16807) a55af95
- A Windows .reg file reads as a table of keys and values, with what it deletes called out (#16786) 197d228
- Infrastructure keeps what ended in view, offers End only where something exists, and filters places (#16771) 3e3b7ca
- Connect's first step opens the provider's token page with a 44px button (#16805) fc58724
- src/tui/screens/workspace.ts and src/web/highlight.ts split by concept, highlighter grammars loaded only for the file kind opened (#16784) f8c6a37
6 earlier comments
Each template row on /templates now has a Files fold that lists its top-level files and folders. The lists are cut at 40 entries and then say "and N more". bun test on test/templates-page.test.ts and test/tui-app-templates.test.ts passes (20 tests). tsc and design-lint are clean, and gate --fix changed nothing. I didn't run the full suite or the gate.ts and fast.ts steps; the forge runs the whole check on this push.
The code to read this already existed in src/spawn/template_holds.ts: it reads the template's tree, caches by the default-branch tip, and /templates already used it. So I extended it rather than adding a module:
- Limit:
HOLDS_FILES_MAXgoes from 12 to 40. - Fold: the Files row is now a
<details data-files>fold insrc/web/pages/templates.ts. Its summary reads "N entries" (or "1 entry"), and the names sit inside as<code>. Everything is server-rendered and escaped, so first paint needs no extra request. - Fold markup: I used a paragraph of
<code>names rather than a<ul>, because design-lint flags bare lists on this page. - Terminal: the terminal's App templates screen still shows Files as one joined line, from the same data, so it now gets the 40 limit too.
- Docs:
docs/features/template-holds.mdis updated. - Tests: two templates cover the list.
- The starter shows its fold with
forge.jsoninside. - A 45-entry repo shows the first 40, "and 5 more" and "45 entries", and
f40.txtis absent. - A one-file repo shows "1 entry".
- The existing 12-limit assertions are rewritten for 40.
- The starter shows its fold with
Left out: a fold on the New forge picker, and a separate card module. The issue named src/web/template_card.ts, but the rows live in templates.ts.
Try it: open /templates and open the Files fold under a template.
[{"go":"/templates","look":"the Files row under Starter app and under any template repository","expect":"a collapsed fold reading 'N entries'; opening it lists the names in code type, and past 40 ends with 'and N more'"}]
The push first failed the pre-push hook because no commit said how to try the change. I added an empty Try: commit, and the push then went through.
🤖 Generated with Claude Code
<!-- look-pages 9c40f9e3d92c --> Look pages for 9c40f9e, from the gate:
look pages (none): this pull changes src/web/pages/templates.ts but the forge could not trace the route of /settings/security/controls (an inline or wrapped handler), so it could not infer a page; the reviewer decides. A "Looks: <path>" line naming the nearest page, or a "No look: <why>" line (10+ characters), says it
Each template row on /templates now has a Files fold that lists the template's top-level files and folders. It shows the first 40 and then "and N more". bun test passed on test/templates-page.test.ts and test/tui-app-templates.test.ts, and tsc and design-lint were clean. The forge's check on this pull had failed on its "both doors" rule, and I have pushed a fix for that. I haven't seen it re-run, so the verdict is still open.
The check failed because the pull edits src/web/pages/templates.ts and has no change under src/tui/. I haven't touched src/tui/. The terminal's App templates screen already prints the same Files line from the shared holdsRows, so it now gets the 40-entry limit too. The latest commit says so in a No door: line, and adds Looks: /templates for the look-page warning.
- Reuse:
src/spawn/template_holds.tsalready read each template's tree and cached it by the default-branch tip. I raisedHOLDS_FILES_MAXfrom 12 to 40 there instead of adding a module. - Fold:
src/web/pages/templates.tsrenders Files as a<details data-files>with an "N entries" summary. The page is server-rendered with every name escaped, so first paint needs no new request. - Tests: they cover the starter, a 45-entry repo (first 40, "and 5 more",
f40.txtabsent) and a one-file repo. The old 12-limit assertions are rewritten for 40. - Left out: a fold on the New forge picker, and a separate card module.
To try it, open /templates and open the Files fold under a template.
[{"go":"/templates","look":"the Files row under Starter app and under any template repository","expect":"a collapsed fold reading 'N entries'; opening it lists the names in code type, and past 40 ends with 'and N more'"}]
🤖 Generated with Claude Code
<!-- look-pages 4074aceb178b --> Look pages for 4074ace, from the gate:
look pages (none): "Looks: /templates" is not a page of app.looks in forge.json; this pull changes src/web/pages/templates.ts but the forge could not trace the route of /settings/security/controls (an inline or wrapped handler), so it could not infer a page; the reviewer decides. A "Looks: <path>" line naming the nearest page, or a "No look: <why>" line (10+ characters), says it
I added /templates to app.looks in forge.json, so the gate's Looks: /templates line now names a real page. I pushed it and haven't seen the gate re-run. I only checked that forge.json still parses; I ran no tests for this change.
The gate said /templates wasn't in that list. The page is public and the Files fold shows without signing in, so I added it to looks only, not looksAsOwner.
I disagree with one part of the gate's message. It also says it couldn't trace the route of /settings/security/controls and so couldn't infer a page. That is a fault in the tracer and has nothing to do with this change, so I left it alone.
The Files fold itself is unchanged since the last push: it lists up to 40 entries, then "and N more".
🤖 Generated with Claude Code
I reverted the /templates entry in forge.json and pushed. I haven't seen the preview deploy or the gate re-run, and I ran no tests for this revert; git diff origin/main showed no forge.json change.
The preview failed because app.looks already held the 32 paths the forge allows, so my earlier addition made it 33. In place of the look page, the commit carries a No look: line saying the list is full.
The Files fold is unchanged: it lists up to 40 top-level entries, then "and N more".
If a reviewer wants /templates in the looks, one existing path has to come out to make room. I didn't choose which.
🤖 Generated with Claude Code
Each /templates card now shows its files in a fold, with all five review points addressed except the 360px phone check, which I did not run. tsc, design-lint, gate --fix and test/templates-page.test.ts pass. I did not run the rest of the suite.
- Empty template: a template with no files now shows "Holds no files." (
HOLDS_BLANK) instead of a "0 entries" fold. - Wording: the summary reads "N files" ("1 file"), and "and N more" sits inside the fold with the names.
- One Files row:
filesRowandrunRowsare now split out insrc/spawn/template_holds.ts.holdsRowsis just the two joined, so the terminal is unchanged. The page usesfilesRow's pieces andrunRowsdirectly, with no build-and-filter. - Semicolons: added on the
f39,f40andREADME.mdexpect lines intest/templates-page.test.ts. The tests now expect "45 files" and "1 file". - Focus and wrapping:
- Added styles:
.holds summary:focus-visibleuses the same2px solid var(--accent)outline as.why > summary..files-listhasoverflow-wrap: anywhere, so the 40 names should wrap and not scroll sideways. - Phone check not run: I haven't looked at it on a 360px phone, because the sandbox has no browser. Please check that in the preview.
- Class names:
.holdsand.files-listare named indocs/design/areas/templates.md, becausedesign-lintrequired it.
- Added styles:
- Docs: the long line in
docs/features/template-holds.mdis rewrapped and now mentions the "N files" fold and the empty case.
I did not add a test for the empty-template case, so the "Holds no files." path is untested. I did not add a test for the new filesRow and runRows helpers either.
No door: the terminal and docs already match, since the terminal shares holdsRows and gets the 40-name limit.
[
{"go": "/templates", "look": "A repository template's Files row", "expect": "A collapsed fold reading 'N files'; opening it shows the names in code, wrapping, with 'and N more' after them when there are more than 40"},
{"go": "/templates", "look": "Tab to a fold's summary", "expect": "A visible accent outline appears around the summary"},
{"go": "/templates", "look": "The blank template", "expect": "'Holds no files.' with no fold"}
]
Each template row on
/templatesnow has a Files fold that lists its top-level files and folders. The lists are cut at 40 entries and then say "and N more".bun testontest/templates-page.test.tsandtest/tui-app-templates.test.tspasses (20 tests).tscanddesign-lintare clean, andgate --fixchanged nothing. I didn't run the full suite or thegate.tsandfast.tssteps; the forge runs the whole check on this push.The code to read this already existed in
src/spawn/template_holds.ts: it reads the template's tree, caches by the default-branch tip, and/templatesalready used it. So I extended it rather than adding a module:HOLDS_FILES_MAXgoes from 12 to 40.<details data-files>fold insrc/web/pages/templates.ts. Its summary reads "N entries" (or "1 entry"), and the names sit inside as<code>. Everything is server-rendered and escaped, so first paint needs no extra request.<code>names rather than a<ul>, because design-lint flags bare lists on this page.docs/features/template-holds.mdis updated.forge.jsoninside.f40.txtis absent.Left out: a fold on the New forge picker, and a separate card module. The issue named
src/web/template_card.ts, but the rows live intemplates.ts.Try it: open
/templatesand open the Files fold under a template.The push first failed the pre-push hook because no commit said how to try the change. I added an empty
Try:commit, and the push then went through.🤖 Generated with Claude Code
Closes #16317