Skip to content

Conversation

@ivanauth
Copy link
Contributor

@ivanauth ivanauth commented Oct 22, 2025

Summary

This PR adds --html and --html-output flags to the zed permission check and zed permission check-bulk commands. These options generate interactive HTML visualizations of permission traces, making it easier to explore and share trace results.

Key Updates

TracePresentation helper – Shared logic between the HTML and console renderers to keep icons and styling consistent.

Self-contained output – Includes embedded CSS using the VS Code Dark+ theme (with auto light mode), no external assets required.

Memory pooling – Uses a sync.Pool for efficient memory reuse during bulk operations.

Examples

Added example outputs in docs/html-examples/ covering simple, nested, caveated, and bulk trace cases.

@codecov-commenter
Copy link

codecov-commenter commented Oct 22, 2025

Codecov Report

❌ Patch coverage is 81.56028% with 104 lines in your changes missing coverage. Please review.
✅ Project coverage is 46.40%. Comparing base (7ed5ab0) to head (20fe462).
⚠️ Report is 12 commits behind head on main.

Files with missing lines Patch % Lines
internal/printers/html.go 90.47% 26 Missing and 8 partials ⚠️
internal/commands/permission.go 65.97% 22 Missing and 11 partials ⚠️
internal/printers/debug.go 0.00% 28 Missing ⚠️
internal/printers/trace_presentation.go 89.02% 7 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #570      +/-   ##
==========================================
+ Coverage   39.28%   46.40%   +7.12%     
==========================================
  Files          37       39       +2     
  Lines        5448     6340     +892     
==========================================
+ Hits         2140     2942     +802     
- Misses       3063     3109      +46     
- Partials      245      289      +44     

☔ View full report in Codecov by Sentry.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ivanauth ivanauth force-pushed the feature/html-explain-output branch 4 times, most recently from ce98ec7 to bc68ca9 Compare October 22, 2025 05:24
Summary
Adds --html and --html-output flags to zed permission check and zed permission check-bulk commands to generate interactive HTML visualizations of permission traces.

Key Features
TracePresentation helper: Shared presentation logic between HTML and console renderers for consistent icons and styling
Self-contained output: Embedded CSS with VS Code Dark+ theme, automatic light mode, no external dependencies
Memory pooling: Efficient bulk operations with sync.Pool pattern
UI polish: Collapsible context, subject bullet icons, styled missing-context boxes, XSS protection
Examples
Examples in docs/html-examples/ covering simple, nested, caveated, and bulk scenarios.

Test Plan
go test ./internal/printers -v
go test ./internal/commands -v
@ivanauth ivanauth force-pushed the feature/html-explain-output branch from bc68ca9 to 20fe462 Compare October 22, 2025 05:31
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.

2 participants