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

The terminal dashboard and MCP `feed` show the same three digest lines as home #6742

opened this

Merged 40d 9h ago, live in production

The terminal dashboard and the MCP feed tool now show the same digest lines as home, built by one function, src/feed/homedigest.ts. These commits were already on the branch, and I added nothing new this turn.

Notes

opened this

The terminal dashboard and the MCP feed tool now show the same digest lines as home, built by one function, src/feed/home_digest.ts. These commits were already on the branch, and I added nothing new this turn.

The failure that got this parked was readPlan of 2,000 closed and 300 open issues … fits a 30 ms budget in test/milestones-speed.test.ts. That is a timing test on a code path this change doesn't touch: the change only touches the feed, dashboard and MCP feed files. I ran it three times in a row and it passed each time. It compares against a baseline measured on the same machine, so I read the failure as the check machine being busy.

test/digest-doors.test.ts passes and tsc --noEmit is clean. I did not run bun test as a whole, since the forge runs the full check on push.

  • Dashboard: src/tui/screens/dashboard.ts takes its digest lines from the shared function.
  • MCP feed tool: src/http/mcp/tools/feed.ts does the same, and docs/MCP.md is regenerated to match.
  • Home: src/web/studio/feed.ts and src/feed/feed.ts use the shared function too, so all three show the same lines.
  • Tests: test/digest-doors.test.ts checks that the doors agree.

Left out: I did not loosen or change the speed test. If it fails again on an otherwise green run, it needs its own issue.

To try it, open the terminal dashboard and call the MCP feed tool. The digest lines should match the ones on home.

Closes #5803

4 earlier comments
commented

The terminal dashboard and the MCP feed tool now show the same digest lines as home, built by one function, src/feed/home_digest.ts. These commits were already on the branch, and I added nothing new this turn.

The failure that got this parked was readPlan of 2,000 closed and 300 open issues … fits a 30 ms budget in test/milestones-speed.test.ts. That is a timing test on a code path this change doesn't touch: the change only touches the feed, dashboard and MCP feed files. I ran it three times in a row and it passed each time. It compares against a baseline measured on the same machine, so I read the failure as the check machine being busy.

test/digest-doors.test.ts passes and tsc --noEmit is clean. I did not run bun test as a whole, since the forge runs the full check on push.

  • Dashboard: src/tui/screens/dashboard.ts takes its digest lines from the shared function.
  • MCP feed tool: src/http/mcp/tools/feed.ts does the same, and docs/MCP.md is regenerated to match.
  • Home: src/web/studio/feed.ts and src/feed/feed.ts use the shared function too, so all three show the same lines.
  • Tests: test/digest-doors.test.ts checks that the doors agree.

Left out: I did not loosen or change the speed test. If it fails again on an otherwise green run, it needs its own issue.

To try it, open the terminal dashboard and call the MCP feed tool. The digest lines should match the ones on home.

commented

The terminal dashboard and the MCP feed tool now show the same digest lines as home, from one function: homeDigest in src/feed/home_digest.ts. I merged main into the branch to fix the check's "does not merge into main" failure and pushed. The forge's check hasn't run on this push yet.

  • src/http/mcp/tools/feed.ts: I kept main's CURSOR_NOT_ISSUED message and added the digest array to the result.
  • README.md: main moved the feature list into docs/STATUS.md, so I took main's README. The digest bullet went to docs/STATUS.md.
  • Checks: tsc --noEmit is clean. test/digest-doors.test.ts and the test/mcp tests pass (483 tests). I did not run the whole suite.
  • Left alone: I did not change the readPlan speed test. It passed three runs in a row here, and I read its earlier failure as a busy check machine.

To try it, open the terminal dashboard and call the MCP feed tool. Both should show the same lines as home, as { repo, says, href } in MCP.

commented

MCP feed now returns the digest home already shows, and the second digest is gone. The type check passes, as do test/digest-doors.test.ts, test/home-since.test.ts and the test/mcp* suites. I did not run the full bun test; the forge runs the whole check on this push.

What changed

  • MCP feed adds digest: sinceDigest(db, lastVisit(db, user.id), now) ?? null. That is { heading, lines: [{ repo, says, href }] }, or null when nothing landed. It is the same function behind home's #since-you-were-here card and the dashboard's sinceLines.
  • I removed src/feed/home_digest.ts, the hand-rolled <ul data-digest> on home, and the dashboard's digestLines. I also reverted the viewerCandidates export. src/feed/feed.ts, src/tui/screens/dashboard.ts and src/web/studio/feed.ts are back to what main has.
  • test/digest-doors.test.ts now seeds a pull that landed in a public repo. It checks home's real #since-you-were-here card, the dashboard's block and the MCP digest against the same lines.
  • docs/MCP.md describes the new digest field, and docs/STATUS.md names sinceDigest as the one source.
  • I merged main into the branch first, so #6721 is already in.

Left out: the feed-candidate digest (a fixed 24 h, drawn from the viewer's chips). Only one digest was wanted, and sinceDigest already covers it.

Try it: bun test test/digest-doors.test.ts. Or call the feed tool over MCP and read digest.

commented

MCP feed now returns the "Since you were here" digest on its first page only, and the README and feature doc name that door. The type check, test/digest-doors.test.ts and the test/mcp* suites pass. I did not run the full bun test; the forge runs the whole check on this push.

  • First page only: digest is added only when no cursor is given. Paged calls skip the landedSince query and return a smaller response. The tool doc string and docs/MCP.md say "first page only".
  • Docs: README.md:43 now ends "…and MCP feed answers them as digest". docs/features/since-you-were-here.md has a new ## MCP section with the { heading, lines: [{ repo, says, href }] } | null shape. It says null means nothing landed and that MCP only reads the visit.
  • STATUS.md: I dropped the bullet rather than moving it, since the README and feature doc now carry that line.
  • Test: test/digest-doors.test.ts now seeds two serving events so the feed has a second page. It checks that a limit: 1 first page carries the digest and the cursor page has no digest key.

Left out: the feed-candidate digest and any change to home or the dashboard. They already drew from sinceDigest on main.

Try it: bun test test/digest-doors.test.ts. Or call the feed tool over MCP, then call it again with the returned next_cursor and compare.

commented

I merged main into the branch and pushed. The type check and test/digest-doors.test.ts, test/home-since.test.ts and the test/mcp* suites pass; I did not run the full bun test, which the forge's check does on this push.

  • README.md conflict: both sides had edited the paragraph at line 43. I kept main's new "Give back to the crew" paragraph and kept my "Since you were here" paragraph, which says "…and MCP feed answers them as digest".
  • sinceDigest signature: main changed it to take the viewer, sinceDigest(db, viewer, lastVisit, now). The merge itself was clean there, but it broke the type check in src/http/mcp/tools/feed.ts and test/digest-doors.test.ts. I fixed both to pass the viewer, in a second commit.
  • Push order: the merge commit went up first with the type check still failing. I noticed only when tsc and the tests ran. The follow-up commit (b4a133cb) fixes it. The check on the earlier push will have been red.

Because sinceDigest now takes the viewer, the MCP digest is read for that viewer, matching home and the dashboard.

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs