Skip to content

fix: refresh GitHub status on activity#45

Merged
AmethystLiang merged 1 commit intomainfrom
AmethystLiang/syncGhIssueStatus
Mar 23, 2026
Merged

fix: refresh GitHub status on activity#45
AmethystLiang merged 1 commit intomainfrom
AmethystLiang/syncGhIssueStatus

Conversation

@AmethystLiang
Copy link
Copy Markdown
Contributor

Summary

  • Refresh GitHub data (PR/issue status) on activity: triggers refresh when switching worktrees (setActiveWorktree) and when the window regains focus (visibilitychange)
  • New store actions: refreshAllGitHub invalidates all cache entries and re-fetches; refreshGitHubForWorktree does the same for a single worktree
  • Background poll for issues: 5-minute interval fallback in WorktreeCard ensures issue data stays fresh even without user interaction
  • Fix: skip redundant GitHub refresh when re-clicking the already-active worktree

Test plan

  • Switch between worktrees and verify PR/issue badges update
  • Tab away from the app, change a PR/issue status on GitHub, tab back — verify the status updates
  • Click the same worktree card repeatedly — verify no unnecessary API calls in network tab
  • Leave app open on a worktree with a linked issue for >5 minutes — verify issue data refreshes via background poll

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@AmethystLiang AmethystLiang force-pushed the AmethystLiang/syncGhIssueStatus branch from b659f1a to e4ccfc5 Compare March 23, 2026 16:23
@AmethystLiang AmethystLiang merged commit 596aac5 into main Mar 23, 2026
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.

1 participant