fix(desktop): discover nested local repositories - #6645
Open
BradGroux wants to merge 1 commit into
Open
Conversation
Contributor
Author
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>
BradGroux
force-pushed
the
agent/project-discovery-subdirectories
branch
from
August 25, 2026 19:16
0ec31fa to
28a2472
Compare
Contributor
Author
|
Rebased onto the latest No review comments on this PR. CI will verify the build and test gate. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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