PR review experience: split view, Code tab, comments, risk sidebar (reference — being split into smaller PRs)
Summary
This branch is the full "PR review experience" build — a reference
implementation, not meant to merge as-is. It's being progressively split
into a sequence of smaller, independently-reviewable PRs (split-view
foundation first, then tabs/Summary/Checks, Code tab diff viewer, Code tab
comments, author filter, Review tab behind a flag). Opening as draft so it's
easy to link to and diff against while those smaller PRs land.
- Split view: list persists in a left pane, detail renders in the right pane
via nested routing. - PR detail page: tab bar (Review/Summary/Code/Checks), badge/avatar
restyle matching Figma. - Code tab: file tree, GitHub-style diff containment, split/unified toggle,
live GitHub review-comment threads with resolve/unresolve. - Review tab: risk-triaged sidebar — fixture data only, no real
risk-classification backend yet. - Author filter: searchable combobox sourced from real GitHub repo
contributors. - Assorted fixes: host-service query self-heal after a restart, Changes
pane large-diff crash, PR-list-toggle dead end, TopBar/sidebar-collapse
color match.
Test plan
Not applicable — reference branch, not merging directly. Each extracted PR
carries its own verification.
https://claude.ai/code/session_01C3jApm71cMg4NPsV8PaHT3
Summary by cubic
Introduces a split-view PR review experience and a tabbed PR detail page. Previously, opening a PR replaced the list and lacked a code view; now the list stays pinned on the left and the right pane shows Review/Summary/Code/Checks, with live GitHub review threads in Code. The Review tab uses fixture risk data for now.
- Split view and routing: persistent list/detail via nested routes, with a global list-collapse toggle persisted in
pullRequestsSplitViewStore. TopBar tweaks for PR routes and collapsed sidebar colors. - Code tab: diff viewer backed by
@pierre/diffsand@pierre/trees/react, split/unified toggle (defaults to unified), right-side file tree, and GitHub review threads with resolve/unresolve. New host-service procedures:pull-requests.getDiff(30s cached),pull-requests.getThreads, andpull-requests.setThreadResolution.CommentThreadis now host-agnostic; callers injectonResolveChange. - Review and Summary/Checks: Review tab renders a risk-triaged sidebar from fixture data only; Summary renders the PR body plus checks; Checks tab shows checks via existing components.
- PR list top bar: replaces the free-text author filter with a contributor combobox powered by
workspaceCreation.getRepoContributors; adds state chips (Open/All/Merged); consolidates filters into a searchable bar. - Data and styling: PR list items include additions/deletions and base ref; diff stat colors and badges match Figma; GitHub avatar helper added.
Migration/rollout
- Persisted filter state migrates automatically from includeClosed to
stateFilter("open" | "all" | "merged"); URLstatesupports "merged". - If you re-use
CommentThreadelsewhere, pass anonResolveChangehandler and manage toasts/errors in the caller.