docs: add Mermaid diagrams for better readability - #167
Conversation
|
🔍 OpenCodeReview found 2 issue(s) in this PR.
|
62048cd to
f15636f
Compare
485e49e to
12ed5c0
Compare
| - uses: taiki-e/install-action@v2 | ||
| with: | ||
| tool: mdbook-mermaid@0.17.0 |
There was a problem hiding this comment.
This newly added third-party action is pinned only to the mutable v2 tag. Pin it to a full commit SHA (while retaining the version in a comment) so a future tag movement or repository compromise cannot alter the documentation build.
Suggestion:
| - uses: taiki-e/install-action@v2 | |
| with: | |
| tool: mdbook-mermaid@0.17.0 | |
| - uses: taiki-e/install-action@<full-commit-sha> # v2 | |
| with: | |
| tool: mdbook-mermaid@0.17.0 |
12ed5c0 to
a82b68e
Compare
| - uses: taiki-e/install-action@v2 | ||
| with: | ||
| tool: mdbook-mermaid@0.17.0 |
There was a problem hiding this comment.
| edit-url-template = "https://github.com/kvcache-ai/AgentENV/edit/main/docs/{path}" | ||
| additional-css = ["theme/version-selector.css"] | ||
| additional-js = ["theme/version-selector.js"] | ||
| additional-js = ["theme/version-selector.js", "mermaid-init.js"] |
There was a problem hiding this comment.
mermaid-init.js looks up mdbook-theme-* element IDs, but mdBook's built-in theme links use theme-* (for example, theme-light, theme-coal, and theme-ayu). Consequently none of these listeners are attached, so switching between light and dark themes does not reload/re-render Mermaid diagrams and their colors can remain from the initial theme. Use the actual mdBook theme IDs (or listen to the theme-change mechanism) before enabling this script here.
What
Replace selected ASCII architecture and lifecycle diagrams in the mdBook documentation with Mermaid diagrams, and enable Mermaid rendering in the documentation build.
Why
The architecture, sandbox lifecycle, egress-rule, and multi-node control-plane diagrams are easier to read, maintain, and render consistently as Mermaid diagrams than as fixed-width ASCII art.
Related issue
N/A
Scope and non-goals
Design and behavior changes
docs/book.tomlenables themdbook-mermaidpreprocessor and loadsmermaid-init.js.Compatibility and operations
mdbook-mermaid; CI installsmdbook-mermaid@0.17.0.Validation
make fmtmake clippymake test-unitmake -C services test(required whenservices/changes)maketargetCommands and results:
Skipped checks and reasons:
Rust, services, generated-code, and benchmark checks were skipped because this PR only changes documentation and documentation build assets.
Risks and reviewer notes
mdbook-mermaidpreprocessor.Checklist