JetBrains: peek at a pull request's changes from the normal editor #4

Closed
opened 2026-11-12 01:53:04 +01:00 by thatrichan · 0 comments
Owner

Moved from thatrichan/jetbrains-plugins#2.

In a file the checked-out branch's pull request changes, the JetBrains plugin (jetbrains/) marks the changed lines in the gutter (stripes in the editor's added / modified / deleted colours). Those only say that a line changed in the pull request, not what it was before.

What it should do

  • Peek at one change: clicking a stripe (or a gutter action / a shortcut on the caret's line) shows a popup with what the pull request changed there: the base's version of those lines next to or above the current ones, highlighted like the IDE's own VCS change popup (the one on the uncommitted-changes markers, with ⟵/⟶ to step through changes).
    • In the popup: step to the previous / next change of the pull request in the file, copy the old lines, and open the whole file's diff.
  • The whole file's diff: "Show Pull Request Diff" (editor and tab menus, Find Action) opens the IDE's diff viewer on the file, base of the pull request vs. its head, positioned on the caret's change.
  • Works with the IDE's diff viewer (DiffManager, SimpleDiffRequest), not a view of our own, like #3 decided.
  • Only when the checkout is at the pull request's latest commit, as the stripes are today (the lines don't match otherwise); else it says so and offers the file's diff from Revue's side instead.

What it needs

  • From Revue (cleangamedev/revue): the base side of each change, not just its line ranges. Today revue --branch-pull turns each file's patch into changes: [{start, end, kind}]; it would also need the removed lines of each hunk (or the file's base text, which #3's review mode needs anyway: one editor question for "a file's two sides" could serve both).
  • The popup could follow the platform's LineStatusMarkerPopupPanel look; check what of it is public in 2026.3 before relying on it.
  • #3, the review mode, shows the same diff for reviewing; this is the lighter "glance while coding" version of it.
*Moved from thatrichan/jetbrains-plugins#2.* In a file the checked-out branch's pull request changes, the JetBrains plugin (`jetbrains/`) marks the changed lines in the gutter (stripes in the editor's added / modified / deleted colours). Those only say *that* a line changed in the pull request, not *what* it was before. ## What it should do - **Peek at one change:** clicking a stripe (or a gutter action / a shortcut on the caret's line) shows a popup with what the pull request changed there: the base's version of those lines next to or above the current ones, highlighted like the IDE's own VCS change popup (the one on the uncommitted-changes markers, with ⟵/⟶ to step through changes). - In the popup: step to the previous / next change of the pull request in the file, copy the old lines, and **open the whole file's diff**. - **The whole file's diff:** "Show Pull Request Diff" (editor and tab menus, Find Action) opens the IDE's diff viewer on the file, base of the pull request vs. its head, positioned on the caret's change. - Works with the IDE's diff viewer (`DiffManager`, `SimpleDiffRequest`), not a view of our own, like #3 decided. - Only when the checkout is at the pull request's latest commit, as the stripes are today (the lines don't match otherwise); else it says so and offers the file's diff from Revue's side instead. ## What it needs - From Revue (cleangamedev/revue): the base side of each change, not just its line ranges. Today `revue --branch-pull` turns each file's patch into `changes: [{start, end, kind}]`; it would also need the removed lines of each hunk (or the file's base text, which #3's review mode needs anyway: one editor question for "a file's two sides" could serve both). - The popup could follow the platform's `LineStatusMarkerPopupPanel` look; check what of it is public in 2026.3 before relying on it. ## Related - #3, the review mode, shows the same diff for reviewing; this is the lighter "glance while coding" version of it.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
cleangamedev/revue-companion#4
No description provided.