Skip to content

Conversation

@curtis2point1
Copy link

Summary

  • Fix rescan shortcut (r) to bypass cache and fetch fresh git status
  • Previously, rescan returned cached data if cache was < 5 minutes old, making it ineffective

Problem

When pressing r to rescan, the app calls scanReposCmd() which checks cache first. If the cache is valid (< 5 min) and roots haven't changed, it returns stale data. Users had to quit and restart the app to see updated dirty/clean status.

Solution

Added forceRefresh bool parameter to scanReposCmd():

  • r (rescan) and workspace switch now pass true to bypass cache
  • Initial load still passes false to benefit from fast cached startup

Test plan

  • Run git-scope, note a repo's status
  • In another terminal, make a change in that repo (e.g., touch newfile)
  • Press r to rescan — status should update immediately
  • Restart app — should still load quickly from cache on startup

🤖 Generated with Claude Code

Added forceRefresh parameter to scanReposCmd():
- rescan (r) and workspace switch pass true to bypass cache
- initial load passes false to keep fast cached startup

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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