🎨 Mosaic: UI Polish for Policy Check#603
Conversation
Improves the layout of `max agent policy-check` by using `comfy-table` to render the output table. 🖌️ Before: The output table of `max agent policy-check` was manually aligned text with spaces, making it look misaligned and less readable than other CLI tools. ✨ After: The CLI now correctly renders a well-formatted Unicode table using `comfy-table` with rounded corners, matching the established Visual Hierarchy of the project's other outputs. 🖼️ Visuals: The `policy-check` table now has clear bounding boxes and a prominent header row formatted seamlessly in the terminal. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
There was a problem hiding this comment.
Code Review
This pull request refactors the policy-check output formatting in src/run/policy_check.rs to use the comfy_table library instead of manual text formatting. The review feedback suggests improving the table layout by importing and enabling ContentArrangement::Dynamic to handle long command strings and prevent terminal overflow.
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 comfy_table::Table; | ||
| use comfy_table::modifiers::UTF8_ROUND_CORNERS; | ||
| use comfy_table::presets::UTF8_FULL; |
There was a problem hiding this comment.
Import ContentArrangement from comfy-table to support dynamic column wrapping for long command strings.
| use comfy_table::Table; | |
| use comfy_table::modifiers::UTF8_ROUND_CORNERS; | |
| use comfy_table::presets::UTF8_FULL; | |
| use comfy_table::{ContentArrangement, Table}; | |
| use comfy_table::modifiers::UTF8_ROUND_CORNERS; | |
| use comfy_table::presets::UTF8_FULL; |
| let mut table = Table::new(); | ||
| table | ||
| .load_preset(UTF8_FULL) | ||
| .apply_modifier(UTF8_ROUND_CORNERS) | ||
| .set_header(vec!["command", "verdict", "matching_rule", "profile"]); |
There was a problem hiding this comment.
Enable dynamic content arrangement on the table. Since command strings can be very long, this ensures that the table wraps cell contents cleanly within the terminal width instead of overflowing and breaking the table layout.
| let mut table = Table::new(); | |
| table | |
| .load_preset(UTF8_FULL) | |
| .apply_modifier(UTF8_ROUND_CORNERS) | |
| .set_header(vec!["command", "verdict", "matching_rule", "profile"]); | |
| let mut table = Table::new(); | |
| table | |
| .load_preset(UTF8_FULL) | |
| .apply_modifier(UTF8_ROUND_CORNERS) | |
| .set_content_arrangement(ContentArrangement::Dynamic) | |
| .set_header(vec!["command", "verdict", "matching_rule", "profile"]); |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## trunk #603 +/- ##
==========================================
- Coverage 85.19% 85.19% -0.01%
==========================================
Files 114 114
Lines 65408 65391 -17
==========================================
- Hits 55725 55707 -18
- Misses 9683 9684 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
🖌️ Before: The output table of
max agent policy-checkwas manually aligned text with spaces, making it look misaligned and less readable than other CLI tools.✨ After: The CLI now correctly renders a well-formatted Unicode table using
comfy-tablewith rounded corners, matching the established Visual Hierarchy of the project's other outputs.🖼️ Visuals: The
policy-checktable now has clear bounding boxes and a prominent header row formatted seamlessly in the terminal.PR created automatically by Jules for task 17890742331491855740 started by @madmax983