Skip to content

feat: add Local filter to show all local git repositories#19

Merged
steipete merged 2 commits intosteipete:mainfrom
zzfadi:feat/local-filter
Jan 22, 2026
Merged

feat: add Local filter to show all local git repositories#19
steipete merged 2 commits intosteipete:mainfrom
zzfadi:feat/local-filter

Conversation

@zzfadi
Copy link
Contributor

@zzfadi zzfadi commented Jan 19, 2026

Summary

Add a new "Local" filter option in the repository filter bar that displays all git repositories found in the configured local folder, including repos that don't have GitHub remotes.

Changes

  • Add local case to MenuRepoSelection enum with isLocalScope property
  • Add RepositoryDisplayModel initializer for local-only repos
  • Fix LocalRepoManager to scan ALL discovered repos, not just GitHub-matching ones
  • Improve bookmark fallback handling for app restart scenarios
  • Filter worktrees from Local scope (accessible via parent repo's "Switch Worktree" submenu)
  • Use repo.id for menu cache keys instead of repo.title (fixes duplicate name issues)
  • Handle duplicate fullName entries in LocalRepoIndex (worktrees share same remote)
  • Defer menu rebuild to next run loop to prevent layout crashes

Test plan

  • Set local projects folder in Settings
  • Click on "Local" filter tab
  • Verify all local git repos appear (including those without GitHub remotes)
  • Verify worktrees do NOT appear as separate entries (only in parent's Switch Worktree submenu)
  • Switch between filters rapidly - no crashes
  • Quit and restart app - verify local repos load automatically

🤖 Generated with Claude Code

Screenshot 2026-01-18 at 11 18 01 PM

Add a new "Local" filter option in the repository filter bar that displays
all git repositories found in the configured local folder, including repos
that don't have GitHub remotes (local-only repos).

Changes:
- Add `local` case to MenuRepoSelection enum with isLocalScope property
- Add RepositoryDisplayModel initializer for local-only repos
- Add isLocalOnly computed property for future submenu handling
- Fix LocalRepoManager to scan ALL discovered repos, not just GitHub-matching
- Reduce filter picker size to accommodate 4 filter options

This enables users to see and manage local repositories that exist only on
their machine without requiring a GitHub remote.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Use repo.id instead of repo.title for menu cache keys (fixes duplicate name issues)
- Remove cached menu items from parent menu before reusing (prevents crash)
- Defer menu rebuild to next run loop to avoid modifying during layout
- Filter worktrees from Local scope (accessible via parent's Switch Worktree submenu)
- Handle duplicate fullNames in LocalRepoIndex (worktrees share same remote)
- Change filter label from "Loc" to "Local"

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@zzfadi
Copy link
Contributor Author

zzfadi commented Jan 19, 2026

Hi @steipete !

This PR and PR #20 are aimed to make foundation for better local management to add worktree visualization and control.

This is my first contribution ever to open source. While I've always been passionate about it, in my other life I'm a firmware engineer working with Embedded Systems in Corporate world.

I would appreciate any guidance and feedback, I'll take it and don't mind redoing any work.

I see RepoBar is aimed at Github sign in only. Is this intentional or is it okay to add local repo support?

As for worktree visualization, I want to add a graph visualization and a clean up script to analyze worktrees and give insights for which ones might be ready to clean up, and provide a clean up option. This is to mitigate having worktrees by Claude and Github Copilot (and any other agents) where when it's done working on a task, it doesn't clean up.

The issue could also be solved with a prompt file or simple agent Skill. Where the RepoBar will run its scripts to find worktrees, user selects one to clean up, and if they want more than nuke clean up, they can copy a prompt with paths and pass to an agent to do the job. Maybe overshooting here, but the clean up script (no AI or prompts) should be a good start.

Please let me know what you think and I'll move forward.
Thank you so much for your time and amazing work!

Cheers,
Fadi Al Zuabi

@zzfadi
Copy link
Contributor Author

zzfadi commented Jan 20, 2026

Here's a current view of the local filter. In the later part of the video, I show the options and views I'm planning to add to RepoBar, along with the cleanup analysis and graph view. Currently running on a notch type app I'm working on, but same should be possible in RepoBar as well.

Untitled.video-1_19_2026.4_58.PM.mp4

@steipete steipete merged commit 2fb4662 into steipete:main Jan 22, 2026
1 check passed
@zzfadi zzfadi deleted the feat/local-filter branch January 24, 2026 21:31
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.

2 participants