fix(desktop): discover nested local repositories - #4035
Conversation
60077fe to
346d7cc
Compare
|
Rebased this branch onto current The submission remains valid. Current The rebase was clean. The branch still keeps discovery bounded to four levels, rejects symlink escapes, deduplicates in-root aliases by canonical path, and stops at repository boundaries. No dependency, configuration, or rendered-UI behavior changed. Verification at head
The branch is current with |
346d7cc to
6064a8b
Compare
Review and rebase summaryReviewed the PR for accuracy against current What this PR doesExtracts repo discovery into a bounded recursive walker ( Accuracy review
Rebase resultHead moved from CIDCO, Semgrep OSS, and zizmor all pass on the rebased head. |
6064a8b to
7da03e7
Compare
Rebase and accuracy review (2026-08-07)Rebased onto current Branch state: Accuracy reviewAdds nested local repository discovery by scanning subdirectories one level deep under known project roots. The new No |
7da03e7 to
921c23d
Compare
|
This is the third recurring review + rebase pass for the open BradGroux PRs on What this PR doesExtends local repository discovery in the desktop app to find Git working trees nested in subdirectories below a configured repositories root, rather than only scanning one level deep. The new The existing Correctness
Rebase resultAlready based on current main (
No code changes were made — this was a review + rebase pass only. |
Signed-off-by: Brad Groux <3053586+BradGroux@users.noreply.github.com> Co-authored-by: Brad Groux <bradgroux@hotmail.com> Signed-off-by: Brad Groux <bradgroux@hotmail.com>
921c23d to
b0eff50
Compare
|
Portfolio review update (2026-08-09) I rechecked nested repository discovery against current I rebased the branch onto |
Summary
Buzz currently treats each configured repositories directory as a flat list. That misses projects organized under common grouping folders such as
~/code/client/web-appor~/code/projects/buzz-tools, even though those paths are still inside the configured root.This change adds one shared, bounded repository-discovery path and uses it for both local repository listing and project checkout resolution.
Problem
Two code paths assumed repositories were direct children of the configured root:
list_project_local_repositoriesread only the root's immediate entries.find_local_repo_dirchecked only<repos_root>/<candidate>.As a result, nested repositories were absent from the Desktop repository list and could not be resolved for project operations. Users had to create direct-child symlinks as a workaround.
Approach
The new
project_repo_discoveryhelper applies the same traversal contract everywhere:.gitas a terminal repository boundary. Discovery does not descend into a checkout and surface its submodules or nested repositories separately.list_project_local_repositoriesnow consumes the helper and retains its existing cross-root path deduplication.find_local_repo_dirpreserves the existing direct-child fast path. If that misses, it searches discovered repositories by candidate name and retains the existing clone-origin check when a clone URL is available.Discovery behavior
<root>/repo/.git<root>/client/web-app/.gitRelated issue
Fixes #4013
Duplicate search: no overlapping open pull request found before implementation or publication.
Testing
Focused coverage verifies:
find_local_repo_dir.Commands run:
cargo test --manifest-path desktop/src-tauri/Cargo.toml --lib commands::project_repo -- --nocapture(4 passed)cargo check --manifest-path desktop/src-tauri/Cargo.toml --libjust ci: all workspace, Desktop, web, Tauri, build, lint, and analysis gates passed. The final mobile suite remains blocked by the reproducible current-main failureChannelDetailPage keeps follow mode off while a tall newest message stays visibleatmobile/test/features/channels/channel_detail_page_test.dart:1053; 1,021 mobile tests passed and 1 was skipped before the suite reported that single failure. This PR does not change mobile sources.Scope and tradeoffs