feat(desktop): redesign pull requests screen with split-pane view, code diff tab, and review comments
Draft
AV
1mo ago+2107+2107+0123456789012345678901234567890123456789-323-323-012345678901234567890123456789
Summary
- List: split-pane layout (list + detail side by side) with role-based All / Reviewing / Authored tabs. All shows a grouped "my work" dashboard (Needs my review / Previously reviewed / Authored); Reviewing mirrors that as two full sections (GitHub's search API rejects qualifier-level OR, so it can't be one combined query); Authored reuses the existing flat, fully paginated list. Rows show status-dot-on-icon, diff stats, and branch name.
- Detail: header redesign with Review / Summary / Code / Checks tabs.
- Review is backed by new
getThreads/setThreadResolutionprocedures and reusesCommentThread(refactored to a pure presentational component so it works outside a workspace context). - Code is a new file tree + diff viewer built on
@pierre/trees/@pierre/diffs, matching the workspace Changes pane — resizable/collapsible tree, split/unified toggle, backed by a newgetDiffprocedure.
- Review is backed by new
- Backend:
search-pull-requestsnow enriches results withadditions/deletions/headRefNamevia the existing GraphQL checks-enrichment call (no extra round trips), and accepts aviewerRelationshipqualifier for the grouped list sections.
Bugs fixed along the way
- Duplicate-path crash in the Code tab:
gh pr diff --patchemits onediff --gitblock per commit, so a file touched across multiple commits produced a duplicate tree path and crashed@pierre/trees. Switched to the plain cumulative diff, plus a defensive dedupe as a backstop. - Unscrollable diff: the pull-requests layout's
Outletwrapper wasn't a flex container, so tall diff content overflowed invisibly past an ancestor'soverflow:hiddenwith no scrollbar anywhere to reach it. - Borderless "Open" state pill.
- Original PR-screen "Failed to fetch" investigation (offline-host routing) from earlier in this branch.
Test plan
-
bunx tsc --noEmitclean onapps/desktopandpackages/host-service -
bunx biome checkclean on all touched files -
bun testpasses forpull-requests(13/13) - Verified live end-to-end over CDP against the running dev app: list tabs/grouped sections, split-pane detail, Review tab (real threads/comments), Code tab (multi-file diffs, scroll, resize, split/unified toggle, the duplicate-path crash repro + fix)
- Manual review of the design against the Figma references
https://claude.ai/code/session_01DyR8ibewWvkhknCgKtpfXL
Summary by cubic
Redesigns the desktop Pull Requests screen to a split-pane list + detail with role-based tabs and adds Code and Review tabs to the detail view. This replaces the old flat list/minimal detail and prevents noisy errors by skipping known‑offline hosts.
- UI
- List: All (grouped “Needs my review”/“Previously reviewed”/“Authored”), Reviewing (two sections; GitHub search rejects qualifier‑level OR), and Authored (flat, paginated). Rows show status dot, diff stats, and branch.
- Detail: new Review/Summary/Code/Checks tabs. Code uses
@pierre/treesand@pierre/diffswith file tree, resize/collapse, and split/unified toggle. Review shows threads and supports resolve;CommentThreadis now presentational.
- Backend
- Adds
pullRequests.getDiff,pullRequests.getThreads, andpullRequests.setThreadResolution. search-pull-requestsacceptsviewerRelationshipand enriches rows withadditions/deletions/headRefNamevia the existing GraphQL pass (no extra calls).
- Adds
- Reliability and fixes
useHostTargetUrlavoids routing to known‑offline hosts; detail page mapsNOT_FOUNDTRPCClientErrorto an “update device” prompt.- Switches from
gh pr diff --patchto cumulative diff and defensively dedupes paths; fixes unscrollable diff and borderless “Open” pill.
- Routing and filters
- New URL params:
state=open|all|merged,tab=all|reviewing|authored. Filter store persistsmergedOnlyandviewTab;mergedtakes precedence overallwhen serializing.
- New URL params:
Rollout
- Deploy desktop and
host-servicetogether. The UI degrades gracefully on older hosts, but the Review and Code tabs require the newpullRequests.getDiff/getThreads/setThreadResolutionprocedures.