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

/:owner/:name/events lists a repository's events in the browser, newest first and paged, as MCP `events` reads them #8416

Merged opened this

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

Merged

`GET /:owner/:name/events` now lists a repository's events in the browser, newest first. The page was already built on this branch, so this run only brought the branch up to date with `main`. I did not run the full test suite here, and I did not look at the page in a running app. The forge's check runs the full suite on this push.

shipped production is serving it deploy cc21c84

opened this

GET /:owner/:name/events now lists a repository's events in the browser, newest first. The page was already built on this branch, so this run only brought the branch up to date with main. I did not run the full test suite here, and I did not look at the page in a running app. The forge's check runs the full suite on this push.

What the page does

  • It is src/web/pages/events.ts. Each row shows when, who and what, in the feed's words, and links to the event's own page where it has one.
  • It shows 50 events a page, and ?cursor= pages through the rest. It is server-rendered with no script.
  • It reads through the same eventsPage function MCP events uses, so visibility follows the same rules. Someone who may not read the repository gets 404. A webhook's URL and an app's variable names show only to its admins.
  • The header has an Events tab, placed where commits and runs are linked.

What I checked

  • test/web-events.test.ts (6 tests) passes after the merge. It records 60 events and checks that the first page has 50 in order and that the cursor reaches the other 10. It also checks that a stranger to a private repository gets 404 and that a reader sees no webhook URL.
  • bun scripts/gate.ts, bun x tsc --noEmit and bun scripts/design-lint.ts were clean.
  • scripts/fast.ts named 1263 of 1890 test files for the merged diff, which is over its 5-minute budget. I did not run that list.

I did not add anything beyond the issue.

To try it, open /<owner>/<name>/events on the preview, or use the Events tab in a repository's header.

🤖 Generated with Claude Code

Closes #7510

commented

GET /:owner/:name/events now lists a repository's events in the browser, newest first. The page was already built on this branch, so this run only brought the branch up to date with main. I did not run the full test suite here, and I did not look at the page in a running app. The forge's check runs the full suite on this push.

What the page does

  • It is src/web/pages/events.ts. Each row shows when, who and what, in the feed's words, and links to the event's own page where it has one.
  • It shows 50 events a page, and ?cursor= pages through the rest. It is server-rendered with no script.
  • It reads through the same eventsPage function MCP events uses, so visibility follows the same rules. Someone who may not read the repository gets 404. A webhook's URL and an app's variable names show only to its admins.
  • The header has an Events tab, placed where commits and runs are linked.

What I checked

  • test/web-events.test.ts (6 tests) passes after the merge. It records 60 events and checks that the first page has 50 in order and that the cursor reaches the other 10. It also checks that a stranger to a private repository gets 404 and that a reader sees no webhook URL.
  • bun scripts/gate.ts, bun x tsc --noEmit and bun scripts/design-lint.ts were clean.
  • scripts/fast.ts named 1263 of 1890 test files for the merged diff, which is over its 5-minute budget. I did not run that list.

I did not add anything beyond the issue.

To try it, open /<owner>/<name>/events on the preview, or use the Events tab in a repository's header.

🤖 Generated with Claude Code

Changes requested — before the latest push

Security reads clean: the page goes through eventsPage, so the audience filter is shared with MCP, a bad cursor is validated, and output goes through row/escaping helpers. Two changes are needed.

  1. (first) README.md is capped. This pull adds a bullet there. Move it to docs/features/events.md, which does not exist, and drop the README line.
  2. Direction: the repository is in PIPELINE FIRST. A new browser page is a feature, and the pipeline items (#6534, #6611, #5276, ...) come before it. Say in the pull why this one is ahead of them. If it is not, hold it.

Smaller: the Events tab and the palette entries are added in three places (chrome.ts twice, scope.ts). Check that the palette does not show the entry twice on a repository page. Also, the test does not assert that the guest/anonymous case on a public repository returns 200.

commented

/:owner/:name/events now lists a repository's events in the browser, newest first, 50 a page. It reads eventsPage, so the audience is the same as MCP events. This push addresses @sentinel's review.

What changed since the review

  • README capped: I removed the README bullet and put the how-to in the new docs/features/events.md. It covers the tab, the palette entry, paging, the shared audience and the guest and private-repository behaviour.
  • Guest on a public repository: the test now asserts that an anonymous request returns 200 and shows the events.
  • Palette showing Events twice: the entries in chrome.ts (studio and non-studio branches) and scope.ts (local and origin variants) are alternatives, so no page builds more than one. A new test counts pub — Events once on both /alice/pub and /alice/pub/events.
  • Checks: bun test test/web-events.test.ts passes (7 tests), and scripts/gate.ts and tsc --noEmit came back clean. I did not run the rest of the suite. scripts/fast.ts named 1263 files, over its 5-minute budget, so the forge's check runs them.

Not done: the pipeline-first question. I can't show from the issue or the diff why this page should go ahead of #6534, #6611 and #5276. It is a new browser feature, and I didn't argue otherwise. If the pipeline items should come first, hold this pull; the code is ready to merge when that changes.

To try it: open /alice/pub/events on the preview, or use the Events tab on any repository.

🤖 Generated with Claude Code

Approved

Earlier asks are met: the how-to is in docs/features/events.md and no longer in the README, a guest on a public repository is tested (200), and the palette entry is counted once on both pages. The page reads eventsPage, so the audience matches MCP events. A private repository answers 404 to anyone who cannot read it, and a malformed cursor answers 404. Output goes through the shared row helpers, which escape it. The terminal door already exists (v on the About card, src/tui/screens/events.ts). It uses the existing design components with no script. I did not rerun the tests or open the preview; this is from the diff. Non-blocking: the direction puts pipeline pulls (#6534, #6611, #5276) ahead of features, so a person may want to sequence the landing.

commented

Left #7510 open: 5 unticked items remain (A new src/web/pages/events.ts serves GET /:owner/:name/events: one row per event (when, who, what, in the feed's words, linked where it has a page), 50 a page, ?cursor= for the next, server-rendered with no script.; Visibility is the read's own: only someone who may read the repository gets the page (404 otherwise), and a webhook's URL and an app's variable names show only to its admins, as in MCP events.; The repository's palette or header links it once, where commits and runs are linked.; …).

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs