fix(prs): Make r/R refresh properly update reviewer status as expected#746
Merged
dlvhdr merged 1 commit intodlvhdr:mainfrom Feb 6, 2026
Merged
Conversation
8438b10 to
dcc23b6
Compare
Owner
|
I honestly don't know what's our use case for caching a PR for 5 minutes. I can only think of issues it might cause. WTYT about removing it? am I missing something? |
Contributor
Author
The GraphQLClient calls are relatively slow, and they count against the user’s GH rate-limit quota. But that only matters if we’re making relatively a lot of them, and often. Neither of which we’re doing — so yeah, I’ll make an update here that just removes it. |
Previously, FetchPullRequest and FetchIssue used a separate cachedClient with a 5-minute GraphQL cache TTL. That meant that after someone approved a PR, pressing “r” or “R” to refresh in gh-dash wouldn’t update the reviewer status — the enriched PR data was still being served from cache. Fix this by removing the cachedClient entirely and having FetchPullRequest and FetchIssue use the same shared client as the list-fetch functions. Each call now gets fresh data from GitHub. Fixes dlvhdr#745
dcc23b6 to
f180d22
Compare
Contributor
Author
|
Update pushed |
dlvhdr
approved these changes
Feb 6, 2026
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.
Summary
Previously,
FetchPullRequestandFetchIssueused a separatecachedClientwith a 5-minute GraphQL cache TTL. That meant that after someone approved a PR, pressing “r” or “R” to refresh in gh-dash wouldn’t update the reviewer status — the enriched PR data was still being served from cache.This PR fixes the problem by removing the
cachedCliententirely and havingFetchPullRequestandFetchIssueuse the same sharedclientas the list-fetch functions (FetchPullRequests/FetchIssues). Each call now gets fresh data from GitHub.Fixes #745
How did you test this change?
go test ./...passes