feat(canvas): open .canvas files in a workspace pane (T-322)

Makes the canvas foundation (parser/renderer/view) reachable. The
extension owns an app-scoped MultitabController (the diff/T-233
pattern) so open documents survive the pane being rebuilt; each
document is a real sub-tab per the refinement decision, kept alive
across switches. Routing goes through the existing seams instead of
the dead TabContribution.fileGlobs field: openWorkspaceFile gains a
.canvas branch mirroring .md, and ui.open gains a canvas reader for
D-6 parity (clide ui open canvas <path>). Also corrects the
json_canvas doc header that claimed SVG-lowering — the interactive
pane paints the model directly (D-103 live-widget exception).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-05 08:56:09 +02:00
co-authored by Claude Fable 5
parent 8d7d886bea
commit e2e305dea6
13 changed files with 538 additions and 14 deletions
+5 -3
View File
@@ -3,9 +3,11 @@
/// back, so the canvas pane can load, edit, and persist a `.canvas`.
///
/// Per D-91 `.canvas` is an import format, not clide's native schema — this
/// model is the faithful parse; the pane lowers it onto the SVG substrate for
/// rendering. Pure data — no Flutter, no I/O here — so it runs under
/// `dart test`. Spec: https://jsoncanvas.org/spec/1.0/
/// model is the faithful parse. The interactive pane paints this model
/// directly via `CanvasPainter` (the D-103 live-widget exception, like the
/// graph); only the display-only drawing card lowers to the SVG substrate.
/// Pure data — no Flutter, no I/O here — so it runs under `dart test`.
/// Spec: https://jsoncanvas.org/spec/1.0/
library;
import 'dart:convert';