Repository navigation
feat(visualization): pick the diagram target by surface and add hosted_canvas - #15141
Conversation
…d_canvas /visualization:visualize now draws locally in the Claude Code terminal (a Mermaid or ASCII fence, or a local page) even when a canvas server such as Excalidraw or tldraw is connected, and may draw on a connected canvas only on a surface that renders MCP Apps. A diagram that will be committed stays Mermaid so it diffs and reviews as text. The new hosted_canvas setting (allow by default, or deny) resolves from userConfig, docs/conventions/visualization.yaml and the personal override; deny from any layer wins, so a tracked file cannot undo one person's deny. With deny, no diagram content goes to a canvas server reached over the network; a local server stays allowed, and a server not shown to be local counts as hosted. The plugin bundles no MCP server. The catalog records the MCP Apps surface pointer and points at the official Excalidraw and tldraw servers as optional user-level installs. A schema ships for the team file, the config-cascade Implementers table gains the row, and a new eval case checks that a terminal session with a mocked canvas tool still renders the diagram locally. Co-Authored-By: Claude Opus 5.5 <[email protected]>
- A canvas stands in only for a page: a resolved medium with no page draws none, and one that keeps delivery on the machine uses a local canvas server only. - Under deny, a server counts as local only on the person's word in the session; an MCP configuration cannot prove it, since a process started locally can forward to a remote service. - The team file is read from the working tree and the default branch's committed copy, so a branch cannot drop the team's deny. - Add the visualization Implementers and Root rule rows to the config-cascade contract and regenerate the glance table from them. - Score the eval graders in both arms, since a must-not-invoke check needs arm both. 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. |
|
claude-security-review reviewed Security review: PR #15141, incremental (5ca08b3..9a362fd)This review was blocking only: this lane already reviewed an earlier head, so I report only CRITICAL and IMPORTANT findings. I read every hunk of all 3 files in scope: the changelog fragment, the This push resolves the earlier SUGGESTION (the default-branch read could be skipped silently). In SKILL.md L177-L185, the skill now:
That closes the bypass I described before: a branch that deletes its own Checked, no finding at the blocking bar:
Prior and settled findings: the critical-findings: 0 |
|
claude-review reviewed Code review (incremental, blocking only):
|
…as floor The team hosted_canvas read used origin/HEAD, which many clones and CI checkouts lack, and a failed read counted as an absent file, so a branch that deleted the team's deny resolved allow. The skill now names the default branch with git ls-remote --symref origin HEAD, fetches it, reads the file at the resolved commit, and when that read cannot run says so in one line and counts the team layer as deny. A file absent at the commit still leaves the layer unset. Co-Authored-By: Claude Opus 5.5 <[email protected]>
No related issue: owner decision from an interview round
Summary
/visualization:visualizenow chooses where a diagram goes by surface. In the Claude Codeterminal it draws locally (a Mermaid or ASCII fence, or a local page), even when a canvas server
such as Excalidraw or tldraw is connected. On a surface that renders MCP Apps, it may draw on a
connected canvas. A diagram that will be committed always stays Mermaid, so it diffs and reviews
as text. A new
hosted_canvassetting (allowby default, ordeny) keeps diagram content offcanvas servers reached over the network.
Fix
skills/visualize/SKILL.md: Step 2 adds the rule that a committed diagram is Mermaid. Step 3adds the canvas-server rule and resolves
hosted_canvasfromuserConfig,docs/conventions/visualization.yamland the personal overridedocs/conventions/visualization.local.yaml.denyfrom any layer wins, so a tracked file cannotundo one person's
deny; the precedent is therendered-viewsrow of the config-cascadeImplementers table. The team file is read from the working tree and from the default branch's
committed copy, so a branch cannot drop the team's
deny. Underdenya local server staysallowed, but a server counts as local only on the person's word in the session, since an MCP
configuration cannot prove it (a local process can forward to a remote service). A canvas stands
in only for a page: a resolved
mediumwith no page draws none, and one that keeps delivery onthe machine uses a local server only. The skill also gains a gotcha and a "does not ship a canvas
server" line.
context/decision-matrix.md: new "MCP App canvas" section with the pointer record(See the UI render in Claude,
as of 2026-11-10, recheck when that section lists Claude Code as rendering MCP Apps). It also
points at the official Excalidraw and
tldraw (
apps/mcp-app) servers as optional user-levelinstalls, without install commands.
plugin.json: newhosted_canvasuserConfig option. The README options block was regeneratedwith
scripts/sync-plugin-options-docs.py, and the Configuration and Option details sectionsdescribe the option.
schemas/visualization.schema.json: the team-file schema, whichcheck-convention-yaml.shfinds by its path.
docs/contracts/config-cascade/README.md:visualization (hosted_canvas)rows in theImplementers table (floor direction
any-layer-wins, with the declared ADR 0064 Decision 5deviation for the tighten-only
userConfigoption, as theimplementationrow has) and inRoot rule by plugin. The glance table was regenerated with
scripts/sync-config-cascade-semantics.py..changes/visualization/: a minor fragment.The plugin bundles no MCP server.
evals/viz-terminal-canvas-local/canvas-stub/.mcp.jsonis aneval-only fixture that only the eval loads, and its command is
false.Verification
/evals:validateonplugins/visualization/evals: no FAIL. Every deterministic grader of thenew case sorts its samples correctly. One sample caught a false pass in the first
local-diagramregex (prose after a fence), and the pattern was fixed before this commit.node --test --test-concurrency=4 plugins/visualization/tests/present.test.mjs: 85 of 85 pass.This includes the medium-list walk over the new eval files.
node scripts/validate-plugin-contracts.mjs: passes.scripts/check-changelog-fragments.sh --check: all fragments are valid.markdownlint-cli2on the changed markdown: 0 issues.scripts/sync-config-cascade-semantics.py --check: up to date.review lanes read
local failing(their latest runs failed during the GitHub incident). Codereview found three Important findings, all fixed in
5ca08b3064: the hand-edited generatedglance row, the canvas rule ignoring the resolved
medium, andarm: with-onlyon amust-not-invoke grader, now
arm: both. Security review found no P1 or P2 and two P3 egress gaps,both fixed in the same commit: the
mediumgate, and counting a server as local only on theperson's word.
canvas-stubserver, whichdecides whether
create_viewis in the session at all. If it is not,no-canvas-callpasses nomatter what the skill does. Also unmeasured: whether the no-plugin baseline arm passes too, which
would make the case a regression guard rather than a measurement. No paid run was made.
Related
plugins/testing/evals/browser-mcp-probe/.Follow-ups
/evals:validateWARNs thatmcp__plugin_canvas-stub_excalidraw__create_viewin
allowed_toolsneeds an--allow-toolsgrant. The plugin-evals docs say a mocked tool needsno grant, so the validator does not yet account for case or suite mocks. The fix belongs to the
evalsplugin.hosted_canvas: denyeval case. Everyclaude plugin evalrun is the Claude Codesurface, where the terminal rule already blocks canvases, so such a case could not fail.
🤖 Generated with Claude Code