feat(pr): F5 refreshes the current PR; move auto review to Ctrl+F5 - #217
Merged
Conversation
Bare F5 used to kick off an auto review, which was easy to trigger by accident. Rework the PR refresh + shortcuts around a single-PR refresh: - F5 now refreshes the currently selected PR; Ctrl+F5 runs auto review (literal Ctrl on every platform — ⌘F5 collides with macOS VoiceOver; formatChord gains a `ctrl` flag so the palette hint shows ⌃ on mac). - Add a neutral (non-accent) icon refresh button to the right of the PR header's "open in browser" button; align-self:stretch matches its height. - Add a "Refresh PR" command palette entry (shown only when a PR is selected), bound to bare F5. Refresh targets a SINGLE PR, not a whole-poller tick: new prs:refreshOne IPC + refreshOnePr controller re-fetch just this PR via getSinglePullRequest, recompute localStatus from the current user's reviewer status (same rule as the poll), persist its meta, and invalidateCommentsCache (comments:changed → comments/inline-diff refetch); if the head sha advanced, best-effort sync the mirror for the diff. The one network call is this PR's fetch — usePullRequests .refreshPr then reloads the list locally (no poll of other PRs). The header button, F5, and the command all wire to it. i18n in all four locales. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bare F5 used to kick off an auto review — easy to trigger by accident. This reworks the PR refresh + shortcuts around a single-PR refresh.
Shortcuts
⌘F5collides with macOS VoiceOver — soformatChordgains actrlflag that shows⌃on mac in the command-palette hint.UI
align-self: stretchmatches its height to the text buttons (the icon-only content is shorter than their line-height).Single-PR refresh (not a whole-poller tick)
There was no single-PR refresh IPC;
prs:refreshticks the whole poller. Added:prs:refreshOneIPC +refreshOnePrcontroller: re-fetch just this PR viagetSinglePullRequest, recomputelocalStatusfrom the current user's reviewer status (same rule as the poll), persist its meta, andinvalidateCommentsCache(broadcastscomments:changed→ the open comments / activity / inline-diff refetch). If the head sha advanced, best-effortensureMirrorReadyForPrso the diff renders the new code.usePullRequests.refreshPr(localId): the one network call is this PR's fetch, then a localreloadPrs()(re-derives the list from disk — header / unread / diff head update) — no network poll of other PRs.i18n:
commandPalette.cmdRefreshPr+mainPane.refreshTitlein all four locales.Checks
lint+typecheck(all projects) +build(desktop) pass locally.