close
Skip to content

feat(code): use chosen diff source for badge#1865

Merged
adboio merged 1 commit intomainfrom
04-23-feat_code_use_chosen_diff_source_for_badge
Apr 27, 2026
Merged

feat(code): use chosen diff source for badge#1865
adboio merged 1 commit intomainfrom
04-23-feat_code_use_chosen_diff_source_for_badge

Conversation

@adboio
Copy link
Copy Markdown
Contributor

@adboio adboio commented Apr 23, 2026

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)

Screenshot 2026-04-23 at 10.48.58 AM.png

Screenshot 2026-04-23 at 10.49.10 AM.png

How did you test this?

manually

Copy link
Copy Markdown
Contributor Author

adboio commented Apr 23, 2026

@adboio adboio force-pushed the 04-23-feat_code_use_chosen_diff_source_for_badge branch from 4b3c7ed to ac10d2a Compare April 23, 2026 14:55
@adboio adboio force-pushed the 04-23-feat_code_use_chosen_diff_source_for_badge branch from ac10d2a to 60dc9f6 Compare April 23, 2026 19:21
@adboio adboio force-pushed the 04-23-feat_code_add_pr_diff_source branch from 0459081 to 82824d0 Compare April 23, 2026 19:21
@adboio adboio force-pushed the 04-23-feat_code_use_chosen_diff_source_for_badge branch from 60dc9f6 to 0e73fab Compare April 24, 2026 21:33
@adboio adboio force-pushed the 04-23-feat_code_add_pr_diff_source branch 2 times, most recently from 1ff05ce to ce4f443 Compare April 24, 2026 22:14
@adboio adboio force-pushed the 04-23-feat_code_use_chosen_diff_source_for_badge branch 2 times, most recently from 4e86a3d to 7dafcbd Compare April 24, 2026 22:29
@adboio adboio force-pushed the 04-23-feat_code_add_pr_diff_source branch from ce4f443 to 58ec2e3 Compare April 24, 2026 22:29
@adboio adboio requested a review from a team April 24, 2026 22:35
@adboio adboio force-pushed the 04-23-feat_code_use_chosen_diff_source_for_badge branch from 7dafcbd to 58ca4e0 Compare April 24, 2026 22:47
@adboio adboio marked this pull request as ready for review April 24, 2026 22:48
@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Apr 24, 2026

Prompt To Fix All 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.

Reviews (1): Last reviewed commit: "feat(code): use chosen diff source for b..." | Re-trigger Greptile

Comment on lines +183 to +184
staleTime: pollFast ? 10_000 : 5 * 60_000,
refetchInterval: pollFast ? 10_000 : false,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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!

@adboio adboio force-pushed the 04-23-feat_code_add_pr_diff_source branch 2 times, most recently from 9e9fb6d to db71e1d Compare April 24, 2026 22:50
@adboio adboio force-pushed the 04-23-feat_code_use_chosen_diff_source_for_badge branch from 58ca4e0 to af51513 Compare April 24, 2026 22:50
Copy link
Copy Markdown
Contributor Author

adboio commented Apr 27, 2026

Merge activity

  • Apr 27, 3:56 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Apr 27, 3:58 PM UTC: Graphite rebased this pull request as part of a merge.
  • Apr 27, 4:10 PM UTC: @adboio merged this pull request with Graphite.

@adboio adboio changed the base branch from 04-23-feat_code_add_pr_diff_source to graphite-base/1865 April 27, 2026 15:57
@adboio adboio changed the base branch from graphite-base/1865 to main April 27, 2026 15:57
@adboio adboio force-pushed the 04-23-feat_code_use_chosen_diff_source_for_badge branch from af51513 to bb47a2d Compare April 27, 2026 15:57
@adboio adboio merged commit 23bb331 into main Apr 27, 2026
16 checks passed
@adboio adboio deleted the 04-23-feat_code_use_chosen_diff_source_for_badge branch April 27, 2026 16:10
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.

2 participants