0.9.2: Source view, schema checks without the YAML extension #29

Merged
root-at-skic merged 2 commits from feat/source-view into main 2026-10-28 13:27:38 -07:00
Owner

Source view

  • Diagram | Graph | Source on diagrams (Graph only inside a model), Model | Graph | Source on main.archify, View | Source on registry and decision pages, Source on the Graph page.
  • YAML editor inside the page (CodeMirror, dist/source.js loaded on first use), in the page's colours; edits go to the VS Code document; problems from the host, counted on the Source segment; completion and hover from the schema.
  • 2D | 3D sits left of the view switch and hides in Source.

Checks

  • .archify checked with ajv against the extension's schema before archify validate; .archify-registry checked against the registry schema.
  • Registry and decision pages are text editor providers.
  • Show Source switches to Source; Open in Text Editor opens the text beside.

Fixes

  • YAML errors in registry and decision files reported on line 1.
  • "Webview is disposed" when a diagram closed mid-render.
  • Model heading under the toolbar in narrow editors.

Tests

  • typecheck clean; unit 88/88; integration 27/27.
  • Driven in VS Code over CDP: Source, typing, underline and badge, ⌘Z, ⌘S, back to 3D; registry and decision Source; Graph → Source.
## Source view - Diagram | Graph | Source on diagrams (Graph only inside a model), Model | Graph | Source on main.archify, View | Source on registry and decision pages, Source on the Graph page. - YAML editor inside the page (CodeMirror, dist/source.js loaded on first use), in the page's colours; edits go to the VS Code document; problems from the host, counted on the Source segment; completion and hover from the schema. - 2D | 3D sits left of the view switch and hides in Source. ## Checks - .archify checked with ajv against the extension's schema before archify validate; .archify-registry checked against the registry schema. - Registry and decision pages are text editor providers. - Show Source switches to Source; Open in Text Editor opens the text beside. ## Fixes - YAML errors in registry and decision files reported on line 1. - "Webview is disposed" when a diagram closed mid-render. - Model heading under the toolbar in narrow editors. ## Tests - typecheck clean; unit 88/88; integration 27/27. - Driven in VS Code over CDP: Source, typing, underline and badge, ⌘Z, ⌘S, back to 3D; registry and decision Source; Graph → Source.
root-at-skic added 1 commit 2026-10-27 14:46:14 -07:00
Every Archify page can show its file's YAML in place. Diagrams get
Diagram | Graph | Source (Graph only inside a model), main.archify
Model | Graph | Source, registry and decision pages View | Source, and the
Graph page a Source segment. 2D | 3D moves left of that switch and hides
while Source shows.

The YAML opens in a CodeMirror editor inside the page (dist/source.js,
loaded on first use), themed with the page's colours. Edits go to the VS
Code document as WorkspaceEdits; outside changes come back to the page.
Undo and redo are the editor's own, since VS Code sends ⌘Z in a focused
webview to the webview; save and find stay VS Code's. Problems come from
the host only (what the Problems panel holds for the file) and are
counted on the Source segment; completion and hover come from the schema,
folded into one draft-07 document per diagram type.

The host now checks .archify files against the extension's schema with
ajv on the YAML as written, before archify validate, and checks
.archify-registry files against the registry schema for the first time.
Registry and decision pages become text editor providers. While Source
shows, new renders wait and appear when the picture comes back.

Show Source switches the page to Source; Open in Text Editor (the editor
title button) opens the text beside it, as Show Source did. The decision
schema is no longer given to the YAML extension. Fixed: YAML errors in
registry and decision files were reported on line 1; "Webview is
disposed" when a diagram closed mid-render; the model heading under the
toolbar in narrow editors.
root-at-skic added 1 commit 2026-10-27 14:47:51 -07:00
fast-uri comes with ajv, which ships in extension.js from this release;
markdown-it is stubbed out of the Source bundle but was in the lockfile.
root-at-skic merged commit a5a9f92e75 into main 2026-10-28 13:27:38 -07:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: vscode-extensions/archify-vscode-ext#29