Public: anyone can read this; the crew can change it.

`/:owner/:name/display` shows a repository's display on main, read-only #9540

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

`GET /:owner/:name/display` now answers on main, read-only, and each `/displays` row links to it. I wrote a lean page for what main can show, not a port of Jay's 731-line `display.ts`.

shipped production is serving it deploy abf00b0

opened this

GET /:owner/:name/display now answers on main, read-only, and each /displays row links to it. I wrote a lean page for what main can show, not a port of Jay's 731-line display.ts.

What it shows

  • Server-rendered, with the securityFloor headers.
  • The display title and layout, and a table of its builds. A build whose repository the viewer reads links to its screenshots and its repository.
  • A build whose repository the viewer cannot read shows its name and version, with "Private" in place of the repository.
  • A bad display.json shows its error. A repository with no display.json, or one the viewer cannot read, gets the usual 404.

src/display/launch.ts I trimmed it to repoShotsUrl only. Jay's version imports arcade/host and appsRuntime, which main lacks.

Left out

  • The four submit handlers and the arcade host, as the issue says.
  • Covers: no coverResponse and no pin_demos port.
  • The sidebar, player, info panel, drag-to-reorder and title picker.
  • The /display/demo/:id/* routes, which means no download or screenshots link for a private build.

Tests and checks

  • test/display.test.ts has four tests: the title and pinned build show, with the security headers; no display.json gives a 404; an unreadable repository gives a 404; and /displays links to each display page.
  • Those pass, as do displays-list, display-model, openapi-routes, here-manifest and palette-roster.
  • bun scripts/gate.ts, bun x tsc --noEmit and bun scripts/design-lint.ts are clean.
  • I did not run the full suite: scripts/fast.ts named 1424 files for this diff, so the forge's check will do that on the push.
  • No palette entry was added, so no roster changed.
  • docs/design/areas/display.md is new and says the page adds no component class, since it reuses the existing table.

The commit carries Co-authored-by: Jay Moran.

To try it: open /displays, then any title link, or go to /<owner>/<repo>/display directly.

🤖 Generated with Claude Code

Closes #9531

commented

GET /:owner/:name/display now answers on main, read-only, and each /displays row links to it. I wrote a lean page for what main can show, not a port of Jay's 731-line display.ts.

What it shows

  • Server-rendered, with the securityFloor headers.
  • The display title and layout, and a table of its builds. A build whose repository the viewer reads links to its screenshots and its repository.
  • A build whose repository the viewer cannot read shows its name and version, with "Private" in place of the repository.
  • A bad display.json shows its error. A repository with no display.json, or one the viewer cannot read, gets the usual 404.

src/display/launch.ts I trimmed it to repoShotsUrl only. Jay's version imports arcade/host and appsRuntime, which main lacks.

Left out

  • The four submit handlers and the arcade host, as the issue says.
  • Covers: no coverResponse and no pin_demos port.
  • The sidebar, player, info panel, drag-to-reorder and title picker.
  • The /display/demo/:id/* routes, which means no download or screenshots link for a private build.

Tests and checks

  • test/display.test.ts has four tests: the title and pinned build show, with the security headers; no display.json gives a 404; an unreadable repository gives a 404; and /displays links to each display page.
  • Those pass, as do displays-list, display-model, openapi-routes, here-manifest and palette-roster.
  • bun scripts/gate.ts, bun x tsc --noEmit and bun scripts/design-lint.ts are clean.
  • I did not run the full suite: scripts/fast.ts named 1424 files for this diff, so the forge's check will do that on the push.
  • No palette entry was added, so no roster changed.
  • docs/design/areas/display.md is new and says the page adds no component class, since it reuses the existing table.

The commit carries Co-authored-by: Jay Moran.

To try it: open /displays, then any title link, or go to /<owner>/<repo>/display directly.

🤖 Generated with Claude Code

commented

The check failed on two gate rules, and the gate now passes locally. Both rules read commit messages and wanted a line the first commit didn't have. I pushed an empty commit, 378b536d, that adds both lines. There's no code change, so I didn't re-run the tests.

  • Why now: second half of parked #9466. /displays already lists displays, but none could be opened.
  • Try: open /displays on the preview and follow a title link to /<owner>/<repo>/display.

I used a "Why now" line because I don't know the pipeline number. If you want a Pipeline: #N line instead, give me the number.

This pull adds GET /:owner/:name/display, read-only. It takes a repository's display.json and shows its title, layout and pinned builds as a table. /displays rows now link to it. Everything else in Jay's page stays out for now: the submit handlers, covers, the player, the sidebar and the arcade host.

I have not seen the forge's check run on 378b536d yet.

🤖 Generated with Claude Code

Changes requested — before the latest push

The page itself is sound: server-rendered, 404 for no display.json or an unreadable repo, private builds hide owner/name, output escaped, tests cover the box 3 behaviours. Two misses against the list:

  1. Both doors: the terminal has a /displays screen (src/tui/screens/displays.ts) but no way to open one repository's display. Add a screen in src/tui/screens/ (title, layout, builds, the same open/private split as the page, gated by the same displayOf/displayItems readability), with its entry registered where AGENTS.md says, and a test of it.
  2. Add docs/features/display.md with the how-to (route, what it shows, 404 rules, how to reach it in the terminal). docs/features/displays.md exists for the list; the single display has none.

Also: /displays row link goes to ${base}/display but the test only checks href presence; fine. I could not verify from the clone that the commits carry Co-authored-by: Jay Moran (box 6); make sure at least the first commit and any new ones do.

commented

I added the terminal screen and the feature doc, and pushed them as e842bdc4.

Terminal screen. src/tui/screens/display.ts is new. It shows the title and layout, then one line per build, built from the same displayOf and displayItems calls as the page.

  • A build whose repository the viewer reads names it. Any other says "private" and nothing more.
  • A repository with no display.json, or one the viewer cannot read, shows "No display here". The screen checks this itself, as well as the command, because the screen is exported.
  • The command is "owner/repo — Display" in a repository's palette. I registered it in src/tui/screens/workspace.ts next to Iterations, because AGENTS.md says an entry offered to everyone stays out of ENTRIES. It is offered whenever the viewer can read the repository. I did not check for a display.json first, because hasDisplay answers false until its first read finishes. A repository without one just gets the "No display here" screen.
  • test/tui-display.test.ts covers the screen's content, the open/private split, the not-found case and which viewers are offered the command.

Feature doc. docs/features/display.md covers the route, what it shows, the 404 rules and how to reach it from /displays and the terminal.

Jay Moran credit. Every commit on the branch carries Co-authored-by: Jay Moran <[email protected]>, including the first (0509c34).

Checks. The new tests pass, along with the existing palette and iterations terminal tests. The gate and tsc are clean. Five tests skipped because this sandbox has no working browser. I haven't seen the forge's check run on e842bdc4 yet.

On your note about the /displays link: I left that test as it was, because the page test already asserts both hrefs.

Approved

Approved. The read is gated by loadRepo (canRead) before displayOf, so a missing display.json, a missing repo and an unreadable repo all give the same 404. Private builds show name and version only, on both the page and the terminal. Output goes through html``. The terminal screen re-checks canRead and its command is offered to readers only. docs/features/display.md holds the how-to, not README. The design doc names no new class. The tests cover both doors. Earlier asks (terminal screen, feature doc) are met. Non-blocking: the Jay Moran trailer should be on every commit; I could not see the branch commits locally, so I trust the builder that it is.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs