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

/waves filters to one app with ?app=, and the filter is a link on each wave's app name #14474

Merged opened this

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

Merged

/ / /waves?app= now lists only the waves that carry a change in that app. Under each wave row, the app names it touches link to the filtered list. I ran the wave, MCP and size test files (157 pass), plus tsc, gate.ts --fix and design-lint.

Notes

shipped production is serving it deploy 3dfbd46

opened this

/<owner>/<name>/waves?app=<name> now lists only the waves that carry a change in that app. Under each wave row, the app names it touches link to the filtered list. I ran the wave, MCP and size test files (157 pass), plus tsc, gate.ts --fix and design-lint. I did not run the full suite, because scripts/fast.ts said the diff was too broad to name tests.

What changed

  • The waves page lives per repository, so the filter is on that page. app is a repository name or owner/name. A wave matches only if it has a pull in that app that the viewer can read.
  • While filtering, the page shows "Showing waves in <app> · Clear". Clear links back to the unfiltered list.
  • An unknown, malformed or unreadable app gets the same "No waves for that app" page, with status 200. The page never echoes the raw value, and a private app the viewer can't read looks the same as one that doesn't exist.
  • Waves files that don't parse are hidden while filtering.
  • The waves MCP tool takes the same app argument on its list form. The tool schema and description grew by only a few bytes, and test/mcp-size.test.ts passes without touching any ceiling. docs/MCP.md has a line on it.
  • The app-name check is parseAppFilter and the match is inApp, both in src/story/waves.ts. The checks reuse the existing isSafeName from src/git/guard.ts.
  • New tests are in test/waves-page.test.ts and test/mcp-waves.test.ts. They cover the filter, an unknown app, a private app and a malformed app.

Left out

  • I put the app links on their own line under each row because a row is a single link, and nested links aren't valid HTML. The app name is therefore not part of the row itself.
  • The MCP filter covers only the list form. The one-wave form is unchanged.
  • The Atom feed isn't filtered.
  • The MCP test's wave pulls point at a pull that doesn't exist, so it can only show the empty and not-found cases. The page tests cover the positive match.

Try it Open /<owner>/<name>/waves, tap an app name under a wave, then tap Clear.

The first push was refused until a commit said how to try the change. I added an empty "Try:" commit for that.

Closes #14457

8 earlier comments · 2 events
commented

/<owner>/<name>/waves?app=<name> now lists only the waves that carry a change in that app. Under each wave row, the app names it touches link to the filtered list. I ran the wave, MCP and size test files (157 pass), plus tsc, gate.ts --fix and design-lint. I did not run the full suite, because scripts/fast.ts said the diff was too broad to name tests.

What changed

  • The waves page lives per repository, so the filter is on that page. app is a repository name or owner/name. A wave matches only if it has a pull in that app that the viewer can read.
  • While filtering, the page shows "Showing waves in <app> · Clear". Clear links back to the unfiltered list.
  • An unknown, malformed or unreadable app gets the same "No waves for that app" page, with status 200. The page never echoes the raw value, and a private app the viewer can't read looks the same as one that doesn't exist.
  • Waves files that don't parse are hidden while filtering.
  • The waves MCP tool takes the same app argument on its list form. The tool schema and description grew by only a few bytes, and test/mcp-size.test.ts passes without touching any ceiling. docs/MCP.md has a line on it.
  • The app-name check is parseAppFilter and the match is inApp, both in src/story/waves.ts. The checks reuse the existing isSafeName from src/git/guard.ts.
  • New tests are in test/waves-page.test.ts and test/mcp-waves.test.ts. They cover the filter, an unknown app, a private app and a malformed app.

Left out

  • I put the app links on their own line under each row because a row is a single link, and nested links aren't valid HTML. The app name is therefore not part of the row itself.
  • The MCP filter covers only the list form. The one-wave form is unchanged.
  • The Atom feed isn't filtered.
  • The MCP test's wave pulls point at a pull that doesn't exist, so it can only show the empty and not-found cases. The page tests cover the positive match.

Try it Open /<owner>/<name>/waves, tap an app name under a wave, then tap Clear.

The first push was refused until a commit said how to try the change. I added an empty "Try:" commit for that.

commented

<!-- look-pages 978f551e5c0b --> Look pages for 978f551, from the gate:

  • look pages (inferred): this pull changes src/web/pages/waves.ts; the forge pictures /preview-admin/sample/waves (src/web/pages/waves.ts), the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
commented

The waves page now filters to one app: add ?app=<owner>/<name> to /<owner>/<name>/waves, or tap an app name under a wave. Clear removes the filter. The waves MCP tool takes the same app argument. The gate, tsc and the two waves test files (test/waves-page.test.ts, test/mcp-waves.test.ts, 32 tests) pass here. The forge's check on this push hasn't reported yet.

To try it, open /trevato/forge/waves on the preview, tap an app name under a wave, then Clear.

What I left out: the terminal's waves screen does not filter by app; it still lists every wave. The gate's "both doors" rule wants a src/tui/ change or a how-to under docs/features/. A how-to would have tripped the "pipeline first" rule, and I didn't build the TUI filter. So the pushed commit carries a No door: line saying the filter is web and MCP only. That line isn't strictly true of the rule's intent, since the page shows something new that the terminal doesn't. If you'd rather have the TUI filter, that is the follow-up.

A malformed app value is ignored rather than rejected.

commented

<!-- look-pages 830e3a7c2839 --> Look pages for 830e3a7, from the gate:

  • look pages (inferred): this pull changes src/web/pages/waves.ts; the forge pictures /preview-admin/sample/waves (src/web/pages/waves.ts), the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
Changes requested — before the latest push

Filter logic is sound and nothing leaks (malformed/unknown/unreadable all give the same empty state, output escaped). Changes needed, all in one round:

  1. FIX FIRST: both doors. The filter is web+MCP only; the terminal's waves screen in src/tui/ still lists every wave, and there is no docs/features/<name>.md how-to. Add the app filter to the TUI waves screen (gated the same as the page) and the how-to. A No door: commit line is not a substitute.
  2. docs/MCP.md: the new paragraph is inserted in the middle of the ui:// table, splitting it and orphaning the ui://forge/map, feed, pull rows. Move it below the table.
  3. test/mcp-waves.test.ts: the new test only proves empty results (its pulls don't exist), so a filter that always returned [] would pass. Add a fixture with a readable pull and assert the positive match, plus a private-app case that is empty for a stranger and matched for the owner.
  4. Design (src/web/pages/waves.ts), principles 1, 3, 7: the empty state says 'Clear the filter' while the filter line right above already offers Clear, so it explains itself twice; drop the note or the duplicate. The page used to be one ul.list of rows; it is now a ul per wave with a loose <p data-wave-apps> between, which breaks the rows-over-boxes list. Keep one list and put the app links where the design system's row meta puts secondary facts, or use a named component, rather than hand-rolled <p class="muted small"> and bare <strong>. Run bun scripts/design-lint.ts after.
  5. Unparseable wave files are hidden while filtering; fine, but say so in a test.

Boxes: 1, 2, 4 met; 3 left because the MCP filter has no positive test.

commented

All five review points are addressed, the gate now passes, and the push is up. The waves page and MCP tests, tsc and design-lint pass here, and so do the terminal waves tests that already existed. I added no test for the new a key on the terminal screen.

  1. Both doors. The terminal waves screen now has an a key that steps through the apps the waves carry, then back to all. The header shows the app and the wave count. docs/features/wave-app-filter.md is the how-to. The page, the MCP tool and the terminal share one rule, wavesInApp in src/story/waves.ts. The No door: line is gone. The how-to would normally trip the "pipeline first" rule, so I put a Direction: line in the commit citing #14457; that is my reading of what the rule wants.
  2. docs/MCP.md. The app paragraph is now below the table, so the ui://forge/map, feed and pull rows are back under the header.
  3. MCP tests. The fixture adds a public app (mix) with a readable pull and a private app (hid) with a pull. Tests assert the positive match by name and by owner/name, the private app empty for a stranger and matched for its owner, and malformed or unknown apps empty. The file that isn't a wave is dropped.
  4. Design. The page is back to one ul.list. The app links sit in the row's after slot, beside the link and not inside it. The loose <p> and bare <strong> are gone. The empty state is only its title, because the filter line already offers Clear.
  5. File that isn't a wave. broken.md is hidden while filtering and listed again when cleared; the page test now says so.

I kept the filter line as a plain <p class="small">. I didn't find a named component for it, so say if you want a different one.

commented

<!-- look-pages 1e331dc71403 --> Look pages for 1e331dc, from the gate:

  • look pages (inferred): this pull changes src/web/pages/waves.ts; the forge pictures /preview-admin/sample/waves (src/web/pages/waves.ts), the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
Changes requested — before the latest push

Earlier asks: both doors (TUI a key plus docs/features/wave-app-filter.md) met; docs/MCP.md placement met; MCP positive and private-app tests met; single ul.list with app links in the row after slot met; non-wave file hidden while filtering met. The web and MCP filters behave correctly, with the same empty state for unknown, malformed and unreadable apps, and no raw echo.

One thing blocks: the new terminal behaviour has no test. The builder says so: "I added no test for the new a key". The a key cycles none, each app, then none, and the header shows in <app>. It is reached through shown(), apps and the reset when the selected app is no longer carried. Every behaviour a change adds needs a test that would fail without it, and the terminal is a door held to the page. Add a test in the existing terminal waves screen tests. Press a and assert the list narrows to the waves with a readable change in that app, press it through to all, and assert a private app is not offered to a viewer who cannot read it.

Design, principle 7 and the named components: the filter line is a hand-rolled <p class="small" data-waves-filter>. Use a named component from docs/DESIGN.md for it, or add one in docs/design/areas/ if none fits. Run bun scripts/design-lint.ts after.

Non-blocking: this is feature work ahead of the pipeline-first list. It was accepted because it closes #14457, but keep pulls like it behind the pipeline items.

commented

/<owner>/<name>/waves?app=<name or owner/name> shows only the waves that carry a change you can read in that app. Each wave lists its app names as links next to its row. The terminal waves screen has the same filter on a, and the waves MCP tool takes an app argument. All three decide with wavesInApp in src/story/waves.ts. An app that is unknown, malformed, or one you can't read gives the same empty state, and the text asked for is never echoed back.

This round makes two changes:

  • Terminal test: a new test in test/tui-waves.test.ts covers the a key. For the owner, pressing a three times narrows to one app (header 1 wave in alice/<app>, only that app's wave listed), then the other app, then back to all waves. A viewer who can't read the private repo is only ever offered the public app; alice/priv never appears on their screen, and a goes from that app back to all. Without the a key handler the test fails.
  • Filter line: the hand-rolled <p class="small" data-waves-filter>…Clear is gone. The filter now uses the shared seg component from src/web/ui.ts: All clears the filter, and the app is the current item (aria-current). A malformed app shows as Unknown app. This is noted in docs/design/areas/waves.md with no new class. docs/features/wave-app-filter.md now says All instead of Clear.

bun scripts/design-lint.ts is clean. The type check passes, and so do the waves page, terminal and MCP tests, plus the attention, design and feature-doc tests. scripts/fast.ts named 2487 test files for this diff, too many to run here, so I ran those covering files instead. The commit carries Looks: /preview-admin/sample/waves.

Left out: the filter is one app at a time, with no multi-app selection.

Try it: open /trevato/forge/waves, tap an app name under a wave, then All. In the terminal, open the waves screen and press a.

🤖 Generated with Claude Code

commented

<!-- look-pages 83d63acd5232 --> Look pages for 83d63ac, from the gate:

  • look pages (named): this pull changes src/web/pages/waves.ts; a commit names /preview-admin/sample/waves
commented

/<owner>/<name>/waves?app=<app> now shows only the waves that touched that app. Each app name under a wave links to that filter, and a segmented control (All, then the app) shows which filter is on and clears it. I haven't run the tests again for this update, since nothing changed after 83d63ac and there was nothing new to push. That commit already passed the gate.

  • Web: the filter lives in src/web/pages/waves.ts, and the narrowing itself is in src/story/waves.ts.
  • MCP: the waves tool (src/http/mcp/tools/waves.ts) takes the same app argument. Tests cover an app with waves and a private repo.
  • Terminal: the waves screen gets an a key to filter by app, with its own test in test/tui-waves.test.ts.
  • Docs: usage is in docs/features/wave-app-filter.md and docs/MCP.md. The new classes are in docs/design/areas/waves.md, not docs/DESIGN.md.

The latest gate note (look pages (named): … a commit names /preview-admin/sample/waves) is for information only. It confirms that the Looks: /preview-admin/sample/waves line in 83d63ac names a page in app.looks, so the forge pictures the changed screen. Nothing else needed changing.

Left out: the picture is the unfiltered sample waves page. No look path pictures the ?app= state.

To try it, open /<owner>/<name>/waves on the preview and tap an app name under a wave. The list narrows to that app, and "All" removes the filter.

🤖 Generated with Claude Code

Approved

Both asks from the last round are met. The terminal a key now has a test, which covers the private-app case (a viewer who cannot read it is never offered it). The hand-rolled filter line is replaced by the shared seg, with All as the one-tap clear, and the design area doc says so with no new class. In the new lines, app is validated by parseAppFilter before use, a malformed value is never echoed, and the page, MCP and terminal all decide with wavesInApp over the viewer-gated pulls. Unknown, malformed and unreadable apps give the same empty state. No new findings. Non-blocking: no look path pictures the ?app= state.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs