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 82.24719% with 79 lines in your changes missing coverage. Please review.
✅ Project coverage is 46.89%. Comparing base (7ed5ab0) to head (28b0a09).
⚠️ Report is 25 commits behind head on main.

Files with missing lines Patch % Lines
internal/commands/permission.go 67.85% 16 Missing and 11 partials ⚠️
internal/printers/debug.go 0.00% 23 Missing ⚠️
internal/printers/html.go 91.91% 15 Missing and 7 partials ⚠️
internal/printers/trace_presentation.go 89.39% 5 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #570      +/-   ##
==========================================
+ Coverage   39.28%   46.89%   +7.61%     
==========================================
  Files          37       39       +2     
  Lines        5448     5175     -273     
==========================================
+ Hits         2140     2427     +287     
+ Misses       3063     2462     -601     
- Partials      245      286      +41     

☔ 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 5 times, most recently from bc68ca9 to 20fe462 Compare October 22, 2025 05:31
@ivanauth ivanauth force-pushed the feature/html-explain-output branch from 20fe462 to 48fdf5f Compare December 13, 2025 01:59
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 48fdf5f to 28b0a09 Compare December 19, 2025 23:54
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