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

The feed filters by one app with a plain link, kept in the URL, and a filtered feed says which app it shows and how to clear it #13439

Merged opened this

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

Merged

The feed now filters by one app with a plain link, kept in the URL. bun x tsc --noEmit is clean and 84 tests pass, but I did not run the full suite. The forge's check runs it on this push.

Notes

shipped production is serving it deploy 59903fa

opened this

The feed now filters by one app with a plain link, kept in the URL. bun x tsc --noEmit is clean and 84 tests pass, but I did not run the full suite. The forge's check runs it on this push. scripts/fast.ts named 2,008 files, so I ran the feed, home and filter tests plus test/mcp-size.test.ts instead.

What changed

  • /feed?app=owner/name shows only that app's posts. Older-posts, Newest and the live refresh all keep app=.
  • A filtered feed starts with "Showing owner/name" (linked to the app) and a Clear link to /feed.
  • A name that is malformed, unknown or unreadable all get the same answer: the whole feed plus one line, "No app by that name here, so this is the whole feed." The private app's name is never echoed. Posts were already limited to what the viewer can read, and the filter only narrows them.
  • The app name on every feed card is now a link to its filter. This is how a person reaches it.
  • /?app=… for a signed-in person redirects to /feed?app=…, because the feed lives at /feed and / is the home page.
  • The parsing and access check live in src/feed/app_filter.ts.

Tests

  • test/feed-filter.test.ts covers a readable, an unknown and a private app (as another viewer and as the owner), plus the /?app= redirect.
  • I changed one assertion in test/feed-card-markup.test.ts. It asserted the old markup around the app name, which is now a link.

Left out

  • No MCP or API parameter for the filter. The MCP feed tool already takes per-app reads elsewhere, and I did not touch MCP size.
  • The all-apps timeline (?before= and ?show=mine) is ignored while an app is filtered, so the filtered view is always the ranked page.
  • No picture or look of the page.

Try it Open /feed?app=<owner>/<name> while signed in, then /feed?app=nobody/nothing.

The first push was refused by a pre-push hook that wants a "Try:" line in a commit message, so there is an empty commit carrying it.

Closes #13426

5 earlier comments · 2 events
commented

The feed now filters by one app with a plain link, kept in the URL. bun x tsc --noEmit is clean and 84 tests pass, but I did not run the full suite. The forge's check runs it on this push. scripts/fast.ts named 2,008 files, so I ran the feed, home and filter tests plus test/mcp-size.test.ts instead.

What changed

  • /feed?app=owner/name shows only that app's posts. Older-posts, Newest and the live refresh all keep app=.
  • A filtered feed starts with "Showing owner/name" (linked to the app) and a Clear link to /feed.
  • A name that is malformed, unknown or unreadable all get the same answer: the whole feed plus one line, "No app by that name here, so this is the whole feed." The private app's name is never echoed. Posts were already limited to what the viewer can read, and the filter only narrows them.
  • The app name on every feed card is now a link to its filter. This is how a person reaches it.
  • /?app=… for a signed-in person redirects to /feed?app=…, because the feed lives at /feed and / is the home page.
  • The parsing and access check live in src/feed/app_filter.ts.

Tests

  • test/feed-filter.test.ts covers a readable, an unknown and a private app (as another viewer and as the owner), plus the /?app= redirect.
  • I changed one assertion in test/feed-card-markup.test.ts. It asserted the old markup around the app name, which is now a link.

Left out

  • No MCP or API parameter for the filter. The MCP feed tool already takes per-app reads elsewhere, and I did not touch MCP size.
  • The all-apps timeline (?before= and ?show=mine) is ignored while an app is filtered, so the filtered view is always the ranked page.
  • No picture or look of the page.

Try it Open /feed?app=<owner>/<name> while signed in, then /feed?app=nobody/nothing.

The first push was refused by a pre-push hook that wants a "Try:" line in a commit message, so there is an empty commit carrying it.

commented

The gate's "both doors" rule is now satisfied, and the gate reports no rule failures locally. I have not seen the forge's check run on the new push yet.

  • What changed: I added docs/features/feed-app-filter.md, a how-to for /feed?app=owner/name, and listed it in docs/features/README.md. I also committed the comment rewrap that bun scripts/gate.ts --fix made.
  • What I left out: There is no terminal screen. The filter is only a query on the existing /feed link. A No door: line in a commit message says so and points at the how-to.
  • Direction line: Adding a feature doc tripped a second rule, "pipeline first". I answered it with a Direction: line saying this is a small reader-facing filter with no pipeline surface. It is a judgment call, so a reviewer may want to look at it.
  • Mistake: I pushed once before re-running the gate on the committed diff, so one push (5c1b12744) went up with the gate still red. The next push fixed it.
  • Checks run: bun x tsc --noEmit is clean, and test/feature-orphans.test.ts and test/feed-filter.test.ts pass (8 tests).

To try it, open /feed?app=alice/open on the preview. You should see only that app's posts, a "Showing" line and a Clear link. An unknown or private app gives the same empty result.

commented

The feed now filters by one app at /feed?app=owner/name: a "Showing" line names the app, with a Clear link. Unknown and private names get the same answer: the whole feed plus one line.

This push fixes the one failure the check counted against this pull. The home page already uses /?app= to filter its lanes. I had made /?app= redirect to /feed, and that broke the home-flow test "the filter shows one app, and its lanes listen only for that app's events". I removed the redirect from src/web/pages/site.ts and dropped my own test that asserted it. /?app= is back to filtering the home lanes, and the feed filter lives only at /feed?app=.

test/home-flow.test.ts, test/feed-filter.test.ts and test/feed-card-markup.test.ts pass locally, and tsc --noEmit is clean. I didn't run the full suite.

The other failure, test/started-from-line.test.ts, is red on main at d3fe125 too, so the check did not count it against this pull. I did not touch it.

To try it, open /feed?app=alice/open and see only that app's posts.

Changes requested — before the latest push

The filter works and the security shape is right: one answer for unknown and private, validated at the boundary, and read through canRead. Three things to fix in one round.

  1. Both doors: the terminal has no way to filter by app, and the feature doc says so outright. A screen or key in src/tui/ must take the same app filter through the same appFilterOf, with its entry where AGENTS.md says. A "web link only" note does not meet the rule.
  2. docs/features/feed-app-filter.md contradicts the code. It says an unknown or private app gives "an empty feed", but the code shows the whole feed plus one line. Fix the doc.
  3. Filtering silently drops ?before= and ?show=mine. Older posts in a filtered feed only go through the ranked cursor, and the unfiltered timeline link is lost. Say that in the doc, or keep the filter on the timeline.

Phone and keyboard: the app name on each card is now a link whose tap target is a small muted span. Give it a padded hit area on 360px. Add a test for the guest case too: the filter must not leak to a signed-out viewer.

Boxes: 1 and 3 hold. 2 holds. 4 is covered by the three tests.

commented

All three review points and the phone and guest items are addressed and pushed. The tests that cover the change pass, but the full suite did not run here. scripts/fast.ts found the diff too broad, because src/web/style/components.ts is shared. I ran the 15 feed and terminal-feed test files instead, and tsc --noEmit and design-lint are clean.

  • Terminal. On the Feed screen, a shows only the app of the post under the cursor, and a second a shows every app again. It goes through the same appFilterOf as the page, and the Showing <app> line is drawn above the list. Like the page, a filter shows the ranked list, so t and m switch it off. New test: test/tui-feed-app.test.ts.
  • Doc. docs/features/feed-app-filter.md now says an unknown or private app gives the whole feed plus the "No app by that name here…" line. The terminal exemption is gone.
  • ?before= and ?show=mine. I chose to say it in the doc rather than keep the filter on the timeline, because the timeline reads every app. A filtered feed is the ranked page; "Older posts" goes through the ranked cursor and keeps the filter; Clear returns to the unfiltered feed and its timeline. If you would rather the timeline stay filterable, that is a separate change to readTimeline.
  • 360px tap target. The app link on each card now has the same 12px 6px padded hit area, with a matching negative margin, as the time link beside it. The test only checks that the rule is in src/web/style/components.ts, not how it renders at 360px.
  • Guest. A signed-out request to /feed?app=alice/open or /feed?app=alice/secret shows no filter line, no posts and no private name.
commented

<!-- look-pages a3a77e3dd82b --> Look pages for a3a77e3, from the gate:

  • look pages (inferred): "Looks: /feed" is not a page of app.looks in forge.json; this pull changes src/web/studio/feed.ts, src/web/studio/home_last.ts, src/web/style/components.ts; the forge pictures / (src/web/studio/feed.ts), /docs (src/web/studio/feed.ts), /explore (src/web/studio/feed.ts) and 19 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
Approved

Earlier asks are met: the terminal door (a on the Feed screen, through the same appFilterOf, with a test), the how-to in docs/features (README only gets a link), the unknown and private answer, the ?before= and ?show=mine behaviour documented, and a padded tap target for the app link. The live refresh, Older posts and Newest all keep app=, and the filter only narrows what the viewer could already read. The /feed preview redirects me to sign in, so I judged the filtered feed from the source and tests rather than from a rendered page. Two things I would do next. Non-blocking: the tap-target test only greps the CSS source, so add a rendered check at 360px. Non-blocking: the filter is ignored on the all-apps timeline, so add an app option to readTimeline and the filtered view can keep newest-first.

commented

Nothing changed in this round: juniper approved, and both follow-ups are non-blocking, so I left them for a later pull and pushed nothing.

  • Rendered tap-target check at 360px: not done. /feed sits behind sign-in, so a rendered check needs a signed-in browser harness, and this repository has none. The source-level test stays. The link's padded hit area is in src/web/style/components.ts.
  • app option on readTimeline: not done. It would change how a filtered feed is ordered and paged, and docs/features/feed-app-filter.md describes today's behaviour. Today a filtered feed is the ranked page of that app, and the all-apps timeline ignores the filter. The change touches the timeline's cursor and its short-page rule, and the ranked page has no paging beyond its window. I would do it as its own pull, with the doc updated and a test for each of those two.
  • Look pages note: /feed is not in app.looks, so the gate inferred pages from the files this pull touches. I don't see a need to add it, because the filtered feed is behind sign-in and can't be pictured anonymously.
  • Release hold: the note says production is rolling and changes to it should wait. This pull only deploys a preview and doesn't touch production, and it needs a person to merge it, so I took no action on the hold.

The feed filter lives at /feed?app=owner/name. Open it signed in, and the feed shows only that app's posts, says which app it shows, and offers a Clear link. Older posts, Newest and the live refresh keep app=. An unknown or private name gets the same "not found" line. The terminal's Feed screen has the same filter on the a key.

🤖 Generated with Claude Code

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs