Skip to content

feat: expand pull request review context and panel tabs - #1

Closed
maria-rcks wants to merge 3 commits into
Bil0000:feat/pull-requests-pagefrom
maria-rcks:feat/pull-requests-page
Closed

feat: expand pull request review context and panel tabs#1
maria-rcks wants to merge 3 commits into
Bil0000:feat/pull-requests-pagefrom
maria-rcks:feat/pull-requests-page

Conversation

@maria-rcks

Copy link
Copy Markdown

Stacked on

This is a stacked follow-up to pingdotgg/t3code#4849. It intentionally targets Bil0000/t3code:feat/pull-requests-page, the source branch for that PR, rather than main. Merging this PR into that branch will carry these changes into pingdotgg#4849.

Why

The in-app review flow had three connected gaps:

  1. Host patches contain only changed hunks. Expanding omitted lines therefore could not work reliably, especially when the local checkout did not have the pull request's exact remote revisions.
  2. Diff styling, virtualized geometry, and inline comment composition had drifted across the thread diff, file preview, and pull request review surfaces.
  3. A thread treated its pull request panel as a singleton, so opening another review replaced the first instead of preserving both as tabs. The compact panel chrome also did not reflect refreshed pull request state.

What changed

Shared diff foundations

  • Added StyledDiffCodeView, the single web adapter around Pierre's CodeView. It keeps app styling and virtualized row measurements together so visual changes cannot silently desynchronize scrolling geometry.
  • Replaced the file-only LocalCommentAnnotation and pull-request-only composer with DiffCommentAnnotation, shared by file previews, thread diffs, and pull request diffs.
  • Extracted normalized full-file loaders with comparison-scoped cache keys for both local Git comparisons and host-backed pull request comparisons.
  • Added a lint restriction that directs new CodeView usages through the shared adapter.

Expand omitted pull request context

  • Added the typed pullRequests.diffFileContents RPC through contracts, authorization, WebSocket dispatch, client-runtime state, the pull request service, and provider adapters.
  • GitHub now resolves the pull request base/head pair, or a selected commit's parent/head pair, and reads both file revisions through the raw contents API.
  • GitLab does the equivalent with merge-request diff refs or commit parent refs and the repository files API.
  • New, deleted, changed, and renamed files are handled explicitly. Invalid commit SHAs, binary files, unsupported hosts, and files above the 1 MB expansion limit fail with bounded, user-facing errors.
  • The pull request Code tab now supplies Pierre with full-file contents, allowing readers to open omitted context without checking out or fetching the review branch locally. Commit-scoped diffs keep their own comparison identity.

Keep reviews in compact panel tabs

  • Pull request panel surfaces are now keyed by project, repository, and number instead of using one singleton ID. Existing persisted singleton state is migrated to the new shape.
  • Multiple reviews can coexist as peer tabs beside a thread, and refreshed open/draft/closed/merged state colors the corresponding tab icon.
  • The empty-panel actions now correctly disable Terminal when there is no project thread, and the pull request page can collapse and restore its detail panel with the standard layout control.
  • The detail header was reorganized around repository, pull request number, title, author, branches, changed-file counts, and additions/deletions. The head branch can be copied directly, merge conflicts get a dedicated actionable row, and secondary agent handoffs move into the overflow menu.
  • Reviewer display is condensed into accessible avatar stacks, while duplicate title, branch, and state metadata was removed from the Summary tab.
  • User documentation now calls out opening linked reviews in compact right-panel tabs without leaving the conversation.

User and developer impact

  • GitHub and GitLab reviews can reveal unchanged context directly in the in-app diff.
  • File previews, thread diffs, and pull request diffs now share the same comment interaction and rendering geometry.
  • Readers can retain several pull request reviews beside a thread instead of losing the previous one when another is opened.
  • Providers without a diff-file API keep their existing behavior; the capability remains optional at the provider boundary.
  • The changes apply to the web client and the desktop surface that wraps it. No separate mobile UI behavior is introduced here.

Validation

vp test run \
  apps/web/src/components/diffs/DiffCommentAnnotation.test.tsx \
  apps/web/src/components/diffs/StyledDiffCodeView.test.tsx \
  apps/web/src/lib/diffFileContents.test.ts \
  apps/web/src/rightPanelStore.test.ts \
  apps/web/src/components/diffs/AnnotatableCodeView.test.tsx \
  apps/web/src/components/pullRequest/pullRequestDiff.logic.test.ts

6 test files passed, 47 tests passed.

Commit structure

  • refactor(web): share diff rendering foundations
  • feat(pull-requests): expand omitted diff context
  • feat(web): keep pull requests open as panel tabs

Built with GPT-5.6 Sol via the Codex harness in T3 Code.

@maria-rcks

Copy link
Copy Markdown
Author

Closing because this stacked follow-up was opened against the contributor fork instead of the upstream repository.

@maria-rcks maria-rcks closed this Aug 6, 2026
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.

1 participant