Skip to content

Add live review visibility: sidebar, finding cards, and stats hotspots - #26

Open
theogrillat wants to merge 24 commits into
T-moz:mainfrom
theogrillat:feat/live-review-feed-stats
Open

theogrillat wants to merge 24 commits into
T-moz:mainfrom
theogrillat:feat/live-review-feed-stats

Conversation

@theogrillat

@theogrillat theogrillat commented Sep 28, 2026 •

Copy link
Copy Markdown

Why

Pair Programmer reviews run in the background, but it is hard to see what is running, what was decided and why. This PR adds live, non-blocking review visibility while keeping rejected findings out of model context.

What changed

Live review status

  • Replaces the footer status with a non-capturing top-right badge showing watching, reviewing, queued, awaiting decision or paused.
  • Keeps the badge visible when footers are hidden, hides it in narrow terminals and falls back to a line above the editor outside Pi's TUI.

Review sidebar

  • Adds /pair-feed and alt+r to toggle a live sidebar of recent reviews.
  • Keeps a session-scoped feed of up to 100 reviews with file, reviewer, model, outcome, duration and attributed findings.
  • Shows only running reviews and reviews with accepted or rejected findings.
  • Shows one row per review; click it in fullscreen mode to see duration, decided findings and reasons.
  • Clears the feed with /pair-clear and on session changes.

Finding cards

  • Renders accepted findings as compact cards with title, location, evidence and reason.
  • Renders rejected findings as folded, transcript-only cards that are never sent to the model.
  • Expands cards by click in fullscreen mode or with ctrl+o.

Reviewer names

  • Adds an optional reviewer name (1–24 chars) for the sidebar and cards.
  • Names the default reviewer entropy.
  • Falls back to the short model name; renaming a reviewer does not change its identity or history.

/pair-stats

  • Adds a themed overview with detail (d), overview (o), refresh (r) and scrolling controls.
  • Adds a hotspots tab (h) that ranks files by accepted findings, with rejected counts.

Housekeeping

  • Adds @earendil-works/pi-tui for the overlays.
  • Updates README usage docs.
  • Ignores generated Vitest reports.

Testing

  • npm test — passes, with 100% statement, branch, function and line coverage.
  • npm run typecheck — passes.

Summary-first /pair-stats overlay with detail and refresh controls, a non-capturing top-right status badge that survives hidden footers, and a quieter accepted-finding layout.
ReviewStore.lookup reports a finding's title, line, queued/awaiting/accepted/rejected/discarded status and decision reason.
ReviewFeed keeps the latest 100 reviews newest first with file, short model name, outcome, duration and attributed finding ids.
Framed top-right card rendering each review's outcome and model, with live verdicts and reasons. Paths keep the file name and drop leading directories first; the card sizes to its content above the editor.
Feeds review starts, outcomes and newly admitted findings into the sidebar, refreshes it on every state change, clears it with /pair-clear and session changes, and documents the controls.
Reviews appear while running or once they have accepted or rejected findings; only decided findings are listed, summarized as 'N accepted · N rejected'. No-finding, undecided, failed, timed-out, superseded and cancelled reviews are hidden.
Accepted findings carry structured details and render as a title plus file-name-first location; Pi's expand toggle reveals the evidence and the agent's reason. Older messages and hosts without message renderers keep the default rendering.
Left-clicking a card toggles its evidence and reason, with a ▸/▾ affordance. The toggle survives Pi's component rebuilds and yields to a later global ctrl+o. Requires fullscreen mode, where Pi routes mouse events.
Reviewers accept an optional 1-24 character name (default reviewer: entropy) that labels sidebar rows and accepted cards, falling back to the short model name. Names are not part of reviewer identity.
Each review collapses to one row (file, reviewer, verdict counts ▸); a left click on any of its rows toggles duration, findings and reasons. Expanded reviews that no longer fit fall back to their collapsed row.
Rejections are appended as transcript-only custom entries, so they never reach model context, and render as one dimmed line that expands by click or ctrl+o to location, evidence and reason. Accepted and rejected cards share one finding-card module.
Press h to rank files by accepted findings on the selected branch, with width-scaled bars and rejected counts; o, d and h switch tabs. README documents hotspots and rejected cards.
@theogrillat theogrillat changed the title Add live review feed and stats hotspots Add live review visibility: sidebar, finding cards, and stats hotspots Sep 28, 2026

@T-moz T-moz left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please consolidate the duplicated status rules, overlay lifecycle and frame rendering noted inline.

Comment thread src/review-store.ts
Comment thread src/status-overlay.ts
Comment thread src/review-sidebar.ts Outdated

@T-moz T-moz left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the sidebar cleanup race and simplify the finding attribution and formatting dependencies noted inline.

Comment thread src/review-sidebar.ts Outdated
Comment thread src/index.ts Outdated
Comment thread src/finding-card.ts Outdated

@T-moz T-moz left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The visibility improvements make sense, but please keep rejected findings out of the transcript and make the review feed available to OMP users too.

Comment thread src/index.ts Outdated
Comment thread src/review-sidebar.ts

@T-moz T-moz left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the OMP keyboard freeze, Pi overlay dismissal, and Ctrl+O collapse regression noted inline. Reproduced with OMP 18.4.2 and Pi 0.87.1 runtime probes.

Comment thread src/status-overlay.ts Outdated
Comment thread src/status-overlay.ts Outdated
Comment thread src/finding-card.ts Outdated
@theogrillat
theogrillat requested a review from T-moz September 29, 2026 09:11
…-stats

# Conflicts:
#	src/finding-admission.ts
#	src/index.ts
#	src/review-runner.ts

This branch has not been deployed

No deployments
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.

2 participants