feat(canvas): agent guidance, agent cursor and embedded fonts
Merged
GN
2d ago+3069+3069+0123456789012345678901234567890123456789-171-171-012345678901234567890123456789
Summary
- Agents could not tell what the canvas tools were for, text did not render in the editor, and the user asked for a visible agent cursor while an agent works. This last part of the stack fixes all three and closes the remaining CodeRabbit findings.
- Part 10 of 10 in a stacked series. Review and merge bottom-up: #1396, #1397, #1399, #1400, #1401, #1402, #1403, #1404, #1405, then this PR. Spec:
spec-openpencil-canvas-mode(v3, figcraft engine); architecture spine 2026-10-16, amended 2026-10-18 for guest presence.
Related Issue
No issue. This PR first held the whole branch and was narrowed to the top layer when the stack was split.
Type of Change
- feat: new feature
- fix: bug fix
What Changed
- Agent guidance. The
termulMCP server tells agents what the canvas is, tags every canvas tool description with "Termul Canvas", and adds a next-step sentence to each canvas error. With opencode, a closed canvas now gets "open it with the Canvas button" instead of attempts to write files. - Agent cursor. Each agent canvas call shows the session's named cursor gliding to the touched shapes, with a flash ring. It is fire-and-forget after the agent's reply, so it never delays or fails an agent call. Fork patch area 5 (guest presence) draws it.
- Fonts and pin. Pins fork release
termul-v0.2.0, which embeds Inter, and credits Inter (SIL OFL 1.1) and FigCraft. - Hardening from review. Canvas tokens are redacted from every logged request path, and
/wskeeps default size limits with long canvas replies sent in slices.
Scope
- Covers the agent experience and the last review fixes.
- Leaves out a Preferences page for the canvas settings, faster first load, and macOS/Linux runtime checks (not run; Windows only).
How It Was Tested
-
bun run typecheckandbun run ci -
cargo test --lib -- canvas host_mcp: 281 pass - vitest on renderer lib, stores, canvas and layouts: 5091 pass
- Real runs: probe agent through the real ACP spawn path, 23/23 checks (cursor, rings, takeover, reload); opencode before/after on the closed-canvas prompt, 3/3 now direct the user to the Canvas button; production web build with the embedded
termul-v0.2.0bundle renders Inter text - Release desktop build on Windows: text typed by hand renders and autosaves
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