feat(desktop): pull requests split view — resizable list/detail with merge, close, and reopen
Summary
- Split-view layout for the pull-requests screen: a persistent, resizable list pane and a detail pane routed via
<Outlet />, with collapse toggles for list-only or preview-only modes. - List view matched to the Figma spec (flat All/Open/Merged tabs, richer row visuals) and a fixed Filters popover (repository/author/review filters, author sourced live from GitHub contributors).
- Lighter, consistent PR icon set (
lucide/git-pull-request-arrow, stroke-width 1) across the app. - Merge (squash/merge/rebase), close, and reopen actions on the PR detail page via a single actions dropdown, each gated by PR state and confirmed before mutating; icons match the PR icon language (
git-pull-request-closedinstead of a bare X). - Detail header cleanup: removed a redundant near-empty toolbar row stacked above the header, tightened top padding, and aligned the header's bottom border with the list pane's toolbar border.
Test plan
- Verified live via CDP against the running dev app: list/detail resize and collapse toggles, author-contributor dropdown, Filters popover, merge/close/reopen dropdown and confirm dialogs (cancelled, never executed against a real PR)
- Confirmed header alignment and padding visually before/after each change
-
bun typecheck/bun linton touched packages
https://claude.ai/code/session_01299739VL1C3UdwH1mSkVY2
Summary by cubic
Adds a split-view pull requests screen with a persistent, resizable list and a detail pane, plus in-app merge/close/reopen. Previously opening a PR unmounted the list (lost scroll/pagination) and actions weren’t available; now the list stays mounted and key PR state changes happen in-app with confirmation.
-
Adds a resizable list pane (300–720px, double-click resets), persists width and collapse, and provides list-only and preview-only toggles that are mutually exclusive and always reachable; selecting a row expands a collapsed preview.
-
List view matches spec: All/Open/Merged tabs over a single flat list; per-row icon, title, avatar/repo/#/branch, relative time (guarded), diff stats, and CI status; consolidated Filters popover (Repository/Author/Reviews) with visible values and an active-count badge.
-
Author filter: for a single repo, a searchable contributors combobox with avatars; falls back to free-text for multi-repo. Backend adds
workspaceCreation.getRepoContributors(prefersgh api, handles 204, falls back to Octokit, cached 5 minutes, skips bots). -
Detail header shows a state-tinted badge and a single actions dropdown. Supports merge (squash/merge-commit/rebase), close, and reopen with confirmation and non-destructive styling; success invalidates
pull-request-detailandpullRequests, errors toast. -
Backend:
pullRequests.setState(usesgh pr close/reopen) andpullRequests.mergePR(Octokit; resolves repo live).workspaceCreation.searchPullRequestsacceptsmergedOnlyand enriches rows with additions/deletions/headRefName via the existing GraphQL checks batch. Direct #N lookups now respectmergedOnlyand viewerRelationship; schema rejects combining viewerRelationship with author/review (viewerRelationship not used by this UI). -
State/routing: new persisted
pullRequestsSplitViewStore;pullRequestsFilterStoreaddsmergedOnly, migrates persisted state (version 7), and serializesstate=merged. The detail page removes its back button; the index route shows an empty preview with a list toggle.ResizablePanelnow supports a disabled mode to avoid remounting on collapse. -
Review/rollout
- Validate: list resizing/toggle persistence; Filters popover values and count; single-repo author combobox and fallback; per-row CI status and diff stats; PR actions (merge methods, close/reopen, confirmations) and query invalidation; URL
state=merged; cross-repo row selection correctness. - Environment: host-service requires an authenticated
ghCLI for contributors and close/reopen; Octokit is a fallback for contributors. No database changes or manual migrations.
- Validate: list resizing/toggle persistence; Filters popover values and count; single-repo author combobox and fallback; per-row CI status and diff stats; PR actions (merge methods, close/reopen, confirmations) and query invalidation; URL
Summary by CodeRabbit
-
New Features
- Added a split-view pull request experience with resizable list and detail panes.
- Added open, all, and merged filters, contributor-based author filtering, and viewer relationship filters.
- Added actions to close, reopen, and merge pull requests with confirmation prompts.
- Added selectable pull request rows with repository, author, branch, status, and change statistics.
- Added controls to show or hide the pull request list and detail preview.
-
Bug Fixes
- Preserved filters and selected details when navigating or changing searches.
- Improved pull request layout styling across sidebar and top-bar states.