PR review experience: split view, Code tab, comments, risk sidebar (reference — being split into smaller PRs)

Draft
AV
1mo ago
+2519-345

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/diffs and @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, and pull-requests.setThreadResolution. CommentThread is now host-agnostic; callers inject onResolveChange.
  • 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"); URL state supports "merged".
  • If you re-use CommentThread elsewhere, pass an onResolveChange handler and manage toasts/errors in the caller.