feat(plan-canvas): freeform figma-style prototyping surface + resilient parsing#70
Open
Legacynnn wants to merge 1 commit into
Open
feat(plan-canvas): freeform figma-style prototyping surface + resilient parsing#70Legacynnn wants to merge 1 commit into
Legacynnn wants to merge 1 commit into
Conversation
…nt parsing Rework <PlanCanvas> from an auto-laid mind-map into a pan/zoom figma board: agent-positioned frames embedding live previews, greyscale wireframes, and sticky notes, wired with labeled <CanvasFlow> arrows and grouped via <CanvasGroup>. Legacy connects=-only plans still render via auto-layout. Also harden plan MDX parsing: strip leaked agent tool-call wrapper tags (e.g. a stray trailing </content></invoke> from a Write call) before parsing, so one stray closing tag no longer drops the whole plan to plain Markdown and blanks the canvas.
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.
What
Two related changes to the plan viewer, landing together on this branch.
1. Figma-style plan canvas
Reworks
<PlanCanvas>from an auto-laid-out mind-map into a freeform, pan/zoom prototyping surface:x/y/w/h) embedding live previews, greyscale wireframes, and sticky notes.<CanvasFlow>and section grouping via<CanvasGroup>.Preview+Wireframerenderers; MiniMap, themed Controls, andfitView.connects=-only plans still render through an auto-layout (Dagre) fallback, so nothing breaks.New modules:
auto-layout,frame-kinds,theme-modes,flow-edge,design-toolbar, andframes/(preview/wireframe/note/group + shared chrome). Oldnode-kinds/layout/canvas-noderemoved.2. Resilient plan parsing (bugfix)
A canvas-heavy plan was rendering as plain text — the canvas never loaded. Root cause: the plan file contained a leaked agent tool-call wrapper tag (a stray trailing
</content></invoke>from aWritecall). remark-mdx throws on a closing tag with no opener, and the existing recovery tiers can't isolate stray lowercase tags, so the whole plan fell back to plain Markdown and every component (incl.<PlanCanvas>) degraded to prose.Fix: a new
strip-leaked-tagspre-pass removes whole-line leaked wrapper tags (<invoke>,<content>,<parameter>,<function_calls>, namespaced variants) outside fenced code before parsing. Clean plans are byte-identical (returnsnull).Tests
strip-leaked-tags.test.ts(7 cases) + integration case inparse.test.ts.<PlanCanvas>+ 6CanvasNodes parse and render.typecheck,biome, andcargo clippyclean. Pre-existing unrelated failures ineditor/andterminal/tests are untouched by this branch.