From c262bb06a73587baacc0b07d8ab5034a05141267 Mon Sep 17 00:00:00 2001 From: Root At Skic Date: Sat, 7 Nov 2026 00:52:07 +0200 Subject: [PATCH] 0.10.3: Sync button in the editor title bar Every Archify page and .archify text editor gets a Sync button top right that opens the Sync menu: sign in, share, join, server address. archify.sync.titleButton hides it. The status bar entry stays. --- CHANGELOG.md | 4 ++++ README.md | 2 +- package-lock.json | 4 ++-- package.json | 14 ++++++++++++-- test/integration/suite.ts | 1 + 5 files changed, 20 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e9ab37..01de1fb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 0.10.3 — 2026-11-07 + +- **Sync button in the title bar.** Every Archify page (and `.archify` text editors) has a **Sync** button top right, next to *Open in Text Editor*: sign in, share a model, join one, set the server address. The status bar entry stays for those who show the status bar. `archify.sync.titleButton: false` hides the button. + ## 0.10.2 — 2026-11-07 - Fixed: going back from **Source** to **Model**, **Diagram** or **View** left the YAML editor on the page under the picture when nothing had been edited. It now hides at once. diff --git a/README.md b/README.md index d699bf2..0d3abbf 100644 --- a/README.md +++ b/README.md @@ -140,7 +140,7 @@ Optional. Without a sync server the extension works exactly as described above a [Archify Sync](https://gitea.lego-cloud.eu/vscode-extensions/archify-vscode-ext-sync) is a small server you run yourself (one container and PostgreSQL; a Helm chart is included). With it, a model is edited by several people at once, like a shared document, and its files stay ordinary files on each person's disk, so Git, agents and every page of this extension keep working. -- **Where.** **Archify Sync** in the status bar (in workspaces with Archify files) opens a menu: sign in, share a model, join one, the server address, settings. The same menu is *Archify | Sync…*. Hide the entry with `archify.sync.statusBar: false`. +- **Where.** The **Sync** button in the title bar of every Archify page (top right, next to *Open in Text Editor*) opens a menu: sign in, share a model, join one, the server address, settings. The same menu is **Archify Sync** in the status bar (in workspaces with Archify files) and *Archify | Sync…* in the Command Palette. `archify.sync.titleButton: false` and `archify.sync.statusBar: false` hide them. - **Server address.** Set `archify.sync.server` once (Settings › Archify › Sync, or *Archify | Set Sync Server Address…*), for example `https://archify.example.com`. Put it in the workspace settings and everyone in the project uses the same server. Left empty, the address is asked for once and remembered. - **Sign in.** *Archify | Sign in to Sync Server…* uses that address (or asks for it) and signs in through the browser; the session is kept in VS Code's secret storage and shows under **Accounts** as *Archify Sync*. A new server is set up first on its `/setup` page with the code from its log. - **Share.** *Archify | Share Model…* (also on `main.archify` in the Explorer) puts the model on the server and writes a small `.archify-sync` file next to `main.archify`: the server and the model's id, no secrets. Commit it, and everyone who clones the repository and is a member opens the shared model. diff --git a/package-lock.json b/package-lock.json index 5b4ee09..179e045 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "archify-vscode-ext", - "version": "0.10.2", + "version": "0.10.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "archify-vscode-ext", - "version": "0.10.2", + "version": "0.10.3", "license": "MIT", "dependencies": { "@codemirror/autocomplete": "^6.20.4", diff --git a/package.json b/package.json index 629c2b3..262f393 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.2", + "version": "0.10.3", "publisher": "root-at-skic", "license": "MIT", "sponsor": { @@ -163,7 +163,7 @@ { "command": "archify.sync.menu", "title": "Archify | Sync…", - "icon": "$(broadcast)" + "icon": "$(live-share)" }, { "command": "archify.sync.setServer", @@ -270,6 +270,11 @@ "command": "archify.openModelGraph", "when": "archify.inModel && (archify.isDiagramSource || activeCustomEditorId == 'archify.diagram' || activeCustomEditorId == 'archify.registry' || activeCustomEditorId == 'archify.decision') && !notebookEditorFocused", "group": "navigation@61" + }, + { + "command": "archify.sync.menu", + "when": "config.archify.sync.titleButton && (archify.isDiagramSource || activeCustomEditorId == 'archify.diagram' || activeCustomEditorId == 'archify.registry' || activeCustomEditorId == 'archify.decision') && !notebookEditorFocused", + "group": "navigation@62" } ], "explorer/context": [ @@ -527,6 +532,11 @@ "type": "boolean", "default": true, "markdownDescription": "Show **Archify Sync** in the status bar in workspaces with Archify files. Clicking it offers sign in, share, join and the server address. Shared models always show their state there." + }, + "archify.sync.titleButton": { + "type": "boolean", + "default": true, + "markdownDescription": "Show the **Archify Sync** button in the title bar of Archify pages and `.archify` editors: sign in, share, join, server address. Archify Sync is optional; without a server the button only offers to set one up." } } }, diff --git a/test/integration/suite.ts b/test/integration/suite.ts index b1349eb..508b51e 100644 --- a/test/integration/suite.ts +++ b/test/integration/suite.ts @@ -494,6 +494,7 @@ export async function run(): Promise { const config = vscode.workspace.getConfiguration('archify.sync'); assert.equal(config.get('server'), ''); assert.equal(config.get('statusBar'), true); + assert.equal(config.get('titleButton'), true); // The extension host's module cache: dist/sync.js (Yjs, the WebSocket) is not loaded. const loaded = Object.keys(require.cache).filter((file) => file.endsWith(`${path.sep}dist${path.sep}sync.js`)); assert.deepEqual(loaded, [], 'the sync bundle is not loaded');