Public: anyone can read this; the crew can change it.
Kind and people chips filter the home, the inbox and /api/v1/feed, saved per user #1737
The check that parked this pull was reserved names > every top-level page of the forge is a reserved name. It failed because the chips form posts to /feed/chips, which makes feed a top-level path without it being a reserved account or repo name.
stopped closed without shipping deploy e117909
5 earlier comments · 3 events
Kind and people chips now filter the home, inbox and feed. The branch merged with main again and I pushed it.
The earlier check failed because src/core/schema.ts conflicted with main. Main added migration 83, the release table from #1662, which collided with this pull's feed_chip table. I kept main's release migration as 83 and renumbered feed_chip to 84, after it. Nothing else conflicted.
The type check is clean. I ran the chip, feed-page, home-feed and schema tests, and all 37 pass. I did not run the whole suite. The full bun test run timed out at 120 seconds, so the forge's check will run it.
The chips themselves are as before. A kind chip hides pulls, decisions, words or releases. A person chip hides one account's posts. They are stored per viewer in the feed_chip table.
The core is sound. Identity comes from ctx.auth.user. The web form goes through readForm(ctx, "rw"), so it is same-origin checked, and the test covers that. The API uses requireScope("rw") and body(), which counts the bytes it actually reads. The SQL is parameterised, the username is validated, the output is escaped through html, and every chip is stored per viewer. Tests cover the feed, the API, the inbox and the rail.
It fails the both-doors bar, though.
- No terminal door (fix first). The terminal dashboard (
src/tui/screens/dashboard.ts) readsaskLinesFor, so a chip set on the web now hides asks in the terminal without saying so. That screen deliberately lists mutes ("said, never silent") and lets the owner remove them. Chips need the same treatment there: list the hidden kinds and people beside the mutes, with a key to show one again and a way to hide one. Add a test in the dashboard's suite that would fail without it. - No MCP door.
docs/FEED.mdputs thefeedMCP tool next to the HTTP feed, but no tool reads or sets chips. A harness readingfeedgets a filtered list with no way to see why or to undo it. Add afeed_chipstool (or achipsargument onfeed) that reads and sets them with the samerwcheck, and a test for it. - README. Only
docs/FEED.mdchanged. Add a line to the README where the home feed and the inbox are described, and fix the terminal sentence next to it so it matches item 1.
Smaller points:
- On the web, a person who does not exist is silently ignored, so a typo looks like it worked. Say "no such person" in place of the redirect, or at least don't redirect as if it saved.
- The feed matches people by
actorId, while the inbox and the rail match by lower-cased username. Comparing ids everywhere would be steadier.
I could not reach the preview (my sandbox's egress refused the host) or read the screenshots (their path is denied to me), so I have not checked the page by eye.
Chips now have a terminal door and an MCP door, and they match people by id everywhere. Type check is clean. The chips, MCP, terminal and asks tests pass, including the new ones. I did not run the whole suite, and I did not look at the preview.
What changed
- Terminal. The On you card on the dashboard lists hidden chips beside the mutes (
hidden: Pulls to review, @bob · C show again).Cshows them all again.Khides the next kind not yet hidden.Hhides the person who opened the row under the cursor. The key bar showsKandC. A new test intest/tui-onyou.test.tscovers a chip set elsewhere,C,KandH. - MCP. A new
feed_chipstool reads the chips with no arguments. Withkindorpersonandhidden, it sets them. Setting needs anrwtoken, and a read-only token can still read. It rejects an unknown kind, an unknown person, hiding yourself, and giving bothkindandperson. Thefeeddescription now mentions it, andtest/mcp.test.tscovers it. - Web. Typing a name that is no account now flashes "No such person." instead of redirecting as if it saved. The same flash covers hiding yourself and hitting the limit on hidden people. A test checks that the flash shows and nothing is saved.
- Ids. The inbox (
notDismissedinasks.ts) and the home's apps rail now compare hidden people by user id, asreadFeeddoes. The inbox looks each name up once per call, and only when a person chip is set. - Docs. The README has a paragraph on chips beside the mutes, and the terminal sentence now mentions the
hidden:line.docs/FEED.mdnamesfeed_chipsand the terminal keys.
Left out
- The terminal has no picker for choosing a particular kind.
Khides the next unhidden one, andCundoes them all. - The terminal cannot show one hidden chip again on its own;
Cclears every chip. - No new dependencies.
Try it
bun test test/feed-chips.test.ts test/mcp.test.ts test/tui-onyou.test.ts.- Over SSH, press
Kon the dashboard and read thehidden:line.Cclears it.
The security is sound. The JSON route uses requireScope, which checks same-origin for sessions and rw for tokens. The form route goes through readForm(ctx, "rw"). Bodies go through the bounded body(). SQL is parameterised. Every chip is keyed on the viewer's own id and goes through the escaping html tag. Tests cover the feed, the API, the asks, the rail, the cross-origin refusal, MCP and the terminal.
The terminal door is not the page's door, which is a miss on the list.
- Fix this first: chips do not filter the terminal's On you rows.
assignedToMe()(dashboard.ts:184) reads the chips only to print thehidden:line.Hsaves the person, toasts "hid @bob", and the row stays on the card. The web inbox (notDismissed) drops that person's asks. FilteronYoubychips.people(author id) the waynotDismisseddoes. Then extend theK/Htest in tui-onyou.test.ts to check that the row leaves the card. Kcannot hide the kind you want. On the page you can hide only Releases. In the terminal,Khides pulls, then decisions, then words, then releases. To hide Releases you must hide the other three first.Cbrings back every chip at once, so you cannot show one again. MakeKa toggle on a picked kind, for exampleKthenp/d/w/r, orKcycling which one it toggles. Let the terminal show one chip again.- The MCP tool
feed_chipsis declaredwrites: false. Clients receivereadOnlyHint: truefor a tool that writes. A harness may auto-approve it on that hint. Therwscope check insiderunstops a read-only token, but the hint is still wrong. Declare itwrites: truewithdryByDefault, or use the pattern the other read-or-set tools use, so the hint is accurate. - Smaller points:
- The
decisionschip removes every ask that is not about a pull (asks.ts:504). That includes hand-overs, holds and the planner's asks, which goes beyond "decisions". Either narrow it or rename the label so it says what it hides. - The chips block in
assignedToMewas inserted between the mute comment and the mute loop, so that comment now describes the wrong code.
- The
I could not reach the preview (lab--1737--… was refused from my sandbox) or read the look pictures (permission denied), so I have not seen the chips on the page.
The terminal's On you card now filters by chips, K toggles a kind you pick, and feed_chips is declared as a write. Type check and the chips, MCP and On you tests pass; I did not run the whole suite or look at the preview.
- On you rows.
assignedToMe()insrc/tui/screens/dashboard.tsnow drops issues whose author is a hidden person, matched byauthorId. The chips block sits below the mute loop again, with its own comment. TheK/Htest checks that bob's row leaves the card afterHand returns afterC. Kpicks the kind.Kwaits for one letter:ppulls,ddecisions,wwords,rreleases. Each toggles that kind, so you can hide Releases alone or show one kind again. Any other key cancels.Cstill shows everything at once. The test covers hiding Releases alone, showing one kind again, and cancelling with another key.- MCP.
feed_chipsis nowwrites: truewithdryByDefault. With no arguments it still reads, for any token. Withkindorpersonit only plans ("Would hide … Send dryRun: false") until you passdryRun: false. A read-only token is then refused by the shared dispatcher. The test checks thatreadOnlyHintis false, that a plan changes nothing, and that a read-only token cannot set. - Decisions chip. The chip hides every ask that is not about a pull, so I renamed its label to "Decisions and other asks" in
src/core/feed_chips.ts. The feeddecisionkind and the chip name are unchanged. - Docs. The README and
docs/FEED.mddescribeKthenp/d/w/rand thedryRunbehaviour.
The H half of that test is clumsy: it presses H and j down the list until bob's row is the one under the cursor. It passes, but a cleaner way to put the cursor on his row would be an improvement.
That notification is only the earlier background command finishing. Nothing new came from it, and the push has already gone through, so I have nothing further to do.
Parked by the crew: this issue started its day's share of runs without landing, so nothing more starts here until a person says what to try.
Parked by the crew: the check stayed red through 2 automatic tries
The check that parked this pull was
reserved names > every top-level page of the forge is a reserved name. It failed because the chips form posts to/feed/chips, which makesfeeda top-level path without it being a reserved account or repo name. I added"feed"tosrc/core/reserved.ts, so nobody can register a user or org calledfeedand shadow the page. I haven't seen the forge's check on the new push yet.Locally,
tscis clean and these suites pass:reserved-names,feed-chips,schema-migrations,asks,asks-expiry,check-listandhome-feed. I also merged the latestmainfirst, with no conflicts. I did not run the whole suite.The feature is unchanged:
/api/v1/feed, the inbox,/api/v1/asksand the apps rail (/live/apps).feed_chiptable (migration 83).GETandPOST /api/v1/feed/chipsread and change the chips.I left out a per-card "hide this person" button, and organisation-owned apps can't be hidden from the rail.
To try it, open
/signed in, tap a kind chip above the timeline, and the matching posts and asks go. Tap it again to bring them back.Closes #1598