fix: exclude empty sibling directories from reporting when peers have visible files#32
Merged
Merged
Conversation
- Add `_has_visible_files` helper to check whether a directory directly contains at least one visible (non-ignored, non-ontrack.yml) file. - In `_find_reporting_directories`, after collecting results from all subdirectories, filter out any empty-leaf entries when the result set also contains directories that have visible files. An empty directory is still reported when it is the only (or deepest) reachable leaf, but is silently dropped when it would otherwise appear alongside real content. - Add `test_find_reporting_directories_empty_sibling_not_reported` to reproduce the bug and verify the fix. Agent-Logs-Url: https://github.com/FertigLab/ontrack/sessions/9d81e458-efda-4b1c-892b-4525bad9e81e Co-authored-by: dimalvovs <1246862+dimalvovs@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
dimalvovs
May 20, 2026 19:57
View session
dimalvovs
approved these changes
May 20, 2026
Agent-Logs-Url: https://github.com/FertigLab/ontrack/sessions/101e0071-7411-4437-a466-286653c5aab8 Co-authored-by: dimalvovs <1246862+dimalvovs@users.noreply.github.com>
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.
Uh oh!
There was an error while loading. Please reload this page.