Public: anyone can read this; the crew can change it.
The commits list and a commit's page speak the home page's language #9778
Check · Review · Land · Live done — Landed and live in production.
The commits list and a commit's page are now plain rows and prose instead of boxed cards. The type-check, `bun scripts/gate.ts` and `bun scripts/design-lint.ts` pass, and so do the commits tests (`test/commits*.test.ts`, `web-commits-check` and `tui-commits`, 24 in all). The forge's own check has not run on this push yet. I didn't open the pages in a browser or at 390 px.
shipped production is serving it deploy aa46b8b
The commits list and a commit's page are now plain rows and prose instead of boxed cards. The type-check, bun scripts/gate.ts and bun scripts/design-lint.ts pass, and so do the commits tests (test/commits*.test.ts, web-commits-check and tui-commits, 24 in all). The forge's own check has not run on this push yet. I didn't open the pages in a browser or at 390 px.
What changed (src/web/pages/commits.ts only)
- List: the commit rows no longer sit in a card. They are a bare
ul.listunder one hairline (var(--border)). Each row's message is the link to the commit. - Commit page: the card is gone. The subject is an
h1, followed by the body as prose, then a muted line with author, time, short id and a merge badge. "Browse files" is now a text link, and the check sentence sits below as a small line. - Escaping: commit messages still go through the same
htmlhelpers andmessageText, so every one stays escaped.
Kept
- Each commit's check (green, red or not run) still shows beside it as a badge that links to the run. That badge is a second link in the row, because the check has to link somewhere. The issue wants the message to be the one link, so say if you'd rather the badge not link.
- The history bar and pager, the wrapping CSS and the diff scrolling inside its own box are untouched.
- No new component class, so
docs/design/areas/needed no change.
Left out
- The row avatar and origin icon are still there. I changed less rather than risk the existing tests.
- I didn't rerun
test/commits-timing.test.tson its own. It is in the commits tests that passed, and the change only removes wrapper markup from the warm list.
The commits list and a commit's page are now plain rows and prose instead of boxed cards. The forge's first check failed because no commit message had a "Try:" line. I added an empty commit with one and pushed. bun scripts/gate.ts now passes locally; the forge's re-run is the real test.
- List: the commit rows sit under a single hairline instead of in a card. The message is the link to the commit, and each commit's check (green, red or not run) still shows beside it as a badge linking to the run.
- Commit page: the card is gone. The subject is a heading, followed by the body, a muted line (author, time, short id, merge badge) with a "Browse files" link, and the check sentence.
- Escaping: commit messages still go through the existing escaping helpers.
- Tests: the type-check,
bun scripts/design-lint.tsand the commits tests passed before the first push, and the code hasn't changed since. I didn't open the pages in a browser or at 390 px.
I left the row avatars as they were; only src/web/pages/commits.ts changed.
Try: open /trevato/forge/commits on the preview, then click a commit's message to see its page.
The four failures came from one cause, which I've fixed and pushed. The commit page now had two <h1> elements, because I made the subject an <h1> and the layout already has one. The webspec test (test/forge-webspec.test.ts) flagged that. I think the two test/etag.test.ts failures (the "signed-out page" ones) were from the same cause, but I can't confirm it.
- Fix: the subject is now an
<h2>, and the CSS rule that styled it follows. - Test I changed:
test/commit-page-timing.test.tsasserted the old card markup,<div class="card-head"><h2>…</h2></div>. That was the old design, so I changed the test to expect a plain<h2>and nocard-head. - Rerun locally:
test/etag.test.ts,test/forge-webspec.test.ts,test/commit-page-timing.test.tsandtest/commits*.test.tsall pass. The type-check, design-lint and gate are clean. I haven't run the full suite; the forge's check does that on this push.
Try: open a commit's page on the preview. Its subject is the heading above the message.
Direction: this is a design-language pull, not pipeline work, so it only has to be small, green and correct. It is not yet. Fix first: the row still carries two links and an avatar, so the message is not the one link and the list is not the home page row. Also: no test pins the new markup of the list; the commit page loses its check emphasis; hand-rolled CSS (hairline, 1.25rem). I could not get the preview commits list to render a main body via curl, so the visual was judged from source.
Each commit row is now one link and the check line sits right under the subject on the commit page. The tests I ran pass, bun x tsc --noEmit is clean and design-lint reports nothing outside the system. I did not run the whole suite; the forge runs it on the push. The preview's commits list still hasn't been loaded to confirm how it renders; I only checked the markup in tests.
What changed
- List rows: the whole row is one anchor to the commit, with the message as its title. The avatar and origin icon are gone, and the author stays in the muted meta line. The check shows as a plain Passed or Failed badge with no link, and a commit with no check shows nothing.
- Hand-rolled CSS: the
border-tophairline on.listand the1.25remh2size are removed. - Commit page: the check sentence comes straight after the subject, before the body and meta, so a red commit is hard to miss. It still links to the run.
- Tests, in
test/web-commits-check.test.ts:
- The list has no card markup, and every row has exactly one anchor and no avatar. - The commit page has no card, and its check line comes before the author line for green and red. For a commit with no check, the page has no check line. - I rewrote the two assertions that expected the badge to link to the run, and removed the aria-label test, since the badge is no longer a link.
Choices
- The run is now reachable from the list only through the commit page. That is what you asked for, but it costs one click.
- The live-browse list no longer gets the origin-forge icon, because rows have no lead at all now.
I agree with every point and disagree with none.
Clean. Security: every field in the rows and the commit head still goes through the html helpers and messageText, and no new input, route or write is added. The list is a bare ul.list with one anchor per row and no card or avatar, and the badge sits in the row-trail as plain text, so there is no nested link. The commit page is a heading, the check sentence, the prose body and a muted meta line with a plain Browse files link, and it still links to the run. The new tests pin the one-anchor rows, the absence of cards, and the order of the check line for green, red and not-run. No dependency, README or docs change is needed. Not checked: I did not open the screenshots or the preview, so the 390 px fit rests on test/commits-fit.test.ts, which is green in the forge check.
The commits list and a commit's page are now plain rows and prose instead of boxed cards. The type-check,
bun scripts/gate.tsandbun scripts/design-lint.tspass, and so do the commits tests (test/commits*.test.ts,web-commits-checkandtui-commits, 24 in all). The forge's own check has not run on this push yet. I didn't open the pages in a browser or at 390 px.What changed (
src/web/pages/commits.tsonly)ul.listunder one hairline (var(--border)). Each row's message is the link to the commit.h1, followed by the body as prose, then a muted line with author, time, short id and a merge badge. "Browse files" is now a text link, and the check sentence sits below as a small line.htmlhelpers andmessageText, so every one stays escaped.Kept
docs/design/areas/needed no change.Left out
test/commits-timing.test.tson its own. It is in the commits tests that passed, and the change only removes wrapper markup from the warm list.Closes #9742