From c71296b01a7a7fcde0c5563f1af4978b39aad456 Mon Sep 17 00:00:00 2001 From: Root At Skic Date: Sun, 8 Nov 2026 20:48:35 +0200 Subject: [PATCH] 0.10.8: main.archify opens with its top-level panels collapsed Shared, Diagrams, Registries and Decisions start closed on the model page; folders inside keep their own default. Open or closed is still kept in the webview state while the page is open. --- CHANGELOG.md | 4 ++++ package-lock.json | 4 ++-- package.json | 2 +- src/webview/page.ts | 9 +++++---- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7669267..47e66d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 0.10.8 — 2026-11-08 + +- **A model opens as its outline.** On `main.archify` the top-level panels (Shared, Diagrams, Registries, Decisions) start collapsed; open the one you need. What you open or close is kept while the page is open. + ## 0.10.7 — 2026-11-08 - **Model | Graph | Source looks like 2D | 3D.** The selected view is the same inset pill, the same height as the other toolbar controls. diff --git a/package-lock.json b/package-lock.json index 5efdcf4..a2a0523 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "archify-vscode-ext", - "version": "0.10.7", + "version": "0.10.8", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "archify-vscode-ext", - "version": "0.10.7", + "version": "0.10.8", "license": "MIT", "dependencies": { "@codemirror/autocomplete": "^6.20.4", diff --git a/package.json b/package.json index 724bbdf..a5c1846 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "archify-vscode-ext", "displayName": "Archify Diagram Viewer", "description": "Archify diagrams in VS Code. Write diagrams as .archify files in YAML: they open as the interactive diagram, with live updates, validation, templates and completion. Also previews Archify's own JSON files (*.architecture.json, …) and opens rendered Archify HTML.", - "version": "0.10.7", + "version": "0.10.8", "publisher": "root-at-skic", "license": "MIT", "sponsor": { diff --git a/src/webview/page.ts b/src/webview/page.ts index f2ad321..5901d75 100644 --- a/src/webview/page.ts +++ b/src/webview/page.ts @@ -208,6 +208,7 @@ function bridgeScript(options: PageOptions): string { }, true); // Collapsible panels of the model page; open/closed is kept in the webview state. + // The model page's top-level panels start closed: a model opens as its outline. function panelStates() { return (vscode.getState() || {}).modelPanels || {}; } function panel(key, className, title, count, defaultOpen) { // count: a number or a short text such as "3 files". @@ -624,7 +625,7 @@ function bridgeScript(options: PageOptions): string { live.hidden = true; body.appendChild(live); var count = model.groups.reduce(function (n, g) { return n + g.diagrams.length; }, 0); - var diagramsPanel = panel('diagrams', 'archify-model-diagrams', 'Diagrams', count, true); + var diagramsPanel = panel('diagrams', 'archify-model-diagrams', 'Diagrams', count, false); body.appendChild(diagramsPanel); if (!count) diagramsPanel.appendChild(el('p', 'archify-model-empty', 'No diagrams yet. Add .archify files next to main.archify or in subfolders.')); model.groups.forEach(function (group) { @@ -658,7 +659,7 @@ function bridgeScript(options: PageOptions): string { byFile[element.file].push(element); }); files.sort(); - var registryPanel = panel('registry', 'archify-model-registry', 'Registries', files.length + (files.length === 1 ? ' file' : ' files'), true); + var registryPanel = panel('registry', 'archify-model-registry', 'Registries', files.length + (files.length === 1 ? ' file' : ' files'), false); body.appendChild(registryPanel); files.forEach(function (file) { var elements = byFile[file].slice().sort(function (a, b) { return a.line - b.line; }); @@ -676,7 +677,7 @@ function bridgeScript(options: PageOptions): string { } // Decisions: one list, live ones first, superseded and rejected dimmed and last. if (model.decisions && model.decisions.length) { - var decisionsPanel = panel('decisions', 'archify-model-decisions', 'Decisions', model.decisions.length, true); + var decisionsPanel = panel('decisions', 'archify-model-decisions', 'Decisions', model.decisions.length, false); body.appendChild(decisionsPanel); var decisionList = el('ul', 'archify-model-list archify-decision-list'); model.decisions.forEach(function (row) { decisionList.appendChild(decisionRowItem(row)); }); @@ -723,7 +724,7 @@ function bridgeScript(options: PageOptions): string { if (!info) { holder.hidden = true; return; } holder.hidden = false; var others = info.people.filter(function (p) { return !p.me; }); - var livePanel = panel('live', 'archify-model-live is-' + info.state, 'Shared \u00b7 ' + info.name, others.length ? others.length + 1 + ' here' : info.host, true); + var livePanel = panel('live', 'archify-model-live is-' + info.state, 'Shared \u00b7 ' + info.name, others.length ? others.length + 1 + ' here' : info.host, false); var status = el('div', 'archify-live-status'); status.appendChild(el('span', 'archify-live-dot')); status.appendChild(el('span', 'archify-live-state', (LIVE_STATE[info.state] || info.state) + (info.state === 'online' ? ' on ' + info.host : '')));