Add Repo Watch as a native Repos section#201
Open
arach wants to merge 2 commits into
Open
Conversation
Port the broker's Repo Watch snapshot into a fourth Scout section (`apps/macos`), organized repo → worktree. Agents and sessions are attributes on a worktree, never the spine. Ordering is attention-first everywhere and clean-&-idle worktrees fold away behind a "quiet" toggle so unfinished work floats to the top. - ScoutRepoModels: Decodable mirror of the RepoWatchSnapshot contract plus the Swift twins of the web ui.ts derivations (churn parse, agent dedupe, attention rank, branch split, relative time, drift flag). - ScoutRepoStore: broker polling on a calmer 4s cadence (a snapshot shells out to git per worktree), worst-first project ordering, a Table/Drift lens toggle, and the clean-idle fold state. - ScoutReposView: keyboard-first repo·worktree tree mirroring the Agents tree (j/k, h/l, g/⇧G, inspector-follows-cursor), Table and Drift lenses over one model, and a Context inspector (status, churn, branch drift, changed files, last commit, agents, sessions). - Wire Repos into ScoutSection, the sidebar, content + inspector switches, keyboard chords, lifecycle, status bar, and the cheatsheet. ⌘↩ / double-click reveals the focused worktree in Finder. Builds green against the current macOS base; web convergence to follow.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Replace the harsh per-worktree verdict pills (DIVERGED / SCAN ERR /
REBASE) with a calm reading of *current state* — where each branch sits
relative to its upstream — per design feedback that the verdicts were
"doing all the talking" and the rows were too sparse.
- RepoDriftGauge: a behind◀upstream▶ahead position gauge (muted fill
left, accent fill right, center tick at the fork, head dot at the
ahead tip; in sync = dot on the line). It is the row + inspector hero.
- Column-aligned driftline rows: branch · POSITION · WORK · LAST, with a
quiet second line on active worktrees (upstream · a descriptive
"behind N · ahead M" phrase · agents). Clean/in-sync trees stay one
line. No verdict words anywhere.
- Context inspector leads with a Position block (gauge + phrase +
branch/upstream/HEAD), replacing the harsh drift badge.
- Scan errors read in plain language ("couldn't read this worktree —
moved, deleted, or not a git repo") with the raw git output kept in
the inspector for detail.
- ScoutRepoSample: an env-gated (OPENSCOUT_REPOS_SAMPLE) fixture so the
section can be exercised without a broker that serves the snapshot.
Inert in normal runs.
swift build --product Scout is green.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ports the broker's Repo Watch snapshot into a fourth Scout section in the native macOS app (
apps/macos), organized repo → worktree. Agents and sessions are attributes on a worktree, never the spine. Ordering is attention-first everywhere and clean-&-idle worktrees fold away behind a "quiet" toggle so unfinished work floats to the top.Built against the pinned Repo Watch contract from #185 (
GET /v1/repo-watch/snapshot); this is the native counterpart to that PR's web surface. Web convergence to the same design line follows separately.What's here
ScoutRepoModels—Decodablemirror ofRepoWatchSnapshot(house decode style:CodingKeys+decodeIfPresentdefaults, so a partial/forward-evolved snapshot never hard-fails the section), plus the Swift twins of the webui.tsderivations: churn parse, live-first agent dedupe, attention rank, branch split, deterministic relative time, and the drift flag (SCAN ERR/DIVERGED/REBASE/AHEAD N/IN SYNC).ScoutRepoStore— broker polling on a calmer 4s cadence (a snapshot shells out to git per worktree), worst-first project ordering, a Table/Drift lens toggle, and the clean-idle fold state.ScoutReposView— keyboard-first repo·worktree tree mirroring the Agents tree exactly (j/k,h/l,g/⇧G, selection band, inspector-follows-cursor), Table and Drift lenses reading one model, and a Context inspector (status, churn, branch drift, changed files, last commit, agents, sessions).ScoutSection.repos, sidebar entry, content + inspector switches, keyboard chords, lifecycle start/stop, status-bar count, and the keyboard cheatsheet.⌘↩/ double-click reveals the focused worktree in Finder.Design line
The spine is repo → worktree; one vocabulary across pills; attention-first ordering with clean-&-idle folded away; three lenses (Table · Drift · Context) over one model — native leads with Table + Context, Drift as a toggle.
Verification
swift build --target Scoutis green — zero warnings, zero errors.🤖 Generated with Claude Code