Skip to content

feat: discover repos one level deeper inside grouping folders#89

Merged
simion merged 1 commit into
simion:mainfrom
Orellius:feat/discover-repos-grouping-folders
Jul 12, 2026
Merged

feat: discover repos one level deeper inside grouping folders#89
simion merged 1 commit into
simion:mainfrom
Orellius:feat/discover-repos-grouping-folders

Conversation

@Orellius

@Orellius Orellius commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

What

discover_repos scans exactly one level under repos_dir, so a layout like code/<category>/<repo> discovers nothing: the category folders are not git repos, and the repos below them are never reached. This PR treats a direct child that is NOT a git repo as a grouping folder and scans its children once more.

Guardrails to keep the list clean and the scan cheap:

  • a child that IS a repo is taken as-is and never descended into (nested clones stay out)
  • hidden directories and node_modules are skipped at both levels
  • activity sorting and the already-added marker are unchanged

Why

Plenty of people organize a projects dir by category (work/, oss/, clients/...). Today discovery silently returns nothing for them, which reads as broken in the Add Project dialog and the first-run wizard. Two levels covers this shape without recursing into build artifacts.

Testing

  • make check-all passes
  • Exercised on a real two-level layout (8 category folders, 23 repos): the automation bridge /eval of settingsLoad() -> discoverRepos() returns all 23, activity-sorted, and the Add Project dialog lists them
  • Flat one-level layouts behave exactly as before (repo children short-circuit)

No CHANGELOG changes per contributing rules. Happy to adjust naming or fold the skip-list differently if you prefer.

discover_repos scanned exactly one level under repos_dir, so a layout
like code/<category>/<repo> discovered nothing (the category folders
are not git repos). A direct child that is not a repo is now treated
as a grouping folder and scanned one more level. Hidden dirs and
node_modules are skipped at both levels, and a repo child is never
descended into, so nested clones stay out of the list. Activity
sorting is unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@simion simion merged commit c5ed84e into simion:main Jul 12, 2026
simion added a commit that referenced this pull request Jul 12, 2026
Adds unit coverage for the #89 grouping-folder discovery: flat layouts,
code/<category>/<repo> descent, mixed top-level repo + grouping, nested
clones staying out (repo children are not descended into), and the
hidden / node_modules skip at both levels.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PFQv2FX8HNKG5yXfSu2ve
@simion

simion commented Jul 12, 2026

Copy link
Copy Markdown
Owner

Merged, thanks! Verified the two-level scan locally against a temp tree (flat, code/<category>/<repo>, mixed top-level repo + grouping, nested-clone short-circuit, and the hidden / node_modules skip) — all behave as described.

Followed up on main with unit coverage for discover_repos in 5367473 so the grouping logic doesn't regress silently.

One behavior note for anyone reading later: the hidden-dir skip now also applies at the top level, so a repo sitting directly at <repos_dir>/.dotfiles is no longer discovered (it was before). Niche, and a fine tradeoff for keeping the descent cheap, just calling it out.

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