feat(code): use chosen diff source for badge#1865
feat(code): use chosen diff source for badge#1865adboio wants to merge 1 commit into04-23-feat_code_add_pr_diff_sourcefrom
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
4b3c7ed to
ac10d2a
Compare
ac10d2a to
60dc9f6
Compare
0459081 to
82824d0
Compare
60dc9f6 to
0e73fab
Compare
1ff05ce to
ce4f443
Compare
4e86a3d to
7dafcbd
Compare
ce4f443 to
58ec2e3
Compare
7dafcbd to
58ca4e0
Compare
Prompt To Fix All With AIThis is a comment left during a code review.
Path: apps/code/src/renderer/features/git-interaction/hooks/useGitQueries.ts
Line: 183-184
Comment:
**Silent badge staleness when branch changes**
`refetchInterval: false` means the badge will show branch-diff counts from up to 5 minutes ago without any background refresh. If a user pushes a new commit while watching the badge, the count won't update until they trigger a manual refetch. The previous 30-second interval was actively keeping the displayed counts fresh. Given the badge is specifically meant to reflect the *current* diff, consider whether `false` is the right choice here, or whether a longer-but-nonzero interval (e.g., 60 s) would be a better trade-off.
How can I resolve this? If you propose a fix, please make it concise.Reviews (1): Last reviewed commit: "feat(code): use chosen diff source for b..." | Re-trigger Greptile |
| staleTime: pollFast ? 10_000 : 5 * 60_000, | ||
| refetchInterval: pollFast ? 10_000 : false, |
There was a problem hiding this comment.
Silent badge staleness when branch changes
refetchInterval: false means the badge will show branch-diff counts from up to 5 minutes ago without any background refresh. If a user pushes a new commit while watching the badge, the count won't update until they trigger a manual refetch. The previous 30-second interval was actively keeping the displayed counts fresh. Given the badge is specifically meant to reflect the current diff, consider whether false is the right choice here, or whether a longer-but-nonzero interval (e.g., 60 s) would be a better trade-off.
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/code/src/renderer/features/git-interaction/hooks/useGitQueries.ts
Line: 183-184
Comment:
**Silent badge staleness when branch changes**
`refetchInterval: false` means the badge will show branch-diff counts from up to 5 minutes ago without any background refresh. If a user pushes a new commit while watching the badge, the count won't update until they trigger a manual refetch. The previous 30-second interval was actively keeping the displayed counts fresh. Given the badge is specifically meant to reflect the *current* diff, consider whether `false` is the right choice here, or whether a longer-but-nonzero interval (e.g., 60 s) would be a better trade-off.
How can I resolve this? If you propose a fix, please make it concise.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
9e9fb6d to
db71e1d
Compare
58ca4e0 to
af51513
Compare

Problem
diff badge always shows counts from local state even when another source is chosen
Changes
updates diff badge to use the same diff source as the review panel (user-selected, or automatically selected)
How did you test this?
manually