Skip to content

feat: Review panel with compare modes and stacked diffs - #255

Open
oxwen11 wants to merge 10 commits into
mainfrom
cursor/code-review-panel-a1a6
Open

oxwen11 wants to merge 10 commits into
mainfrom
cursor/code-review-panel-a1a6

Conversation

@oxwen11

@oxwen11 oxwen11 commented Aug 17, 2026 •

Copy link
Copy Markdown
Member

Replace the mock Diff tab with a singleton Review panel: full workspace tree, stacked collapsible diffs, and explicit compare modes.

Compare modes

Mode What you see
Uncommitted (default) Working tree vs HEAD, including untracked files
Committed Three-dot vs the preferred default (origin/main when origin/HEAD exists), ignoring the dirty worktree
vs branch Three-dot vs a local or remote-tracking ref (origin/main, …), including uncommitted work. No git fetch — uses refs already on disk

Unknown other refs return REF_NOT_FOUND. git.branch lists refs/heads and refs/remotes without stripping origin/, and returns remotes separately so the vs-branch select can group Local vs Remote without treating slashed local names (feature/oauth) as remotes.

Layout

  • Header: mode select, branch select when needed, refresh
  • Left: Pierre CodeView stacked diffs, file headers on, click a header to collapse/expand
  • Right: Pierre FileTree of the whole workspace (fs.readTree) plus deleted review paths, with git-status badges. Click a changed file to scroll the stack to it
  • Narrow width keeps the existing right drawer

features/review copies the Files tree adapter pattern and does not import features/files.

Surface

  • Contract: git.review / git.diff take { cwd, mode?, other?, path? }
  • Panel payload { mode?, other?, path? }. Collapse state is live-only

Verify

turbo test typecheck for @vibest/contract, @vibest/server, @vibest/app; pnpm lint:check; pnpm format:check; react-doctor 100.

Acceptance walkthrough (demo repo on feature/oauth with origin/main already on disk):

review-panel-v2-acceptance.mp4

To show artifacts inline, enable in settings.

Open in Web Open in Cursor 

Replace the mock Diff tab with a singleton Review panel that lists the
working tree versus merge-base(HEAD, default) — PR-style three-dot
review — and previews each file with Pierre. On the default branch the
base is HEAD, so only uncommitted work is shown.
@github-actions

github-actions Bot commented Aug 17, 2026 •

Copy link
Copy Markdown

React Doctor found 4 issues in 4 files · 4 warnings · score 87 / 100 (Great) · full project

4 warnings

src/features/chat/codex/collab-agent-tool-call-tool.tsx

  • ⚠️ L14 Duplicated JSX structure duplicate-jsx-subtree

src/features/files/file-state.tsx

  • ⚠️ L27 Duplicated JSX structure duplicate-jsx-subtree

src/features/files/workspace-tree-pane.tsx

  • ⚠️ L94 Duplicated JSX structure duplicate-jsx-subtree

src/features/review/review-panel.tsx

  • ⚠️ L51 React function has high control-flow complexity no-high-complexity-react-function

Reviewed by React Doctor for commit 21551aa. See inline comments for fixes.

Review now switches among uncommitted, committed three-dot, and vs-branch
(including remote-tracking refs), shows the full workspace tree with git
badges, and stacks collapsible Pierre diffs that the tree can locate.
@cursor cursor Bot changed the title feat: Review panel (git review vs default branch) feat: Review panel with compare modes and stacked diffs Aug 17, 2026
Local branches like feature/oauth were landing in the Remote group because
the toolbar split on `/`. git.branch now returns remotes separately so the
select can keep origin/main remote without mislabeling slashed local names.
alignItemWithTrigger scrolled the vs-branch menu to origin/main and clipped
the Remote group. Open below the trigger so Local and origin/main are both on
screen without scrolling.
@oxwen11
oxwen11 marked this pull request as ready for review August 17, 2026 16:58
GitService is on the serve path, so tsdown inlines simple-git into the CLI.
deps.onlyBundle fails closed; list simple-git and its tree so Code check can
build @vibest/cli.
Mode and branch triggers now match the project picker: transparent, no
shadow, hover accent. The header already uses a ghost refresh button.
Coss SelectTrigger hard-codes ChevronsUpDown. Render the same ghost Button
chrome as the harness picker so compare mode and vs-branch use ChevronDown.
Resolve the server public-slice conflict by keeping main's removal of
HarnessAgentDomainLayer (GitService stays on AgentRuntimeLayer). Point the
review panel at content-panel/model after the core rename.
Keep this branch's git contract (status/review/diff plus remotes) so Review
still works; composer only reads branch.current. Wire pty next to git, point
the shell at features/terminal, and leave the mock Diff panel out — Review
replaces it.
@effect/vitest layer({ timeout }) only covers hooks, so spawn tests still
hit vitest's 5s default while turbo runs build/test/typecheck together.
Raise the package testTimeout to 30s and poll for stop tombstones instead
of sleeping 100ms.
},
});

function ReviewPanelView({ instance }: { instance: PanelHandle<ReviewPayload> }) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

React Doctor · react-doctor/no-high-complexity-react-function (warning)

ReviewPanelView has cyclomatic complexity 24, cognitive complexity 19, and maximum nesting depth 1, so its React logic is hard to understand and change. Extract independent branches into components or hooks.

Fix → Extract independent render branches and state logic into focused components or hooks until the control flow is easy to follow.

Docs

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