This repository was archived by the owner on Oct 20, 2026. It is now read-only.
Repository navigation
Document faces and gesture commits through the plugin API (0.1.0-canary.16) - #6
Merged
Merged
Conversation
Two escape hatches through host.editor are gone, replaced by the plugin SDK 0.2.55 doors made for them. Document faces (document-faces.ts). The bake gives the document the faces its text names when the document has none (ADR 411, amendment 2026-10-12). It sent the engine's registerFont with scope "document" through the editor client; it now calls host.assets.registerDocumentFont (assets.documentFont@1), which fills a gap and never replaces a face the document holds. A family the document holds (assets.getFontFace) is still not offered at all; a face the door refuses (over budget, a format the canvas cannot read, the engine's refusal) is reported as a problem; on a host without the door a family the document lacks is reported as drawn in a substitute. Each capability is probed once per bake, and only when a family needs it, so the 200-run bake keeps its 208 door calls. Gesture commits (document-edited.ts, removed). A frame resized by its handles is a canvas gesture whose commit the host's change event did not report, so the auto renderer and the panel's preview size also listened for gestureCommitted on the editor client. document.onDidChange now reports gesture commits and script runs (document.onDidChange@2), so both follow that event alone. The auto renderer treats every change but an undo or redo as an edit (a gesture commit or a script run may grow a frame). The contract pins move to plugin-api / plugin-sdk 0.2.55-canary.0, and the peer floor with them: the bundle relies on the gesture events. Tests (each failed before): - conformance/bake-faces.spec.ts: a bake on a host whose host.editor throws still gives the document its face (Inter not missing, one document registration, no face problem). Fails on the old code: no registration, a "drawn in a substitute" problem. - auto-render.spec.ts: a gesture commit and a script run reported by the door re-render a resized frame; the raw client broadcast is not listened to, and no raw subscription is held besides the older-host open path. Fails on the old code (it re-rendered on the raw broadcast and held one more raw subscription). - panel-reach.spec.tsx: the preview follows a gesture commit and a script run from the door; the fixture host has no editor handle. - conformance/auto-render.spec.ts: the resize gesture on the real engine re-renders and its undo too, without the test's own broadcast wrapper (the headless client broadcasts the commit since SDK 0.2.55). Docs: architecture door table, status, ADR 411 amendment 2026-10-14. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… the plugin API Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Moves paged.web off its two
host.editorescape hatches onto the doors plugin SDK 0.2.55-canary.0 added for them (plugin-sdk #15, ADR 327 / ADR 328), and releases 0.1.0-canary.16.Document faces (
document-faces.ts)The bake gave the document the faces its text names (ADR 411, amendment 2026-10-12) by sending the engine's
registerFontwithscope: "document"through the editor client. It now callshost.assets.registerDocumentFont(assets.documentFont@1), which fills a gap and never replaces a face the document holds. A family the document holds is still not offered at all; a refused face is reported as a problem; on a host without the door a missing family is reported as drawn in a substitute. Capabilities are probed lazily, so the 200-run bake keeps its 208 door calls.Gesture commits (
document-edited.ts, removed)document.onDidChangenow reports a canvas gesture's commit and a script run, so the auto renderer and the panel's preview size follow that event alone. Every change except an undo/redo counts as an edit (may grow a frame).Pins
@paged-media/plugin-api/plugin-sdkdevDependencies →0.2.55-canary.0, peer floor>=0.2.55-canary.0(the bundle relies on the gesture events). Peers stay peers.Tests (each failed before the change)
conformance/bake-faces.spec.ts— a bake on a host whosehost.editorthrows still gives the document its face (old code: no registration, a "drawn in a substitute" problem).auto-render.spec.ts— gesture commit / script run via the door re-render; the raw broadcast is ignored; no extra raw subscription (old code failed 3 cases).panel-reach.spec.tsx— preview follows a gesture commit and a script run; the fixture host has no editor handle.conformance/auto-render.spec.ts— the real-engine resize gesture re-renders (and its undo) without the test's own broadcast wrapper.Locally: contract-import lint,
pnpm -r typecheck,REQUIRE_REAL_ENGINE=1 pnpm -r test(web-model 290, web-conformance 103, web-bundle 336),package-hash --check. No Rust changes.🤖 Generated with Claude Code