Skip to content

fix(prs): Make r/R refresh properly update reviewer status as expected#746

Merged
dlvhdr merged 1 commit intodlvhdr:mainfrom
sideshowbarker:sideshowbarker/fix-reviewer-refresh-cache
Feb 6, 2026
Merged

fix(prs): Make r/R refresh properly update reviewer status as expected#746
dlvhdr merged 1 commit intodlvhdr:mainfrom
sideshowbarker:sideshowbarker/fix-reviewer-refresh-cache

Conversation

@sideshowbarker
Copy link
Contributor

@sideshowbarker sideshowbarker commented Jan 21, 2026

Summary

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.

This PR fixes the problem by removing the cachedClient entirely and having FetchPullRequest and FetchIssue use the same shared client as 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

@sideshowbarker sideshowbarker force-pushed the sideshowbarker/fix-reviewer-refresh-cache branch 3 times, most recently from 8438b10 to dcc23b6 Compare January 22, 2026 06:44
@dlvhdr
Copy link
Owner

dlvhdr commented Jan 28, 2026

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?

@sideshowbarker
Copy link
Contributor Author

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?

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
@sideshowbarker sideshowbarker force-pushed the sideshowbarker/fix-reviewer-refresh-cache branch from dcc23b6 to f180d22 Compare February 3, 2026 13:09
@sideshowbarker
Copy link
Contributor Author

Update pushed

@dlvhdr dlvhdr merged commit 3f054a8 into dlvhdr:main Feb 6, 2026
3 checks passed
@sideshowbarker sideshowbarker deleted the sideshowbarker/fix-reviewer-refresh-cache branch February 6, 2026 10:41
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.

[BUG] PR reviewers are not updated when pressing r or R

2 participants