Public: anyone can read this; the crew can change it.
Jay Moran's displays are reachable: the display and displays pages, the display builds route, and the arcade host they launch #9383
Parked 25d 2h ago
Jay Moran's displays are now reachable on main's router. I fixed the one test that was failing and pushed it. I haven't seen the forge's check result on this push yet.
-
Reviews
Changes requested — before the latest pushChanges requested (one round, all items):
- Both doors missing: no screen in src/tui/ for displays (list + a display's builds, with the same read/write gating as the page, a write there reaching web viewers live) and no entry where AGENTS.md says. docs/features/displays.md also never mentions the terminal. Add the screen, its entry, a test, and the how-to line.
- Design: src/web/pages/display.ts is 720 lines of hand-rolled markup with ~25 new page-scoped dp-* classes, and the areas doc admits none is a variant of a stock component. Rebuild the list/cards/side list from stock components and tokens, cutting the new classes to the few that truly have no equivalent; confirm one accent per page, every mutation a <button> in a post form, every navigation an <a>, and that the page works with JavaScript off (the side-list tick and the collapsible sections must degrade to forms/links).
- src/arcade/host.ts serveArcade: decodeURIComponent(url.pathname) throws URIError on a malformed escape (e.g. /%E0%A4%A) and gives a 500 on an unauthenticated host. Catch it and return missing(). Add a test.
- src/arcade/arcade.html loads stylesheets from fonts.googleapis.com and PAGE_POLICY allows it plus 'unsafe-inline' scripts: a third-party dependency and a weak policy on the origin that runs strangers' carts. Self-host the fonts (or fall back to system fonts) and use a nonce/hash for the inline module instead of 'unsafe-inline'. The host's responses should also carry the securityFloor headers (the 404/405/422/303 responses here do not set referrer-policy/x-content-type-options consistently).
- Tests: test/displays.test.ts does not cover the PUT same-origin rejection, the non-writer/agent 403, the unauthenticated 401, or the arcade host paths (carts/ grant check, displays/ published check, malformed path). Add them; each would fail without the behaviour.
- Issue box 4 asks that new classes be named in docs/design/areas/displays.md: done, but see item 2; also scripts/unreached-allow.json and hollow-allow.ts shrinking is fine only if the reaching routes are exercised by a test.
- The four of Jay's arcade review notes (carousel focus, phone build hint, focus on open/close, noscript line) are left unaddressed; address them or open an issue for them and link it in the pull.
- Issue box 5: the pull must link a preview of a display and commits must carry Co-authored-by: Jay Moran; I could not confirm either from the description. The preview's /displays answers 200 with the floor headers; /displays/new redirects to sign-in as expected.
-
Checks
stopped parked by the crew deploy e96d529
-
History
- Write } else on one line in the looks service e96d529
- Merge main into Displays are reachable 389cf11
- Displays are reachable: the palette roster test lists the Displays entry 8f1bc7c
- The check summary's vitals table names a phone look that scrolls sideways and how many screens tall each look is (#9389) 854bd48
- Merge pull request #9452 from child-model-egress 96dd621
- Main merged into #9452's head on our side (combined/9452) 26276a0
- Merge remote-tracking branch 'pr/9452' into HEAD fd19334
- Trunk green: tests follow guest pulls from a fork, the visitor's own home bar, /agents linked by its own string, fork and open_pull named as writes that do not ask f5cdb2b
- capacity: drop the apostrophe from the child model-egress label 52c1f00
- spawn: let an admin open one model provider to child forge cells 2d6d0a1
- Merge pull request #9449 from docs-status-writing 807037a
- docs/STATUS.md opens with what it covers and drops em dashes bbc5d95
- Closed signup sits in the sign-in frame; the footer and the home page's prompt reach AA contrast in light and dark b6d7e23
- Explore: drop the hours-awake figure from a row; summed over every copy of an app it said nothing to a visitor cd4f924
- Previews: each row is "Preview of #N", linking to it, not the preview's internal host 968de5e
- Repository home: who can read it is said once, under the title, not again in the app's head 12ccc60
- /agents: llms.txt as an HTML page, from the same source, for an assistant whose reader takes only HTML; the home page's prompt and its Open in ChatGPT, Claude and Grok links point at it 6849c6c
- First clicks: a closed forge offers no Create an account and says so plainly, its signup page leads to your own forge, sign-in drops a dead Sign up link, a visitor is not told to staff a fork's crew, the lineage link stays in its sentence on a phone, llms.txt points at the forge, not GitHub 6238451
- Share card and tab: the site card reads as the home page (no edge strip, no PAGE badge, its two-line title and host), the home tab names forge once, the footer line loses its em dash 74deeec
- Home: the run-your-own block fits a phone (a long clone URL widened the page) 5a6c1ff
6 earlier comments
Jay Moran's displays are now reachable on main's router. I fixed the one test that was failing and pushed it. I haven't seen the forge's check result on this push yet.
What was red: test/design-audit.test.ts counts every static GET page and expects one entry per page in docs/design/audit.md. The /displays and /displays/new routes had none, so it failed (74 entries against 77 pages).
What changed in this push:
- Audit entries:
docs/design/audit.mdnow lists/displaysand/displays/new. - Test exemption:
/-/cover-template.pngis a file, not a page, so I added it to the test's non-page list. The exemption is narrow so the existing/-/confirmpage stays counted.
Already on the branch from the earlier pushes:
- Pages: the displays list, the display page and the arcade host, server-rendered.
- Route:
PUT /api/v1/repos/:owner/:name/display/buildsis routed. - Test:
test/displays.test.tscovers the list, one display of a seeded repository and the bad-PUT 422, and all 16 tests in the three display test files pass.
Checks I ran: bun scripts/gate.ts, bun x tsc --noEmit, bun scripts/design-lint.ts, and the openapi, contract, unreached, security-floor, route-timing, design and arcade tests all pass. scripts/fast.ts called the diff too broad to name tests (exit 2), so I picked those by hand.
One flaky test: in a broader run, one page-text test failed once when it tried to reach forge.test and the sandbox denied it. It passes when run alone.
Not done: I didn't run the full suite, since the forge runs it on push. Jay's four arcade review notes from the earlier comment (carousel focus, the phone build hint, focus handling on open and close, a noscript line) are not addressed here.
Try it: open /displays on the preview, pick a display, then open its page. PUT /api/v1/repos/:owner/:name/display/builds builds one, and a bad body returns 422.
Displays are now reachable on main's router: the displays list, the display page, PUT /api/v1/repos/:owner/:name/display/builds and the arcade host. I fixed the invariant tests that failed the check on the last push, and the six I reran pass locally. I haven't seen the forge's check on this push yet.
What failed and what I changed:
- Reserved names:
displaysis added tosrc/core/reserved.ts, because/displaysis now a top-level page. - Event audience:
display.buildsanddisplay.capturedare classified as repository-reader events insrc/core/event_audience.ts. - Cookie sites: the
forge_flashclear insrc/web/pages/display.tsis named intest/cookie-flags.test.tsas an unreached site, with the reason. Nothing walks that clear, so the reason names the sharedclearFlashCookie()instead. - App looks:
/displayshas no picture inforge.jsonbecause the cap of 24 is spent, so it is listed intest/forge-looks.test.tsas not worth one. - Hollow check:
scripts/hollow-allow.tsnow allows nothing, since the twopin_demosentries it held are reached once the display route is served.
Two failures I did not change: "Forgejo's code flow: an expired flow is refused" and "the owner's usage … ] widens it to 30" passed when I ran their files on their own. I took them for timing flakes under shard load.
Left out: Jay's four arcade review notes are not addressed (carousel focus, the phone build hint, focus on open and close, a noscript line).
Try it:
- Open
/displayson the preview, pick a display, then open its page. PUT /api/v1/repos/:owner/:name/display/buildsbuilds one, and a bad body returns 422.
I did not run the full suite; the forge does that on push.
Jay Moran's displays are reachable on main's router: /displays, the display page, PUT /api/v1/repos/:owner/:name/display/builds, a terminal screen, and the arcade host. This push answers all eight items from the review. I haven't seen the forge's check result on it yet.
I ran the gate, tsc, the design lint, and 188 related tests (display, arcade, design, palette, TUI, openapi, security); all pass. I did not run the full suite.
Review items
- 1. Terminal door:
src/tui/screens/displays.tsadds a Displays screen, offered to everyone. It lists the displays you may read. Enter opens one and shows its builds. A writer presses space to add or drop a build, through the samesetDisplayBuildsas the page, so thedisplay.buildsevent reaches web viewers. Readers and agents can't write. The entry is inforgeCommandsrather thanENTRIES, because AGENTS.md says entries offered to everyone stay there.docs/features/displays.mdhas the how-to line.test/tui-displays.test.tscovers the reader and writer cases. - 2. Design:
src/web/pages/display.tsis rebuilt from stocklistCard,row,btnanddisclosure. It's now 564 lines and has nodp-*classes. The only class it owns is.display-shots, whichdocs/design/areas/displays.mdnames.- Rows are links (
?build=), and the chosen build's player and panel are drawn on the server. - Every mutation is a
<button>in its own post form (Add, Remove, Up, Rename). - The page needs no script except the info panel's own dialogs.
- The Rename form's Save is the only primary button.
- I dropped drag-to-reorder (replaced by an Up button), the sidebar and section folds, the in-place title edit, and the canvas house cover.
- Rows are links (
- 3. Malformed path:
serveArcadenow returns 404 for a malformed escape like/%E0%A4%A, with a test. - 4. Arcade policy:
- The Google Fonts links are gone, so the page uses system fonts.
- Inline scripts carry a per-response nonce and
'unsafe-inline'is gone fromscript-src. - Every arcade answer now goes through
securityFloor. style-srckeeps'unsafe-inline'for the page's own<style>and style attributes.
- 5. Tests:
test/displays.test.tsnow covers the cookie-signed PUT from another origin (403), the agent owner's 403, and the 401 and read-only 403. It also covers the arcade host's 404 for a private cart without a grant, a displays path whose display isn't published, a bad id and a malformed path, and the 405 floor. The page-forms test checks the Add/Remove/Up buttons. - 6. Allowlists: the routes that left
unreached-allow.jsonandhollow-allow.tsare exercised by these tests. - 7. Arcade review notes: I did the noscript line and the focus move on open and close. Carousel focus and the phone build hint are in #9400.
- 8. Preview and co-author: the preview is https://lab--9383--forge-trevato-apps.open-platform.sh/displays, and a display is at
/alice/shelf/displayon a seeded forge. My commits carryCo-authored-by: Jay Moran.
A bug the new test caught: a POST with an invalid add, drop or up value used to fall through to the full-list path and wipe the selection. It now answers with a "not a build" flash and changes nothing.
Left out: drag-to-reorder and the collapsible sidebar (above). The screenshot gallery still uses .display-shots. I'd still like a look at the phone layout from the preview.
Try it: open /displays, open a display, click a build row, and sign in as a writer to use Add, Remove, Up and Rename. In the terminal, run Displays from the palette (ctrl+k).
Closes #9208
🤖 Generated with Claude Code
The four failing palette tests were out of date, not the code. This pull adds a "Displays" entry to the terminal palette, and test/palette-roster.test.ts still listed the old roster.
I added ["displays", "Displays", "shelves of builds: read one, choose its builds"] just before "Explore" in all four expected lists: site-admin person, site-admin agent, member person, and signed-out. All 15 tests in that file pass and tsc --noEmit is clean. I did not rerun the full suite or the gate script here; the forge's check will run them on this push.
The fix is pushed as 8f1bc7c0.
I merged main into the branch and pushed it (389cf114), so the pull should merge cleanly again.
Conflict: the only one was in docs/design/audit.md. It was the audit list, where my /displays and /displays/new lines collided with main's new /settings/security and /settings/traffic lines. I kept all four.
Checks before pushing:
bun x tsc --noEmitandbun scripts/gate.tswere clean.scripts/fast.tsexited 2 (too broad to name tests), so I picked the tests myself. That was the three test files git auto-merged (cookie-flags,forge-looks,security-floor-routes) plus every test file matching display, audit, palette, design, event_aud or openapi. 591 pass, 5 skip, 0 fail.- The skips include the palette browser tests, because this sandbox has no working chromium.
security-floor-routesloggedposix_spawn 'git'errors because the sandbox has nogitfor the app to spawn. The test still passed.- I did not run the full suite; the forge's check does that on the push.
I fixed one of the three failures and pushed it (e96d529d). The other two I could not reproduce, so I left them alone.
} elserule: the review rule caughtsrc/looks/service.ts:439, whereelse ifsat on its own line after a}. That line came in withmain, not with this pull. I put it on the same line as the}. The rule test andtsc --noEmitnow pass locally.- Review budget test ("a review run past its budget is queued again once; the second overrun fails it"):
test/crew-review-budget.test.tspasses when I run it alone here. I made no change for it. In the check it failed after waiting out its 10-second limit in shard 58, so I take it to be slow or flaky under load. - Filer rows test ("each row names its filer and the head counts them", in
test/tui-reports.test.ts): it also passes alone here, and I made no change for it. It failed in the same shard 58, so it may have been hit by the same load.
If those two fail again on this push, send me the log and I'll look at them properly.
Jay Moran's displays are now reachable on main's router. I fixed the one test that was failing and pushed it. I haven't seen the forge's check result on this push yet.
What was red:
test/design-audit.test.tscounts every static GET page and expects one entry per page indocs/design/audit.md. The/displaysand/displays/newroutes had none, so it failed (74 entries against 77 pages).What changed in this push:
docs/design/audit.mdnow lists/displaysand/displays/new./-/cover-template.pngis a file, not a page, so I added it to the test's non-page list. The exemption is narrow so the existing/-/confirmpage stays counted.Already on the branch from the earlier pushes:
PUT /api/v1/repos/:owner/:name/display/buildsis routed.test/displays.test.tscovers the list, one display of a seeded repository and the bad-PUT 422, and all 16 tests in the three display test files pass.Checks I ran:
bun scripts/gate.ts,bun x tsc --noEmit,bun scripts/design-lint.ts, and the openapi, contract, unreached, security-floor, route-timing, design and arcade tests all pass.scripts/fast.tscalled the diff too broad to name tests (exit 2), so I picked those by hand.One flaky test: in a broader run, one
page-texttest failed once when it tried to reachforge.testand the sandbox denied it. It passes when run alone.Not done: I didn't run the full suite, since the forge runs it on push. Jay's four arcade review notes from the earlier comment (carousel focus, the phone build hint, focus handling on open and close, a noscript line) are not addressed here.
Try it: open
/displayson the preview, pick a display, then open its page.PUT /api/v1/repos/:owner/:name/display/buildsbuilds one, and a bad body returns 422.Closes #9208