feat(canvas): pin, embed and serve the figcraft editor bundle
Merged
GN
2d ago+2003+2003+0123456789012345678901234567890123456789-1297-1297-0123456789012345678901234567890123456789
Summary
- Termul needs to ship the figcraft editor without a developer checkout or a runtime download.
- Part 1 of 10 in a stacked series. Review and merge bottom-up; each PR targets the one below it. Canvas mode v3 (figcraft engine). Spec:
spec-openpencil-canvas-mode; architecture spine 2026-10-16 (AD-17 to AD-31).
Related Issue
No issue. Split from #1369 so each part stays under 50 files.
Type of Change
- feat: new feature
What Changed
- Pins the fork release in
canvas/figcraft.pin, fetches it with a checksum check in the release workflow, and embeds it in the shared rust-embed assets. Raises the Rust floor to 1.95. - Serves the bundle from a
127.0.0.1:0listener on desktop and from the same/canvas/<id>/route on termul-server. - Removes the per-project
canvas-mcp-*registry entries and the/canvas/mcproutes, and drops saved entries on load.
Scope
- E1-5, E1-6, E3-4. The editor is not mounted yet (next PR).
How It Was Tested
-
bun run typecheckon this branch - Each part is a checkpoint that was built and tested when it was made (
cargo testfor canvas and host_mcp, vitest, real runs in headless Edge). The bottom and top of the stack were rebuilt and re-tested on currentdev.
Checklist
- PR title follows the conventional commit format
- Explained why no issue exists
- Added or updated tests
- Read AGENTS.md
- A human reviewed the complete diff before submission
🤖 Generated with Claude Code
Summary by cubic
Ships the figcraft editor bundle in Termul builds so the canvas no longer needs a developer checkout or runtime download, and retires the per-project canvas MCP proxy.
- Pins the fork release in
canvas/figcraft.pin, fetches it with a SHA-256 check in CI, and embeds it via rust-embed in both the desktop binary andtermul-server; the Rust floor moves to 1.95. - Serves the bundle from a
127.0.0.1:0listener on desktop and from the same/canvas/<id>/route ontermul-server, gated by a per-canvas token and cookie. - Removes the
/canvas/mcproutes and the per-projectcanvas-mcp-*registry entries. - The editor is not mounted yet; this is the first PR in a stacked series, so review and merge bottom-up.
Migration
- Persisted
canvas-mcp-*registry entries are dropped and cleaned up on first load after this change.
Summary by CodeRabbit
- New Features
- Canvas bundles are now served directly by the app, with per-canvas access controls and support for both desktop and web.
- Changes
- Canvas MCP proxy endpoints are no longer available, and opening a canvas no longer creates or updates a related MCP server entry.
- Existing saved MCP entries with canvas-related IDs are removed when the server registry loads.
- Bug Fixes
- Canvas bundle responses now handle missing files and invalid paths with appropriate errors.