docs: convert ASCII diagrams to Mermaid with dark-theme colors#138
Conversation
Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io>
Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review infoConfiguration used: Organization UI Review profile: CHILL Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (3)
Summary by CodeRabbit
WalkthroughDocumentation updates across three markdown files: enriched Mermaid diagram styling in architecture.md, corrected type naming from Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Poem
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Merge ProtectionsYour pull request matches the following merge protections and will not be merged until they are valid. 🟠 CI must passWaiting checks:
|
There was a problem hiding this comment.
Pull request overview
This PR updates the project documentation to replace ASCII diagrams with Mermaid diagrams and adjusts Mermaid styling to be readable in dark themes, while also aligning some docs with updated evaluator type naming.
Changes:
- Converted ASCII trust-boundary and output conversion pipeline diagrams to Mermaid flowcharts.
- Updated Mermaid diagram styling (fills/strokes/text colors) to be dark-theme compatible.
- Updated
output.mdreferences fromevaluator::MatchResulttoevaluator::RuleMatch.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| docs/src/security-assurance.md | Replaces the trust boundary ASCII diagram with a Mermaid diagram and adds dark-theme styling. |
| docs/src/output.md | Updates evaluator type references and replaces ASCII pipeline diagrams with Mermaid flowcharts. |
| docs/src/architecture.md | Updates Mermaid diagram styling to dark-theme colors and adjusts hierarchical processing diagram labels. |
| R -->|match| C1["Child Rule 1<br/>e.g., #gt;4 ubyte 0x14"] | ||
| R -->|match| C2["Child Rule 2<br/>e.g., #gt;4 ubyte 0x06"] |
There was a problem hiding this comment.
#gt; is not a valid HTML escape for > and will render literally in the node labels. If the goal is to avoid Mermaid/Markdown parsing issues with >, use > (or remove the > from the label text) so the diagram renders correctly and matches the PR’s intent of fixing the >-related syntax issue.
| R -->|match| C1["Child Rule 1<br/>e.g., #gt;4 ubyte 0x14"] | |
| R -->|match| C2["Child Rule 2<br/>e.g., #gt;4 ubyte 0x06"] | |
| R -->|match| C1["Child Rule 1<br/>e.g., >4 ubyte 0x14"] | |
| R -->|match| C2["Child Rule 2<br/>e.g., >4 ubyte 0x06"] |
| subgraph libmagic-rs["libmagic-rs (Trusted Zone)"] | ||
| IO["I/O Layer<br/>mmap files, size limits"] | ||
| CLI["CLI<br/>clap args, validates paths"] | ||
| P["Parser<br/>validates magic syntax"] | ||
| E["Evaluator<br/>bounds-checks all access"] | ||
| O["Output<br/>formats results"] | ||
| end | ||
|
|
||
| IF -- "file bytes" --> IO | ||
| MF -- "magic syntax" --> P | ||
| CA -- "user paths" --> CLI | ||
| IO -- "mapped buffer" --> E | ||
| CLI -- "validated paths" --> IO | ||
| P -- "validated AST" --> E | ||
| E -- "match results" --> O | ||
|
|
||
| style Untrusted fill:#4a1a1a,stroke:#ef5350,color:#e0e0e0,stroke-width:2px | ||
| style libmagic-rs fill:#1b3d1b,stroke:#66bb6a,color:#e0e0e0,stroke-width:2px |
There was a problem hiding this comment.
In Mermaid flowcharts, subgraph identifiers should be simple IDs (typically alphanumeric/underscore). Using libmagic-rs as the subgraph ID risks being parsed incorrectly because of the -, and it’s also referenced in the style directive. Rename the subgraph ID to something like libmagic_rs (and update the corresponding style line) while keeping the displayed label as "libmagic-rs (Trusted Zone)".
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Summary
security-assurance.mdto Mermaid with proper untrusted/trusted zone stylingoutput.mdto Mermaid flowchartsarchitecture.mdhierarchical rule processing diagram (>in node labels broke rendering)architecture.mdand 1 insecurity-assurance.mdwith dark-theme-compatible fills and light textoutput.mdreferences fromevaluator::MatchResulttoevaluator::RuleMatchTest plan
mdbook buildcompletes without errors>characters in node labels🤖 Generated with Claude Code