Skip to content

🎨 Mosaic: UI Polish for Policy Check#603

Open
madmax983 wants to merge 1 commit into
trunkfrom
mosaic-policy-check-ui-polish-17890742331491855740
Open

🎨 Mosaic: UI Polish for Policy Check#603
madmax983 wants to merge 1 commit into
trunkfrom
mosaic-policy-check-ui-polish-17890742331491855740

Conversation

@madmax983
Copy link
Copy Markdown
Owner

🖌️ 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.


PR created automatically by Jules for task 17890742331491855740 started by @madmax983

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>
@google-labs-jules
Copy link
Copy Markdown
Contributor

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/run/policy_check.rs
Comment on lines +240 to +242
use comfy_table::Table;
use comfy_table::modifiers::UTF8_ROUND_CORNERS;
use comfy_table::presets::UTF8_FULL;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Import ContentArrangement from comfy-table to support dynamic column wrapping for long command strings.

Suggested change
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;

Comment thread src/run/policy_check.rs
Comment on lines +264 to +268
let mut table = Table::new();
table
.load_preset(UTF8_FULL)
.apply_modifier(UTF8_ROUND_CORNERS)
.set_header(vec!["command", "verdict", "matching_rule", "profile"]);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Suggested change
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
Copy link
Copy Markdown

codecov Bot commented Jun 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.19%. Comparing base (9aa2ad9) to head (61da367).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant