feat(canvas): add universal agent-authored CanvasSpec - #320
Merged
Merged
Conversation
Collaborator
Author
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
anandpant
force-pushed
the
feat/universal-canvas
branch
from
September 5, 2026 19:08
554a1ca to
f9d772b
Compare
Contributor
Sketchi Web PreviewStatus:
Preview Worker cleanup has completed. |
Contributor
Sketchi Icons PreviewStatus:
Preview Worker cleanup has completed. |
Contributor
Sketchi Eval Harness PreviewStatus:
Preview Worker cleanup has completed. |
Contributor
Sketchi Excalidraw Workspace PreviewStatus:
Preview Worker cleanup has completed. |
Contributor
Sketchi Playground / Studio PreviewStatus:
Preview Worker cleanup has completed. |
anandpant
force-pushed
the
feat/universal-canvas
branch
from
September 5, 2026 22:42
f9d772b to
44defe3
Compare
anandpant
force-pushed
the
feat/universal-canvas
branch
from
September 5, 2026 23:06
44defe3 to
6e5b208
Compare
Merge activity
|
## Summary - introduce CanvasSpec v1 as the single canonical rendered scene IR and migrate flowchart, mindmap, and sequence rendering onto it - add typed sketchi.createCanvas orchestration through the normal Worker route and existing Code Mode MCP docs/search/execute surface - compile deterministic row, column, grid, stack, align, and distribute layouts; render text, common shapes including polygon, lines, bound connectors, frames, groups, layers, z-order, and styling - persist scene, Excalidraw, and PNG artifacts with typed failures, telemetry, and bounded structural validation that permits intentional overlap - extend patching with insert, remove, replace, reorder, group, and ungroup while preserving stable IDs and connectivity safeguards - add executable ERD, architecture, timeline, dashboard, wireframe, and dense 120-element examples ## Safety CanvasSpec accepts typed drawing primitives only. This slice intentionally omits SVG, HTML, scripts, external URLs, data URLs, arbitrary fetches, vector paths, and asset references. ## Test plan - `pnpm nx run-many -t typecheck,test,build` (17 projects, 52 tasks; 2 cache hits) - `pnpm nx build-storybook diagram-ui` - `pnpm run test:deploy-scripts` (79 tests) - `pnpm nx run-many -t lint --projects=diagram-core,diagram-renderer,diagram-excalidraw,diagram-agent,playground,sketchi-cli --skip-nx-cache` - focused core layout/validation tests, converter tests, agent runtime/contract tests, Worker route tests, MCP provider/docs tests, compatibility corpus, and dense 120-element coverage - local browser smoke against `POST /api/v1/canvases/create`, including visible node labels and PNG artifact rendering - local Streamable HTTP MCP smoke against `/mcp`: listed only docs/search/execute and executed `sketchi.createCanvas` through the real Worker Loader Code Mode path - executable example matrix invoked for ERD, architecture, timeline, dashboard, wireframe, and dense 120-element canvas - one independent Codex review completed; all five findings were addressed with focused regression coverage - final GitHub checks: 9 passed, 0 failed, 0 pending on `6e5b2081216d2f1b12a31bdd488155721d3b54a4` ## Proof limits Browser, Worker route, artifact rendering, and MCP proof are local. Preview deployment checks passed, but no deployed preview smoke was performed or claimed. Nothing was merged.
graphite-app
Bot
force-pushed
the
feat/universal-canvas
branch
from
September 5, 2026 23:15
6e5b208 to
a18540e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Safety
CanvasSpec accepts typed drawing primitives only. This slice intentionally omits SVG, HTML, scripts, external URLs, data URLs, arbitrary fetches, vector paths, and asset references.
Test plan
pnpm nx run-many -t typecheck,test,build(17 projects, 52 tasks; 2 cache hits)pnpm nx build-storybook diagram-uipnpm run test:deploy-scripts(79 tests)pnpm nx run-many -t lint --projects=diagram-core,diagram-renderer,diagram-excalidraw,diagram-agent,playground,sketchi-cli --skip-nx-cachePOST /api/v1/canvases/create, including visible node labels and PNG artifact rendering/mcp: listed only docs/search/execute and executedsketchi.createCanvasthrough the real Worker Loader Code Mode path6e5b2081216d2f1b12a31bdd488155721d3b54a4Proof limits
Browser, Worker route, artifact rendering, and MCP proof are local. Preview deployment checks passed, but no deployed preview smoke was performed or claimed. Nothing was merged.