Repository navigation
feat(visualization): write diagrams to an Excalidraw file - #17052
Conversation
…m_target excalidraw-file diagram_target gains excalidraw-file. /visualization:visualize writes a flow, flowchart, state diagram or swim lane (one labeled frame per lane) as docs/diagrams/<name>.excalidraw at the repository root, for the person to open and edit in an Excalidraw editor. It needs no canvas server and no network, so it works in the Claude Code terminal and hosted_canvas does not gate it. The skill drafts the file in a private temp directory, runs lib/diagram-file-check.mjs on it, asks before replacing an existing file (and replaces nothing when unattended), never stages or commits it, and reports the absolute path. Outside a repository, or when the check keeps failing, it falls back to auto with the one-line notice. A resolved medium does not override the file target; a medium argument, a form the person names, or a calling skill that needs the fenced form for its own document does. /planning:design now asks for the fenced form, so a file target never replaces the diagram its typed artifact holds. The structural check refuses what the Excalidraw loader rejects or silently drops (wrong file marker, non-numeric version, unknown element types, missing positions or sizes, duplicate ids, dangling frame, container and binding references) and anything that reaches outside the file when opened (links, images, embeds). Co-Authored-By: Claude Opus 5.5 <[email protected]>
When the shell could not make the private run directory, the skill gave up on the excalidraw-file target and drew Mermaid. It now writes the draft with the Write tool and uses auto only when that write fails too. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0acdb1826e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Lane run report
Failed GitHub API calls
|
Excalidraw's loader keeps a missing fontSize and divides by it to find the line height, so a label could vanish when the file opened. The check now requires a positive fontSize and a positive lineHeight when one is given. The Node suite also gains the shell wrapper the test lanes need. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
claude-security-review reviewed Security review (incremental): PR #17052,
|
|
claude-review reviewed Incremental code review:
|
No related issue: a new diagram target for the visualization plugin, with no tracked issue behind it.
Summary
/visualization:visualizecan now write a diagram to an Excalidraw file in the repository, so a person can open and edit it in an editor without a canvas server or network access.Fix
diagram_targetgainsexcalidraw-file, which writes a flow, flowchart, state diagram or swim lane todocs/diagrams/<name>.excalidrawat the git top level. Outside a repository, or at$HOMEor above, it falls back toauto.lib/diagram-file-check.mjschecks each draft before it reaches the repository: it refuses what the Excalidraw loader rejects or drops, and anything that reaches outside the file when opened./planning:designasks for the fenced form, so a file target never replaces the diagram in its typed artifact.Verification
claude plugin eval, caseviz-diagram-target-excalidraw-file: on the final head, 2 of 2 completed runs scored 1.00. On the commit before the font size check, 5 of 5 scored 1.00, against 0.25 without the plugin.claude plugin eval, caseviz-diagram-target-file-no-repo: 3 of 3 runs scored 1.00, on the commit before the font size check.plugins/visualization/tests/diagram-file-check.test.sh: all 6 tests passed.Related
N/A
🤖 Generated with Claude Code