Skip to content

feat: auto-refresh worktree list via filesystem watcher#19

Merged
rrbe merged 2 commits intomainfrom
feat/worktree-auto-refresh
Mar 29, 2026
Merged

feat: auto-refresh worktree list via filesystem watcher#19
rrbe merged 2 commits intomainfrom
feat/worktree-auto-refresh

Conversation

@rrbe
Copy link
Copy Markdown
Owner

@rrbe rrbe commented Mar 29, 2026

Summary

  • Watch .git/worktrees/ directory using the notify crate (FSEvents on macOS) to detect external worktree add/remove operations and auto-refresh the list
  • Add a manual refresh icon button (right-aligned in worktree toolbar) as a fallback
  • Emit worktrees-changed Tauri event from Rust backend with 500ms debounce; frontend listens and calls loadRepoInner() to refresh

Test plan

  • Run pnpm tauri:dev, open a repo
  • In terminal, run git worktree add ../test-wt -b test-branch — verify worktree list auto-refreshes
  • In terminal, run git worktree remove ../test-wt — verify worktree list auto-refreshes
  • Click the refresh icon button — verify manual refresh works
  • Verify refresh button is right-aligned in the toolbar, visually consistent in both light and dark mode

🤖 Generated with Claude Code

rrbe and others added 2 commits March 29, 2026 23:13
Watch .git/worktrees/ for changes using the `notify` crate (FSEvents on
macOS) so the worktree list updates automatically when worktrees are
added or removed externally (e.g. via terminal). Also adds a manual
refresh button in the worktree toolbar as a fallback.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@rrbe rrbe merged commit 0bd2a0a into main Mar 29, 2026
3 checks passed
@rrbe rrbe deleted the feat/worktree-auto-refresh branch March 29, 2026 15:52
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