Skip to content

runtime: Repo Watch snapshot backend + broker route#209

Merged
arach merged 1 commit into
mainfrom
feat/repo-watch-backend
Jun 6, 2026
Merged

runtime: Repo Watch snapshot backend + broker route#209
arach merged 1 commit into
mainfrom
feat/repo-watch-backend

Conversation

@arach
Copy link
Copy Markdown
Owner

@arach arach commented Jun 6, 2026

The native Repos section (merged in #201) polls the broker at GET /v1/repo-watch/snapshot, but that route was never on main — it lived on the 98-behind feat/repo-watch-web-converge branch. So the front end shipped with no data source and fell back to empty/sample.

This lifts the self-contained backend forward (no web-surface baggage):

  • packages/runtime/src/repo-watch/ — computes a worktree-state snapshot by shelling out to git per worktree (branch, churn, last commit, optional diff, agent/session attribution)
  • GET /v1/repo-watch/snapshot on the broker daemon (force / includeTail / includeDiff / includeLastCommit), seeded with hints from the broker snapshot + tail discovery
  • ./repo-watch package export + index re-export

No new dependencies. The module's only internal coupling is one type import (DiscoverySnapshot from tail), verified present.

Verification

  • Runtime typecheck: 0 errors
  • repo-watch.test.ts: 6/6 pass
  • Live smoke test: snapshot finds the openscout project + its 3 worktrees

Note

lastTouchedAt isn't emitted yet (native-only field from the inventory redesign) — the "last-touched" column stays empty until a follow-up computes it.

⚠️ The running broker must be restarted to pick up the new route.

Adds the broker endpoint the native Repos section polls. Lifts the
self-contained repo-watch module forward (the front end shipped without it,
so the section had no data source):

- packages/runtime/src/repo-watch — computes a worktree-state snapshot by
  shelling out to git per worktree (branch, churn, last commit, diff,
  agent/session attribution)
- GET /v1/repo-watch/snapshot route on the broker daemon
  (force / includeTail / includeDiff / includeLastCommit), seeded with hints
  from the broker snapshot + tail discovery
- ./repo-watch package export + index re-export

No new dependencies. Runtime typecheck clean; repo-watch tests pass (6/6);
verified live (finds the openscout project + its 3 worktrees).

Note: lastTouchedAt isn't emitted yet — the native column stays empty until a
follow-up computes it.
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 6, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
openscout Building Building Preview, Comment Jun 6, 2026 9:51pm

@arach arach merged commit 2200c62 into main Jun 6, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant