feat(output): show blocked macos grants in capability summary - #1178
Conversation
Previously, macOS user-granted paths that were silently blocked by deny groups were logged as individual warnings. This could lead to a large number of warnings when a broad user grant (e.g., `~/Library`) overlapped with multiple deny groups. This commit refactors the logic to collect these blocked grants and present them in the capability summary. The new display is collapsed into a single line by default, indicating the number of paths blocked. Using the `-v` (verbose) flag expands the summary to list each specific path and the deny rule that blocks it, along with a hint about how to use `--bypass-protection`. This significantly improves readability and user experience by folding multiple related warnings into a concise summary. Signed-off-by: Luke Hinds <lukehinds@gmail.com>
PR Review SummarySize
Affected crates
Blast radius — ContainedThis PR touches: source code Updated automatically on each push to this PR. |
There was a problem hiding this comment.
Code Review
This pull request refactors how silently blocked user-granted paths on macOS are handled. Instead of printing individual warnings immediately, they are now collected into blocked_grants and folded into a single row in the capability summary (expandable with -v). The review feedback suggests two performance optimizations in crates/nono-cli/src/output.rs to avoid unnecessary string allocations when grouping and rendering these blocked paths.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
- Use `Path::to_string_lossy` for displaying paths in `print_blocked_grants`. This provides more robust handling of non-UTF-8 characters and avoids unnecessary `String` allocations compared to `Path::display().to_string()`. - Optimize string handling when grouping blocked grants by deferring `.to_string()` calls until group names are inserted into the `groups` vector, reducing temporary allocations. - Reorder test module imports in `output.rs` for minor style consistency. Signed-off-by: Luke Hinds <lukehinds@gmail.com>
…-ai#1178) * feat(output): show blocked macos grants in capability summary Previously, macOS user-granted paths that were silently blocked by deny groups were logged as individual warnings. This could lead to a large number of warnings when a broad user grant (e.g., `~/Library`) overlapped with multiple deny groups. This commit refactors the logic to collect these blocked grants and present them in the capability summary. The new display is collapsed into a single line by default, indicating the number of paths blocked. Using the `-v` (verbose) flag expands the summary to list each specific path and the deny rule that blocks it, along with a hint about how to use `--bypass-protection`. This significantly improves readability and user experience by folding multiple related warnings into a concise summary. Signed-off-by: Luke Hinds <lukehinds@gmail.com> * refactor(output): improve path display and string allocations - Use `Path::to_string_lossy` for displaying paths in `print_blocked_grants`. This provides more robust handling of non-UTF-8 characters and avoids unnecessary `String` allocations compared to `Path::display().to_string()`. - Optimize string handling when grouping blocked grants by deferring `.to_string()` calls until group names are inserted into the `groups` vector, reducing temporary allocations. - Reorder test module imports in `output.rs` for minor style consistency. Signed-off-by: Luke Hinds <lukehinds@gmail.com> --------- Signed-off-by: Luke Hinds <lukehinds@gmail.com> (cherry picked from commit a0bba5e) Signed-off-by: oscarmackjr-twg <oscar.mack.jr@gmail.com>
…-ai#1178) * feat(output): show blocked macos grants in capability summary Previously, macOS user-granted paths that were silently blocked by deny groups were logged as individual warnings. This could lead to a large number of warnings when a broad user grant (e.g., `~/Library`) overlapped with multiple deny groups. This commit refactors the logic to collect these blocked grants and present them in the capability summary. The new display is collapsed into a single line by default, indicating the number of paths blocked. Using the `-v` (verbose) flag expands the summary to list each specific path and the deny rule that blocks it, along with a hint about how to use `--bypass-protection`. This significantly improves readability and user experience by folding multiple related warnings into a concise summary. Signed-off-by: Luke Hinds <lukehinds@gmail.com> * refactor(output): improve path display and string allocations - Use `Path::to_string_lossy` for displaying paths in `print_blocked_grants`. This provides more robust handling of non-UTF-8 characters and avoids unnecessary `String` allocations compared to `Path::display().to_string()`. - Optimize string handling when grouping blocked grants by deferring `.to_string()` calls until group names are inserted into the `groups` vector, reducing temporary allocations. - Reorder test module imports in `output.rs` for minor style consistency. Signed-off-by: Luke Hinds <lukehinds@gmail.com> --------- Signed-off-by: Luke Hinds <lukehinds@gmail.com>
Previously, macOS user-granted paths that were silently blocked by deny groups were logged as individual warnings. This could lead to a large number of warnings when a broad user grant (e.g.,
~/Library) overlapped with multiple deny groups.This commit refactors the logic to collect these blocked grants and present them in the capability summary. The new display is collapsed into a single line by default, indicating the number of paths blocked. Using the
-v(verbose) flag expands the summary to list each specific path and the deny rule that blocks it, along with a hint about how to use--bypass-protection. This significantly improves readability and user experience by folding multiple related warnings into a concise summary.Linked Issue
Closes #1176
CHANGELOG.mdif needed