AI-native design editor. Open-source Figma alternative.
feat(settings): group Settings into App, AI, and Data & privacy (#1530)
Danila Poyarkove7603a4341cd
diff --git a/README.md b/README.mdindex 18d9a8b15..2d3b32a61 100644--- a/README.md+++ b/README.md@@ -143,7 +143,7 @@ Not every provider works in the browser, and not every model streams tool callsUse Claude Code, Codex, Gemini CLI, or Pi as the design agent in the chat panel. It runs with your own subscription and reaches the canvas through the editor's MCP server. Requires the desktop app.-Install the agent's ACP program and `@open-pencil/mcp`, then open **Settings → AI & agents → Run guided setup**. It checks that both are installed, signs the agent in, and confirms a session reaches OpenPencil's tools. Pi runs through the `@open-pencil/harness` companion, which guided setup installs with one click. See [Coding agents](https://openpencil.dev/programmable/coding-agents) for each agent's install command.+Install the agent's ACP program and `@open-pencil/mcp`, then open **Settings → Models → Run guided setup**. It checks that both are installed, signs the agent in, and confirms a session reaches OpenPencil's tools. Pi runs through the `@open-pencil/harness` companion, which guided setup installs with one click. See [Coding agents](https://openpencil.dev/programmable/coding-agents) for each agent's install command.### MCP serverdiff --git a/changes/1362/added.md b/changes/1362/added.mdindex 661befbef..db0a7b682 100644--- a/changes/1362/added.md+++ b/changes/1362/added.md@@ -1,2 +1,2 @@-- The AI assistant can use models through OpenPencil Cloud: choose **OpenPencil Cloud** as a model's provider in **Settings → AI** and the workspace whose plan pays for it, with the models and prices the server offers. The chat shows how many credits the workspace has left; when they run out, it offers **Manage plan** where the server bills, and on a self-hosted server says when the allowance renews.+- The AI assistant can use models through OpenPencil Cloud: choose **OpenPencil Cloud** as a model's provider in **Settings → Models** and the workspace whose plan pays for it, with the models and prices the server offers. The chat shows how many credits the workspace has left; when they run out, it offers **Manage plan** where the server bills, and on a self-hosted server says when the allowance renews.- Self-hosted OpenPencil Cloud servers can offer AI through the AI relay, `dist-standalone/ai-relay.mjs`, which forwards requests to one OpenAI-compatible provider with your key and holds each workspace to its monthly credit allowance.diff --git a/changes/1530/changed.md b/changes/1530/changed.mdnew file mode 100644index 000000000..b1e30f554--- /dev/null+++ b/changes/1530/changed.md@@ -0,0 +1,3 @@+- Settings groups its pages under App, AI, and Data & privacy: snapping, the toolbar, and rendering are on **Editor**; AI & agents is **Models** and Media is **Image services**.+- A setting changed from its default shows a **Reset to default** button beside it, and Zoom speed no longer labels its default.+- **File → Diagnostics…** and the command palette open the Diagnostics settings, a file that fails to open offers **View diagnostics**, and the **Usage history** switch is on the **Usage** page.diff --git a/desktop/generated/menu.json b/desktop/generated/menu.jsonindex 7dda29d9b..a9514febf 100644--- a/desktop/generated/menu.json+++ b/desktop/generated/menu.json@@ -24,6 +24,10 @@"id": "open-tour","label": "Open the Tour"},+ {+ "id": "diagnostics",+ "label": "Diagnostics…"+ },{"type": "separator"},diff --git a/packages/docs/programmable/ai-chat.md b/packages/docs/programmable/ai-chat.mdindex c34750d9e..f4a5dd173 100644--- a/packages/docs/programmable/ai-chat.md+++ b/packages/docs/programmable/ai-chat.md@@ -9,7 +9,7 @@ Press <kbd>⌘</kbd><kbd>J</kbd> (<kbd>Ctrl</kbd> + <kbd>J</kbd>) to open the AI## Setup-The first time you open OpenPencil, guided setup asks what AI should help with and what you already use: a [coding agent](./coding-agents) such as Claude Code, Codex, Gemini CLI, or Pi in the desktop app, an API account, or a local or company server. It connects that access and assigns it to the **Design agent** and **Vision** roles, keeping anything you configured by hand. With OpenRouter you can sign in instead of pasting an API key. Skip it to start designing, and run it again from **Settings → AI & agents → Run guided setup**. To configure models by hand:+The first time you open OpenPencil, guided setup asks what AI should help with and what you already use: a [coding agent](./coding-agents) such as Claude Code, Codex, Gemini CLI, or Pi in the desktop app, an API account, or a local or company server. It connects that access and assigns it to the **Design agent** and **Vision** roles, keeping anything you configured by hand. With OpenRouter you can sign in instead of pasting an API key. Skip it to start designing, and run it again from **Settings → Models → Run guided setup**. To configure models by hand:1. Open the AI chat panel (<kbd>⌘</kbd><kbd>J</kbd>)2. Click the settings icon@@ -22,7 +22,7 @@ The chat composer grows with multiline prompts. Type `@` to mention a layer, pag## Step limit-In **Settings → AI & agents → Chat**, set **Maximum steps per message** to a whole number from 1 to 1,000. The default is 50. Press Enter or leave the field to save a valid value; invalid drafts do not replace the saved preference. Higher limits allow longer tool-driven tasks but can increase latency and provider cost.+In **Settings → Models → Chat**, set **Maximum steps per message** to a whole number from 1 to 1,000. The default is 50. Press Enter or leave the field to save a valid value; invalid drafts do not replace the saved preference. Higher limits allow longer tool-driven tasks but can increase latency and provider cost.The built-in AI captures this limit when each message starts. Stopping, remaining-step warnings, and the **Continue** action use that same budget. Changing it does not interrupt an ongoing request; the next message or continuation uses the new limit. A step is one model iteration and can include multiple tool calls. ACP and Pi agents manage their own limits.diff --git a/packages/docs/programmable/coding-agents.md b/packages/docs/programmable/coding-agents.mdindex 620590543..92d15d239 100644--- a/packages/docs/programmable/coding-agents.md+++ b/packages/docs/programmable/coding-agents.md@@ -16,7 +16,7 @@ Coding agents need the desktop app; the browser cannot start programs on your co4. The agent signed in to your account. Pi can use an AI Gateway key instead (see [Pi](#pi)).-Then open **Settings → AI & agents → Run guided setup**, choose the agent under **Coding agents on this computer**, and check that both the agent and the MCP server show as installed. **Install adapter** runs the npm command shown under it. Once the ACP program is installed, guided setup asks the agent which account it uses and shows what it reports, such as the plan and email; when it is not signed in, **Sign in** opens the agent's own login in your browser. For a signed-in agent, **OpenPencil tools** shows whether a session reaches OpenPencil's MCP server, checked the way a chat starts, without sending a message. **Check again** repeats the check after you install something or sign in elsewhere.+Then open **Settings → Models → Run guided setup**, choose the agent under **Coding agents on this computer**, and check that both the agent and the MCP server show as installed. **Install adapter** runs the npm command shown under it. Once the ACP program is installed, guided setup asks the agent which account it uses and shows what it reports, such as the plan and email; when it is not signed in, **Sign in** opens the agent's own login in your browser. For a signed-in agent, **OpenPencil tools** shows whether a session reaches OpenPencil's MCP server, checked the way a chat starts, without sending a message. **Check again** repeats the check after you install something or sign in elsewhere.### Let your agent set itself updiff --git a/packages/docs/user-guide/drawing-shapes.md b/packages/docs/user-guide/drawing-shapes.mdindex eb3ee6959..c9b6304ed 100644--- a/packages/docs/user-guide/drawing-shapes.md+++ b/packages/docs/user-guide/drawing-shapes.md@@ -27,7 +27,7 @@ Polygon and Star have no keyboard shortcut — access them from the shapes flyou## Customizing the Toolbar-Right-click the toolbar and choose **Customize toolbar…**, or open **Settings → Toolbar**, to change it:+Right-click the toolbar and choose **Customize toolbar…**, or open **Settings → Editor**, to change it:- Turn a tool's switch off to hide it. Hidden tools keep their keyboard shortcuts. **Move** is always shown.- Drag a tool to reorder it. Dropped inside a box it joins that flyout; dropped in the gap between boxes it becomes a button of its own; dropped onto another tool, the two share a flyout.diff --git a/packages/docs/user-guide/openpencil-cloud.md b/packages/docs/user-guide/openpencil-cloud.mdindex ee6011bb4..00474f349 100644--- a/packages/docs/user-guide/openpencil-cloud.md+++ b/packages/docs/user-guide/openpencil-cloud.md@@ -120,6 +120,6 @@ People who open a link without an account, where the server allows it, join unde## AI on Cloud-When your workspace's plan includes AI and the server offers it, the AI assistant can use models through Cloud instead of a key of your own. In **Settings → AI**, add a model, choose **OpenPencil Cloud** as the provider, and pick the workspace whose plan pays for it; the models and their prices come from the server. **OpenPencil Cloud** is listed while you are signed in to the server Home shows.+When your workspace's plan includes AI and the server offers it, the AI assistant can use models through Cloud instead of a key of your own. In **Settings → Models**, add a model, choose **OpenPencil Cloud** as the provider, and pick the workspace whose plan pays for it; the models and their prices come from the server. **OpenPencil Cloud** is listed while you are signed in to the server Home shows.Each request uses the workspace's AI credits for the month. When they run out, the assistant says so and, if the server bills, offers **Manage plan**. Self-hosted servers run their own AI service with their own models and limits ([self-hosting guide](/reference/self-hosting-cloud#ai)).diff --git a/packages/vue/src/i18n/locales/de/menu.json b/packages/vue/src/i18n/locales/de/menu.jsonindex ac26b039b..bbe0b7521 100644--- a/packages/vue/src/i18n/locales/de/menu.json+++ b/packages/vue/src/i18n/locales/de/menu.json@@ -8,6 +8,7 @@"new": "Neu","open": "Öffnen…","openTour": "Rundgang öffnen",+ "diagnostics": "Diagnose…","save": "Speichern","saveAs": "Speichern unter…","exportSelection": "Auswahl exportieren…",diff --git a/packages/vue/src/i18n/locales/de/settings.json b/packages/vue/src/i18n/locales/de/settings.jsonindex ce4025a76..3c5da7622 100644--- a/packages/vue/src/i18n/locales/de/settings.json+++ b/packages/vue/src/i18n/locales/de/settings.json@@ -16,6 +16,12 @@"title": "Einstellungen","description": "Integrationen und App-Einstellungen verwalten.","general": "Allgemein",+ "groupApp": "App",+ "groupAI": "KI",+ "groupDataAndPrivacy": "Daten & Datenschutz",+ "editor": "Editor",+ "models": "Modelle",+ "imageServices": "Bilddienste","languageDescription": "Wähle die Sprache der App-Oberfläche.","editing": "Bearbeitung","snappingDescription": "Lege die Ausrichtung beim Bearbeiten von Pfaden sowie beim Verschieben und Skalieren von Ebenen fest.",@@ -24,18 +30,16 @@"navigationDescription": "Lege fest, wie sich die Leinwand beim Scrollen und Zoomen bewegt.","zoomSpeed": "Zoomgeschwindigkeit","zoomSpeedDescription": "Wie weit jeder Mausradschritt oder jede Trackpad-Zoomgeste die Leinwand zoomt.",- "zoomSpeedDefault": "{speed} (Standard)",- "aiAndAgents": "KI und Agenten","usage": "Nutzung",- "diagnostics": "Diagnose","privacy": "Datenschutz",+ "diagnostics": "Diagnose",+ "fonts": "Schriften","media": "Medien","mcp": "MCP","toolAccess": "Werkzeugzugriff","skills": "Skills","storage": "Speicher","cloud": "Cloud",- "fonts": "Schriften","animations": "Animationen","animationsSystem": "Systemeinstellung","animationsOff": "Aus",@@ -59,6 +63,7 @@"toolbarGroupWith": "Mit {tool} gruppieren","toolbarUngroup": "Gruppierung aufheben","toolbarReset": "Auf Standard zurücksetzen",+ "resetToDefault": "Auf Standard zurücksetzen","customizeToolbar": "Werkzeugleiste anpassen…","discardChanges": "Änderungen verwerfen?","discardChangesDescription": "Deine ungespeicherten Änderungen gehen verloren.",diff --git a/packages/vue/src/i18n/locales/es/menu.json b/packages/vue/src/i18n/locales/es/menu.jsonindex a8d2020f8..235245fa4 100644--- a/packages/vue/src/i18n/locales/es/menu.json+++ b/packages/vue/src/i18n/locales/es/menu.json@@ -8,6 +8,7 @@"new": "Nuevo","open": "Abrir…","openTour": "Abrir el recorrido",+ "diagnostics": "Diagnóstico…","save": "Guardar","saveAs": "Guardar como…","exportSelection": "Exportar selección…",diff --git a/packages/vue/src/i18n/locales/es/settings.json b/packages/vue/src/i18n/locales/es/settings.jsonindex 3597d8b01..6f95bd2f0 100644--- a/packages/vue/src/i18n/locales/es/settings.json+++ b/packages/vue/src/i18n/locales/es/settings.json@@ -16,6 +16,12 @@"title": "Ajustes","description": "Gestiona integraciones y preferencias de la aplicación.","general": "General",+ "groupApp": "Aplicación",+ "groupAI": "IA",+ "groupDataAndPrivacy": "Datos y privacidad",+ "editor": "Editor",+ "models": "Modelos",+ "imageServices": "Servicios de imagen","languageDescription": "Elige el idioma de la interfaz de la aplicación.","editing": "Edición","snappingDescription": "Controla la alineación al editar trazados y al mover o redimensionar capas.",@@ -24,18 +30,16 @@"navigationDescription": "Controla cómo se mueve el lienzo al desplazarte y hacer zoom.","zoomSpeed": "Velocidad de zoom","zoomSpeedDescription": "Cuánto amplía el lienzo cada paso de la rueda del ratón o cada gesto de pellizco en el trackpad.",- "zoomSpeedDefault": "{speed} (predeterminada)",- "aiAndAgents": "IA y agentes","usage": "Uso",- "diagnostics": "Diagnóstico","privacy": "Privacidad",+ "diagnostics": "Diagnóstico",+ "fonts": "Fuentes","media": "Multimedia","mcp": "MCP","toolAccess": "Acceso a herramientas","skills": "Habilidades","storage": "Almacenamiento","cloud": "Nube",- "fonts": "Fuentes","animations": "Animaciones","animationsSystem": "Seguir al sistema","animationsOff": "Desactivadas",@@ -59,6 +63,7 @@"toolbarGroupWith": "Agrupar con {tool}","toolbarUngroup": "Desagrupar","toolbarReset": "Restablecer valores predeterminados",+ "resetToDefault": "Restablecer valores predeterminados","customizeToolbar": "Personalizar barra de herramientas…","discardChanges": "¿Descartar los cambios?","discardChangesDescription": "Se perderán los cambios sin guardar.",diff --git a/packages/vue/src/i18n/locales/fr/menu.json b/packages/vue/src/i18n/locales/fr/menu.jsonindex 6c6f4bf19..cdf7dc93f 100644--- a/packages/vue/src/i18n/locales/fr/menu.json+++ b/packages/vue/src/i18n/locales/fr/menu.json@@ -8,6 +8,7 @@"new": "Nouveau","open": "Ouvrir…","openTour": "Ouvrir la visite",+ "diagnostics": "Diagnostics…","save": "Enregistrer","saveAs": "Enregistrer sous…","exportSelection": "Exporter la sélection…",diff --git a/packages/vue/src/i18n/locales/fr/settings.json b/packages/vue/src/i18n/locales/fr/settings.jsonindex ce59ddb62..b857286a1 100644--- a/packages/vue/src/i18n/locales/fr/settings.json+++ b/packages/vue/src/i18n/locales/fr/settings.json@@ -16,6 +16,12 @@"title": "Paramètres","description": "Gérez les intégrations et les préférences de l’application.","general": "Général",+ "groupApp": "Application",+ "groupAI": "IA",+ "groupDataAndPrivacy": "Données et confidentialité",+ "editor": "Éditeur",+ "models": "Modèles",+ "imageServices": "Services d’image","languageDescription": "Choisissez la langue de l’interface de l’application.","editing": "Édition","snappingDescription": "Contrôlez l’alignement lors de la modification des tracés et du déplacement ou redimensionnement des calques.",@@ -24,18 +30,16 @@"navigationDescription": "Contrôlez le déplacement du canevas lors du défilement et du zoom.","zoomSpeed": "Vitesse du zoom","zoomSpeedDescription": "L’ampleur du zoom à chaque cran de molette ou pincement sur le trackpad.",- "zoomSpeedDefault": "{speed} (par défaut)",- "aiAndAgents": "IA et agents","usage": "Utilisation",- "diagnostics": "Diagnostics","privacy": "Confidentialité",+ "diagnostics": "Diagnostics",+ "fonts": "Polices","media": "Médias","mcp": "MCP","toolAccess": "Accès aux outils","skills": "Compétences","storage": "Stockage","cloud": "Cloud",- "fonts": "Polices","animations": "Animations","animationsSystem": "Suivre le système","animationsOff": "Désactivées",@@ -59,6 +63,7 @@"toolbarGroupWith": "Grouper avec {tool}","toolbarUngroup": "Dégrouper","toolbarReset": "Rétablir les valeurs par défaut",+ "resetToDefault": "Rétablir les valeurs par défaut","customizeToolbar": "Personnaliser la barre d’outils…","discardChanges": "Abandonner les modifications ?","discardChangesDescription": "Vos modifications non enregistrées seront perdues.",diff --git a/packages/vue/src/i18n/locales/it/menu.json b/packages/vue/src/i18n/locales/it/menu.jsonindex adba78131..2c095d67e 100644--- a/packages/vue/src/i18n/locales/it/menu.json+++ b/packages/vue/src/i18n/locales/it/menu.json@@ -8,6 +8,7 @@"new": "Nuovo","open": "Apri…","openTour": "Apri il tour",+ "diagnostics": "Diagnostica…","save": "Salva","saveAs": "Salva con nome…","exportSelection": "Esporta selezione…",diff --git a/packages/vue/src/i18n/locales/it/settings.json b/packages/vue/src/i18n/locales/it/settings.jsonindex 867b08c20..006e4ecee 100644--- a/packages/vue/src/i18n/locales/it/settings.json+++ b/packages/vue/src/i18n/locales/it/settings.json@@ -16,6 +16,12 @@"title": "Impostazioni","description": "Gestisci integrazioni e preferenze dell’app.","general": "Generali",+ "groupApp": "App",+ "groupAI": "IA",+ "groupDataAndPrivacy": "Dati e privacy",+ "editor": "Editor",+ "models": "Modelli",+ "imageServices": "Servizi per immagini","languageDescription": "Scegli la lingua dell’interfaccia dell’app.","editing": "Modifica","snappingDescription": "Controlla l’allineamento durante la modifica dei tracciati e lo spostamento o ridimensionamento dei livelli.",@@ -24,18 +30,16 @@"navigationDescription": "Controlla come si muove la tela quando scorri e fai zoom.","zoomSpeed": "Velocità dello zoom","zoomSpeedDescription": "Quanto ingrandisce la tela ogni scatto della rotellina o pizzico sul trackpad.",- "zoomSpeedDefault": "{speed} (predefinita)",- "aiAndAgents": "IA e agenti","usage": "Utilizzo",- "diagnostics": "Diagnostica","privacy": "Privacy",+ "diagnostics": "Diagnostica",+ "fonts": "Font","media": "Media","mcp": "MCP","toolAccess": "Accesso agli strumenti","skills": "Skill","storage": "Archiviazione","cloud": "Cloud",- "fonts": "Font","animations": "Animazioni","animationsSystem": "Segui il sistema","animationsOff": "Disattivate",@@ -59,6 +63,7 @@"toolbarGroupWith": "Raggruppa con {tool}","toolbarUngroup": "Separa","toolbarReset": "Ripristina predefiniti",+ "resetToDefault": "Ripristina predefiniti","customizeToolbar": "Personalizza barra degli strumenti…","discardChanges": "Scartare le modifiche?","discardChangesDescription": "Le modifiche non salvate andranno perse.",diff --git a/packages/vue/src/i18n/locales/ja/menu.json b/packages/vue/src/i18n/locales/ja/menu.jsonindex d69ba2299..c15097e0a 100644--- a/packages/vue/src/i18n/locales/ja/menu.json+++ b/packages/vue/src/i18n/locales/ja/menu.json@@ -8,6 +8,7 @@"new": "新規作成","open": "開く…","openTour": "ツアーを開く",+ "diagnostics": "診断…","save": "保存","saveAs": "名前を付けて保存…","exportSelection": "選択範囲をエクスポート…",diff --git a/packages/vue/src/i18n/locales/ja/settings.json b/packages/vue/src/i18n/locales/ja/settings.jsonindex 1bae90ef7..46d71f588 100644--- a/packages/vue/src/i18n/locales/ja/settings.json+++ b/packages/vue/src/i18n/locales/ja/settings.json@@ -16,6 +16,12 @@"title": "設定","description": "連携サービスとアプリの設定を管理します。","general": "一般",+ "groupApp": "アプリ",+ "groupAI": "AI",+ "groupDataAndPrivacy": "データとプライバシー",+ "editor": "エディター",+ "models": "モデル",+ "imageServices": "画像サービス","languageDescription": "アプリのインターフェースで使用する言語を選択します。","editing": "編集","snappingDescription": "パス編集、レイヤーの移動、サイズ変更時の整列方法を設定します。",@@ -24,18 +30,16 @@"navigationDescription": "スクロールやズーム時のキャンバスの動きを設定します。","zoomSpeed": "ズーム速度","zoomSpeedDescription": "マウスホイール1段階やトラックパッドのピンチ1回でキャンバスをどれだけズームするか。",- "zoomSpeedDefault": "{speed}(デフォルト)",- "aiAndAgents": "AIとエージェント","usage": "使用状況",- "diagnostics": "診断","privacy": "プライバシー",+ "diagnostics": "診断",+ "fonts": "フォント","media": "メディア","mcp": "MCP","toolAccess": "ツールへのアクセス","skills": "スキル","storage": "ストレージ","cloud": "クラウド",- "fonts": "フォント","animations": "アニメーション","animationsSystem": "システム設定に従う","animationsOff": "オフ",@@ -59,6 +63,7 @@"toolbarGroupWith": "{tool}とまとめる","toolbarUngroup": "グループ解除","toolbarReset": "デフォルトに戻す",+ "resetToDefault": "デフォルトに戻す","customizeToolbar": "ツールバーをカスタマイズ…","discardChanges": "変更を破棄しますか?","discardChangesDescription": "保存されていない変更は失われます。",diff --git a/packages/vue/src/i18n/locales/pl/menu.json b/packages/vue/src/i18n/locales/pl/menu.jsonindex aabb769ca..2766c365a 100644--- a/packages/vue/src/i18n/locales/pl/menu.json+++ b/packages/vue/src/i18n/locales/pl/menu.json@@ -8,6 +8,7 @@"new": "Nowy","open": "Otwórz…","openTour": "Otwórz przewodnik",+ "diagnostics": "Diagnostyka…","save": "Zapisz","saveAs": "Zapisz jako…","exportSelection": "Eksportuj zaznaczenie…",diff --git a/packages/vue/src/i18n/locales/pl/settings.json b/packages/vue/src/i18n/locales/pl/settings.jsonindex b3f538698..9a902f531 100644--- a/packages/vue/src/i18n/locales/pl/settings.json+++ b/packages/vue/src/i18n/locales/pl/settings.json@@ -16,6 +16,12 @@"title": "Ustawienia","description": "Zarządzaj integracjami i preferencjami aplikacji.","general": "Ogólne",+ "groupApp": "Aplikacja",+ "groupAI": "AI",+ "groupDataAndPrivacy": "Dane i prywatność",+ "editor": "Edytor",+ "models": "Modele",+ "imageServices": "Usługi obrazów","languageDescription": "Wybierz język interfejsu aplikacji.","editing": "Edycja","snappingDescription": "Określ wyrównywanie podczas edycji ścieżek oraz przesuwania i zmiany rozmiaru warstw.",@@ -24,18 +30,16 @@"navigationDescription": "Określ, jak porusza się obszar roboczy podczas przewijania i powiększania.","zoomSpeed": "Szybkość powiększania","zoomSpeedDescription": "Jak bardzo każdy krok kółka myszy lub gest uszczypnięcia na gładziku powiększa obszar roboczy.",- "zoomSpeedDefault": "{speed} (domyślnie)",- "aiAndAgents": "AI i agenci","usage": "Użycie",- "diagnostics": "Diagnostyka","privacy": "Prywatność",+ "diagnostics": "Diagnostyka",+ "fonts": "Czcionki","media": "Media","mcp": "MCP","toolAccess": "Dostęp do narzędzi","skills": "Umiejętności","storage": "Przechowywanie","cloud": "Chmura",- "fonts": "Czcionki","animations": "Animacje","animationsSystem": "Zgodnie z systemem","animationsOff": "Wyłączone",@@ -59,6 +63,7 @@"toolbarGroupWith": "Grupuj z: {tool}","toolbarUngroup": "Rozgrupuj","toolbarReset": "Przywróć domyślne",+ "resetToDefault": "Przywróć domyślne","customizeToolbar": "Dostosuj pasek narzędzi…","discardChanges": "Odrzucić zmiany?","discardChangesDescription": "Niezapisane zmiany zostaną utracone.",diff --git a/packages/vue/src/i18n/locales/ru/menu.json b/packages/vue/src/i18n/locales/ru/menu.jsonindex 0e815efe9..1dd908ca2 100644--- a/packages/vue/src/i18n/locales/ru/menu.json+++ b/packages/vue/src/i18n/locales/ru/menu.json@@ -8,6 +8,7 @@"new": "Создать","open": "Открыть…","openTour": "Открыть тур",+ "diagnostics": "Диагностика…","save": "Сохранить","saveAs": "Сохранить как…","exportSelection": "Экспорт выделения…",diff --git a/packages/vue/src/i18n/locales/ru/settings.json b/packages/vue/src/i18n/locales/ru/settings.jsonindex c7c9fe16f..6a9108fff 100644--- a/packages/vue/src/i18n/locales/ru/settings.json+++ b/packages/vue/src/i18n/locales/ru/settings.json@@ -16,6 +16,12 @@"title": "Настройки","description": "Управление интеграциями и настройками приложения.","general": "Основные",+ "groupApp": "Приложение",+ "groupAI": "ИИ",+ "groupDataAndPrivacy": "Данные и конфиденциальность",+ "editor": "Редактор",+ "models": "Модели",+ "imageServices": "Сервисы изображений","languageDescription": "Выберите язык интерфейса приложения.","editing": "Редактирование","snappingDescription": "Настройте выравнивание при редактировании контуров, перемещении и изменении размеров слоёв.",@@ -24,18 +30,16 @@"navigationDescription": "Настройте, как холст движется при прокрутке и масштабировании.","zoomSpeed": "Скорость масштабирования","zoomSpeedDescription": "Насколько каждый шаг колёсика мыши или жест щипка на трекпаде масштабирует холст.",- "zoomSpeedDefault": "{speed} (по умолчанию)",- "aiAndAgents": "ИИ и агенты","usage": "Использование",- "diagnostics": "Диагностика","privacy": "Конфиденциальность",+ "diagnostics": "Диагностика",+ "fonts": "Шрифты","media": "Медиа","mcp": "MCP","toolAccess": "Доступ к инструментам","skills": "Навыки","storage": "Хранилище","cloud": "Облако",- "fonts": "Шрифты","animations": "Анимации","animationsSystem": "Как в системе","animationsOff": "Выключены",@@ -59,6 +63,7 @@"toolbarGroupWith": "Объединить с: {tool}","toolbarUngroup": "Разгруппировать","toolbarReset": "Сбросить по умолчанию",+ "resetToDefault": "Сбросить по умолчанию","customizeToolbar": "Настроить панель инструментов…","discardChanges": "Отменить изменения?","discardChangesDescription": "Несохранённые изменения будут потеряны.",diff --git a/packages/vue/src/i18n/locales/zh-cn/menu.json b/packages/vue/src/i18n/locales/zh-cn/menu.jsonindex 11bb2d3b7..0baa95189 100644--- a/packages/vue/src/i18n/locales/zh-cn/menu.json+++ b/packages/vue/src/i18n/locales/zh-cn/menu.json@@ -8,6 +8,7 @@"new": "新建","open": "打开…","openTour": "打开导览",+ "diagnostics": "诊断…","save": "保存","saveAs": "另存为…","exportSelection": "导出所选内容…",diff --git a/packages/vue/src/i18n/locales/zh-cn/settings.json b/packages/vue/src/i18n/locales/zh-cn/settings.jsonindex 3d8f50d6c..a41be4a68 100644--- a/packages/vue/src/i18n/locales/zh-cn/settings.json+++ b/packages/vue/src/i18n/locales/zh-cn/settings.json@@ -16,6 +16,12 @@"title": "设置","description": "管理集成和应用偏好设置。","general": "通用",+ "groupApp": "应用",+ "groupAI": "AI",+ "groupDataAndPrivacy": "数据与隐私",+ "editor": "编辑器",+ "models": "模型",+ "imageServices": "图像服务","languageDescription": "选择应用界面使用的语言。","editing": "编辑","snappingDescription": "控制编辑路径以及移动或调整图层大小时的对齐方式。",@@ -24,18 +30,16 @@"navigationDescription": "设置滚动和缩放时画布的移动方式。","zoomSpeed": "缩放速度","zoomSpeedDescription": "鼠标滚轮每滚动一格或触控板每次捏合时画布的缩放幅度。",- "zoomSpeedDefault": "{speed}(默认)",- "aiAndAgents": "AI 和代理","usage": "使用情况",- "diagnostics": "诊断","privacy": "隐私",+ "diagnostics": "诊断",+ "fonts": "字体","media": "媒体","mcp": "MCP","toolAccess": "工具访问权限","skills": "技能","storage": "存储","cloud": "云",- "fonts": "字体","animations": "动画","animationsSystem": "跟随系统","animationsOff": "关闭",@@ -59,6 +63,7 @@"toolbarGroupWith": "与{tool}组合","toolbarUngroup": "取消组合","toolbarReset": "恢复默认",+ "resetToDefault": "恢复默认","customizeToolbar": "自定义工具栏…","discardChanges": "放弃更改?","discardChangesDescription": "未保存的更改将丢失。",diff --git a/packages/vue/src/i18n/messages/menu.ts b/packages/vue/src/i18n/messages/menu.tsindex 3a67c7769..94b3f8381 100644--- a/packages/vue/src/i18n/messages/menu.ts+++ b/packages/vue/src/i18n/messages/menu.ts@@ -12,6 +12,7 @@ export const menuMessageDefaults = {open: 'Open…',browseFiles: 'Browse files…',openTour: 'Open the Tour',+ diagnostics: 'Diagnostics…',save: 'Save',saveAs: 'Save as…',saveTo: 'Save to…',diff --git a/packages/vue/src/i18n/messages/settings.ts b/packages/vue/src/i18n/messages/settings.tsindex 13cc6bbbe..ec4998a8e 100644--- a/packages/vue/src/i18n/messages/settings.ts+++ b/packages/vue/src/i18n/messages/settings.ts@@ -28,10 +28,17 @@ export const settingsMessageDefaults = {toolbarGroupWith: params('Group with {tool}'),toolbarUngroup: 'Ungroup',toolbarReset: 'Reset to default',+ resetToDefault: 'Reset to default',customizeToolbar: 'Customize toolbar…',title: 'Settings',description: 'Manage integrations and app preferences.',general: 'General',+ groupApp: 'App',+ groupAI: 'AI',+ groupDataAndPrivacy: 'Data & privacy',+ editor: 'Editor',+ models: 'Models',+ imageServices: 'Image services',recentFiles: 'Recent files',recentFilesDescription: 'Choose how many files to keep in the recent list and Open Recent menu.',recentFilesLimit: 'Number of recent files',@@ -53,11 +60,9 @@ export const settingsMessageDefaults = {navigationDescription: 'Control how the canvas moves when you scroll and zoom.',zoomSpeed: 'Zoom speed',zoomSpeedDescription: 'How far each mouse wheel step or trackpad pinch zooms the canvas.',- zoomSpeedDefault: params('{speed} (default)'),- aiAndAgents: 'AI & agents',usage: 'Usage',- diagnostics: 'Diagnostics',privacy: 'Privacy',+ diagnostics: 'Diagnostics',fonts: 'Fonts',media: 'Media',mcp: 'MCP',diff --git a/src/app/diagnostics/view.ts b/src/app/diagnostics/view.tsnew file mode 100644index 000000000..d87b2e913--- /dev/null+++ b/src/app/diagnostics/view.ts@@ -0,0 +1,14 @@+import { notificationMessages } from '@/app/i18n/notifications'+import { openSettingsDialog } from '@/app/settings/dialog'+import type { ToastAction } from '@/app/shell/ui'++/**+ * The action for a failure notice whose event the diagnostics log recorded: it opens that log,+ * where it can be copied into a bug report.+ */+export function viewDiagnosticsAction(): ToastAction {+ return {+ label: notificationMessages.get().viewDiagnostics,+ run: () => openSettingsDialog('diagnostics')+ }+}diff --git a/src/app/document/io/read.ts b/src/app/document/io/read.tsindex 2cac6c5a6..69145f013 100644--- a/src/app/document/io/read.ts+++ b/src/app/document/io/read.ts@@ -3,6 +3,7 @@ import { filename } from 'pathe/utils'import type { Editor, EditorState } from '@open-pencil/core'import { describeDiagnosticError, recordDocumentFailure } from '@/app/diagnostics'+import { viewDiagnosticsAction } from '@/app/diagnostics/view'import { yieldToUI } from '@/app/document/io/browser'import { readFigDocument } from '@/app/document/io/fig'import { applyImportedDocument } from '@/app/document/io/imported-document'@@ -83,7 +84,8 @@ export function createOpenActions({notificationMessages.get().openFileFailed({name: file.name,error: e instanceof Error ? e.message : String(e)- })+ }),+ viewDiagnosticsAction())} finally {if (succeeded) load.complete()@@ -143,7 +145,8 @@ export function createReloadActions({notificationMessages.get().openFileFailed({name: state.documentName,error: error instanceof Error ? error.message : String(error)- })+ }),+ viewDiagnosticsAction())} finally {if (succeeded) load.complete()diff --git a/src/app/editor/vectorize/action.ts b/src/app/editor/vectorize/action.tsindex 5e406b7a2..0f31ddf00 100644--- a/src/app/editor/vectorize/action.ts+++ b/src/app/editor/vectorize/action.ts@@ -49,7 +49,7 @@ export async function vectorizeImageNode(store: EditorStore, nodeId: string): Prtoast.error(notificationMessages.get().vectorizeCredentialRequired({ provider: provider.name }))- openSettingsDialog('media')+ openSettingsDialog('services')return}@@ -81,7 +81,7 @@ export async function vectorizeImageNode(store: EditorStore, nodeId: string): Pr} catch (error) {if (error instanceof VectorizeAuthError) {toast.error(notificationMessages.get().vectorizeCredentialFailed({ error: error.message }))- openSettingsDialog('media')+ openSettingsDialog('services')} else {toast.error(notificationMessagesdiff --git a/src/app/i18n/notifications/index.ts b/src/app/i18n/notifications/index.tsindex baabd7232..273dfca54 100644--- a/src/app/i18n/notifications/index.ts+++ b/src/app/i18n/notifications/index.ts@@ -23,14 +23,15 @@ export const notificationMessageDefaults = {xPaths: 'XPaths',pngClipboardUnavailable: 'PNG clipboard export is not available in this browser.',openFileFailed: params('Could not open “{name}”: {error}'),+ viewDiagnostics: 'View diagnostics',importedDOMCSS: 'Imported DOM/CSS document.',importDOMCSSFailed: params('Could not import DOM/CSS: {error}'),openDOMCSSFailed: params('Could not open DOM/CSS file: {error}'),- vectorizeCredentialRequired: params('Add a {provider} API key in Settings → Media.'),+ vectorizeCredentialRequired: params('Add a {provider} API key in Settings → Image services.'),vectorizeImageMissing: 'Image data is missing for this layer.',vectorizingImage: 'Vectorizing image…',imageConvertedToVectors: 'Image converted to vectors.',- vectorizeCredentialFailed: params('{error}. Update it in Settings → Media.'),+ vectorizeCredentialFailed: params('{error}. Update it in Settings → Image services.'),vectorizeFailed: params('{provider} could not vectorize this image: {error}'),operationFailed: params('Operation failed: {error}'),storageConnected: 'Connected. Storage namespace is ready.',diff --git a/src/app/i18n/notifications/locales/de.json b/src/app/i18n/notifications/locales/de.jsonindex e57610415..55d527a02 100644--- a/src/app/i18n/notifications/locales/de.json+++ b/src/app/i18n/notifications/locales/de.json@@ -7,14 +7,15 @@"copiedProperties": "Eigenschaften kopiert.","pngClipboardUnavailable": "Der PNG-Export in die Zwischenablage ist in diesem Browser nicht verfügbar.","openFileFailed": "„{name}“ konnte nicht geöffnet werden: {error}",+ "viewDiagnostics": "Diagnose anzeigen","importedDOMCSS": "DOM/CSS-Dokument importiert.","importDOMCSSFailed": "DOM/CSS konnte nicht importiert werden: {error}","openDOMCSSFailed": "DOM/CSS-Datei konnte nicht geöffnet werden: {error}",- "vectorizeCredentialRequired": "Füge einen {provider}-API-Schlüssel unter Einstellungen → Medien hinzu.",+ "vectorizeCredentialRequired": "Füge einen {provider}-API-Schlüssel unter Einstellungen → Bilddienste hinzu.","vectorizeImageMissing": "Für diese Ebene fehlen Bilddaten.","vectorizingImage": "Bild wird vektorisiert…","imageConvertedToVectors": "Bild in Vektoren umgewandelt.",- "vectorizeCredentialFailed": "{error}. Aktualisiere den Schlüssel unter Einstellungen → Medien.",+ "vectorizeCredentialFailed": "{error}. Aktualisiere den Schlüssel unter Einstellungen → Bilddienste.","vectorizeFailed": "{provider} konnte dieses Bild nicht vektorisieren: {error}","operationFailed": "Vorgang fehlgeschlagen: {error}","storageConnected": "Verbunden. Der Speicher-Namensraum ist bereit.",diff --git a/src/app/i18n/notifications/locales/es.json b/src/app/i18n/notifications/locales/es.jsonindex cf45f5d39..05c8b6f40 100644--- a/src/app/i18n/notifications/locales/es.json+++ b/src/app/i18n/notifications/locales/es.json@@ -7,14 +7,15 @@"copiedProperties": "Propiedades copiadas.","pngClipboardUnavailable": "La exportación PNG al portapapeles no está disponible en este navegador.","openFileFailed": "No se pudo abrir «{name}»: {error}",+ "viewDiagnostics": "Ver diagnóstico","importedDOMCSS": "Documento DOM/CSS importado.","importDOMCSSFailed": "No se pudo importar DOM/CSS: {error}","openDOMCSSFailed": "No se pudo abrir el archivo DOM/CSS: {error}",- "vectorizeCredentialRequired": "Añade una clave API de {provider} en Ajustes → Multimedia.",+ "vectorizeCredentialRequired": "Añade una clave API de {provider} en Ajustes → Servicios de imagen.","vectorizeImageMissing": "Faltan los datos de imagen de esta capa.","vectorizingImage": "Vectorizando imagen…","imageConvertedToVectors": "Imagen convertida en vectores.",- "vectorizeCredentialFailed": "{error}. Actualízala en Ajustes → Multimedia.",+ "vectorizeCredentialFailed": "{error}. Actualízala en Ajustes → Servicios de imagen.","vectorizeFailed": "{provider} no pudo vectorizar esta imagen: {error}","operationFailed": "La operación falló: {error}","storageConnected": "Conectado. El espacio de almacenamiento está listo.",diff --git a/src/app/i18n/notifications/locales/fr.json b/src/app/i18n/notifications/locales/fr.jsonindex de6fa2613..9cc2aadd1 100644--- a/src/app/i18n/notifications/locales/fr.json+++ b/src/app/i18n/notifications/locales/fr.json@@ -7,14 +7,15 @@"copiedProperties": "Propriétés copiées.","pngClipboardUnavailable": "L’export PNG vers le presse-papiers n’est pas disponible dans ce navigateur.","openFileFailed": "Impossible d’ouvrir « {name} » : {error}",+ "viewDiagnostics": "Voir les diagnostics","importedDOMCSS": "Document DOM/CSS importé.","importDOMCSSFailed": "Impossible d’importer le DOM/CSS : {error}","openDOMCSSFailed": "Impossible d’ouvrir le fichier DOM/CSS : {error}",- "vectorizeCredentialRequired": "Ajoutez une clé API {provider} dans Réglages → Médias.",+ "vectorizeCredentialRequired": "Ajoutez une clé API {provider} dans Réglages → Services d’image.","vectorizeImageMissing": "Les données d’image de ce calque sont manquantes.","vectorizingImage": "Vectorisation de l’image…","imageConvertedToVectors": "Image convertie en vecteurs.",- "vectorizeCredentialFailed": "{error}. Mettez-la à jour dans Réglages → Médias.",+ "vectorizeCredentialFailed": "{error}. Mettez-la à jour dans Réglages → Services d’image.","vectorizeFailed": "{provider} n’a pas pu vectoriser cette image : {error}","operationFailed": "Échec de l’opération : {error}","storageConnected": "Connexion établie. L’espace de stockage est prêt.",diff --git a/src/app/i18n/notifications/locales/it.json b/src/app/i18n/notifications/locales/it.jsonindex 406fb2f03..3b8203838 100644--- a/src/app/i18n/notifications/locales/it.json+++ b/src/app/i18n/notifications/locales/it.json@@ -7,14 +7,15 @@"copiedProperties": "Proprietà copiate.","pngClipboardUnavailable": "L’esportazione PNG negli appunti non è disponibile in questo browser.","openFileFailed": "Impossibile aprire «{name}»: {error}",+ "viewDiagnostics": "Mostra diagnostica","importedDOMCSS": "Documento DOM/CSS importato.","importDOMCSSFailed": "Impossibile importare DOM/CSS: {error}","openDOMCSSFailed": "Impossibile aprire il file DOM/CSS: {error}",- "vectorizeCredentialRequired": "Aggiungi una chiave API {provider} in Impostazioni → Media.",+ "vectorizeCredentialRequired": "Aggiungi una chiave API {provider} in Impostazioni → Servizi per immagini.","vectorizeImageMissing": "Mancano i dati immagine per questo livello.","vectorizingImage": "Vettorializzazione dell’immagine…","imageConvertedToVectors": "Immagine convertita in vettori.",- "vectorizeCredentialFailed": "{error}. Aggiornala in Impostazioni → Media.",+ "vectorizeCredentialFailed": "{error}. Aggiornala in Impostazioni → Servizi per immagini.","vectorizeFailed": "{provider} non ha potuto vettorializzare questa immagine: {error}","operationFailed": "Operazione non riuscita: {error}","storageConnected": "Connessione riuscita. Lo spazio di archiviazione è pronto.",diff --git a/src/app/i18n/notifications/locales/ja.json b/src/app/i18n/notifications/locales/ja.jsonindex 9418bd673..e22d953bb 100644--- a/src/app/i18n/notifications/locales/ja.json+++ b/src/app/i18n/notifications/locales/ja.json@@ -7,14 +7,15 @@"copiedProperties": "プロパティをコピーしました。","pngClipboardUnavailable": "このブラウザーでは PNG をクリップボードに書き出せません。","openFileFailed": "「{name}」を開けませんでした: {error}",+ "viewDiagnostics": "診断を表示","importedDOMCSS": "DOM/CSS ドキュメントをインポートしました。","importDOMCSSFailed": "DOM/CSS をインポートできませんでした: {error}","openDOMCSSFailed": "DOM/CSS ファイルを開けませんでした: {error}",- "vectorizeCredentialRequired": "設定 → メディアで {provider} の API キーを追加してください。",+ "vectorizeCredentialRequired": "設定 → 画像サービスで {provider} の API キーを追加してください。","vectorizeImageMissing": "このレイヤーの画像データがありません。","vectorizingImage": "画像をベクター化しています…","imageConvertedToVectors": "画像をベクターに変換しました。",- "vectorizeCredentialFailed": "{error}。設定 → メディアで更新してください。",+ "vectorizeCredentialFailed": "{error}。設定 → 画像サービスで更新してください。","vectorizeFailed": "{provider} でこの画像をベクター化できませんでした: {error}","operationFailed": "操作に失敗しました: {error}","storageConnected": "接続しました。ストレージ名前空間を使用できます。",diff --git a/src/app/i18n/notifications/locales/pl.json b/src/app/i18n/notifications/locales/pl.jsonindex de4786f9a..bd99959e9 100644--- a/src/app/i18n/notifications/locales/pl.json+++ b/src/app/i18n/notifications/locales/pl.json@@ -7,14 +7,15 @@"copiedProperties": "Skopiowano właściwości.","pngClipboardUnavailable": "Eksport PNG do schowka nie jest dostępny w tej przeglądarce.","openFileFailed": "Nie udało się otworzyć „{name}”: {error}",+ "viewDiagnostics": "Pokaż diagnostykę","importedDOMCSS": "Zaimportowano dokument DOM/CSS.","importDOMCSSFailed": "Nie udało się zaimportować DOM/CSS: {error}","openDOMCSSFailed": "Nie udało się otworzyć pliku DOM/CSS: {error}",- "vectorizeCredentialRequired": "Dodaj klucz API {provider} w Ustawienia → Multimedia.",+ "vectorizeCredentialRequired": "Dodaj klucz API {provider} w Ustawienia → Usługi obrazów.","vectorizeImageMissing": "Brakuje danych obrazu dla tej warstwy.","vectorizingImage": "Wektoryzowanie obrazu…","imageConvertedToVectors": "Obraz przekonwertowano na wektory.",- "vectorizeCredentialFailed": "{error}. Zaktualizuj klucz w Ustawienia → Multimedia.",+ "vectorizeCredentialFailed": "{error}. Zaktualizuj klucz w Ustawienia → Usługi obrazów.","vectorizeFailed": "{provider} nie mógł zwektoryzować tego obrazu: {error}","operationFailed": "Operacja nie powiodła się: {error}","storageConnected": "Połączono. Przestrzeń przechowywania jest gotowa.",diff --git a/src/app/i18n/notifications/locales/ru.json b/src/app/i18n/notifications/locales/ru.jsonindex f2074e18e..ff21549b7 100644--- a/src/app/i18n/notifications/locales/ru.json+++ b/src/app/i18n/notifications/locales/ru.json@@ -7,14 +7,15 @@"copiedProperties": "Свойства скопированы.","pngClipboardUnavailable": "Экспорт PNG в буфер обмена недоступен в этом браузере.","openFileFailed": "Не удалось открыть «{name}»: {error}",+ "viewDiagnostics": "Открыть диагностику","importedDOMCSS": "Документ DOM/CSS импортирован.","importDOMCSSFailed": "Не удалось импортировать DOM/CSS: {error}","openDOMCSSFailed": "Не удалось открыть файл DOM/CSS: {error}",- "vectorizeCredentialRequired": "Добавьте API-ключ {provider} в Настройки → Медиа.",+ "vectorizeCredentialRequired": "Добавьте API-ключ {provider} в Настройки → Сервисы изображений.","vectorizeImageMissing": "Для этого слоя отсутствуют данные изображения.","vectorizingImage": "Векторизация изображения…","imageConvertedToVectors": "Изображение преобразовано в векторы.",- "vectorizeCredentialFailed": "{error}. Обновите ключ в Настройки → Медиа.",+ "vectorizeCredentialFailed": "{error}. Обновите ключ в Настройки → Сервисы изображений.","vectorizeFailed": "{provider} не смог векторизовать это изображение: {error}","operationFailed": "Не удалось выполнить операцию: {error}","storageConnected": "Подключено. Пространство хранилища готово.",diff --git a/src/app/i18n/notifications/locales/zh-cn.json b/src/app/i18n/notifications/locales/zh-cn.jsonindex 3584cd5c4..0476fd9a6 100644--- a/src/app/i18n/notifications/locales/zh-cn.json+++ b/src/app/i18n/notifications/locales/zh-cn.json@@ -7,14 +7,15 @@"copiedProperties": "已复制属性。","pngClipboardUnavailable": "此浏览器不支持将 PNG 导出到剪贴板。","openFileFailed": "无法打开“{name}”:{error}",+ "viewDiagnostics": "查看诊断","importedDOMCSS": "已导入 DOM/CSS 文档。","importDOMCSSFailed": "无法导入 DOM/CSS:{error}","openDOMCSSFailed": "无法打开 DOM/CSS 文件:{error}",- "vectorizeCredentialRequired": "请在设置 → 媒体中添加 {provider} API 密钥。",+ "vectorizeCredentialRequired": "请在设置 → 图像服务中添加 {provider} API 密钥。","vectorizeImageMissing": "此图层缺少图像数据。","vectorizingImage": "正在矢量化图像…","imageConvertedToVectors": "图像已转换为矢量。",- "vectorizeCredentialFailed": "{error}。请在设置 → 媒体中更新。",+ "vectorizeCredentialFailed": "{error}。请在设置 → 图像服务中更新。","vectorizeFailed": "{provider} 无法矢量化此图像:{error}","operationFailed": "操作失败:{error}","storageConnected": "已连接。存储命名空间已就绪。",diff --git a/src/app/settings/dialog.ts b/src/app/settings/dialog.tsindex 2f1ecf440..9e1409161 100644--- a/src/app/settings/dialog.ts+++ b/src/app/settings/dialog.ts@@ -1,22 +1,28 @@import { ref } from 'vue'+/** The Settings window's pages, in the sidebar's groups: App, AI, Data & privacy. */export type SettingsSection =| 'general'- | 'toolbar'- | 'ai'- | 'usage'- | 'diagnostics'- | 'privacy'- | 'mcp'- | 'tools'- | 'skills'+ | 'editor'| 'fonts'- | 'media'| 'storage'| 'cloud'+ | 'ai'+ | 'tools'+ | 'skills'+ | 'services'+ | 'mcp'+ | 'usage'+ | 'privacy'+ | 'diagnostics'++/** A part of a page that opening Settings scrolls to, such as the toolbar on the Editor page. */+export type SettingsAnchor = 'toolbar'export const settingsDialogOpen = ref(false)export const settingsDialogSection = ref<SettingsSection>('general')+/** The part of the open page to bring into view; the page clears it once shown. */+export const settingsDialogAnchor = ref<SettingsAnchor | null>(null)type SettingsNavigationRequest = (action: () => void) => voidlet requestNavigation: SettingsNavigationRequest | null = null@@ -28,12 +34,16 @@ export function registerSettingsNavigation(request: SettingsNavigationRequest) {}}-export function openSettingsDialog(section?: SettingsSection): void {- if (settingsDialogOpen.value && (!section || section === settingsDialogSection.value)) return+export function openSettingsDialog(section?: SettingsSection, anchor?: SettingsAnchor): void {const open = () => {if (section) settingsDialogSection.value = section+ settingsDialogAnchor.value = anchor ?? nullsettingsDialogOpen.value = true}+ if (settingsDialogOpen.value && (!section || section === settingsDialogSection.value)) {+ if (anchor) settingsDialogAnchor.value = anchor+ return+ }if (settingsDialogOpen.value && requestNavigation) requestNavigation(open)else open()}diff --git a/src/app/shell/menu/app-menu.ts b/src/app/shell/menu/app-menu.tsindex ab766802b..d808fa149 100644--- a/src/app/shell/menu/app-menu.ts+++ b/src/app/shell/menu/app-menu.ts@@ -112,6 +112,7 @@ export function useAppMenu() {open: 'open','browse-files': 'browseFiles','open-tour': 'openTour',+ diagnostics: 'diagnostics',save: 'save','save-as': 'saveAs','save-to': 'saveTo',@@ -196,6 +197,7 @@ export function useAppMenu() {'previous-tab': () => switchAdjacentTab(-1),'next-tab': () => switchAdjacentTab(1),settings: openSettingsDialog,+ diagnostics: () => openSettingsDialog('diagnostics'),variables: () => openVariablesDialog(store),'insert-icon': () => {store.state.iconPickerOpen = truediff --git a/src/app/shell/menu/schema.ts b/src/app/shell/menu/schema.tsindex 3e8f3e52f..8f7377bf7 100644--- a/src/app/shell/menu/schema.ts+++ b/src/app/shell/menu/schema.ts@@ -85,6 +85,12 @@ export const APP_MENU_SCHEMA = [{ id: 'open-recent', label: 'Open Recent', target: 'native' },{ id: 'browse-files', label: 'Browse Files…', handler: 'shell' },{ id: 'open-tour', label: 'Open the Tour', handler: 'shell' },+ {+ id: 'diagnostics',+ label: 'Diagnostics…',+ handler: 'shell',+ palette: { keywords: ['log', 'report', 'bug', 'problem', 'troubleshoot'] }+ },{ type: 'separator' },{ id: 'save', label: 'Save', shortcut: 'MOD+S' },{ id: 'save-as', label: 'Save As…', shortcut: 'MOD+SHIFT+S' },diff --git a/src/app/shell/menu/shell.ts b/src/app/shell/menu/shell.tsindex d8ea12dee..44a7c9ba0 100644--- a/src/app/shell/menu/shell.ts+++ b/src/app/shell/menu/shell.ts@@ -60,6 +60,7 @@ export function useShellMenu() {openTour().catch((error: unknown) => console.error('[Tour] Could not open the tour:', error))},settings: openSettingsDialog,+ diagnostics: () => openSettingsDialog('diagnostics'),'snap-geometry': () => {const current = appPreferences.value.editing.snapping.geometrysetSnappingPreference('geometry', !current)diff --git a/src/app/tabs/index.ts b/src/app/tabs/index.tsindex 04c22e393..039ad329a 100644--- a/src/app/tabs/index.ts+++ b/src/app/tabs/index.ts@@ -10,6 +10,7 @@ import type { SceneGraph } from '@open-pencil/scene-graph'import { setOpenPencilStore } from '@/app/browser-bridge'import { describeDiagnosticError, recordStorageFailure } from '@/app/diagnostics'+import { viewDiagnosticsAction } from '@/app/diagnostics/view'import { confirmAllDocuments } from '@/app/document/close/all'import { confirmDocumentClose } from '@/app/document/close/controller'import { requestDocumentClose } from '@/app/document/close/prompt'@@ -482,7 +483,8 @@ export async function openStorageDocumentInNewTab(notificationMessages.get().openFileFailed({name: document.name,error: error instanceof Error ? error.message : String(error)- })+ }),+ viewDiagnosticsAction())}await releaseOpeningTab(opening)diff --git a/src/components/MobileDrawer.vue b/src/components/MobileDrawer.vueindex 008ab08e9..ce26d31a1 100644--- a/src/components/MobileDrawer.vue+++ b/src/components/MobileDrawer.vue@@ -179,9 +179,7 @@ const drawerTransition = useMotionTransition({<div data-test-id="mobile-drawer-layers" class="flex h-full flex-col"><PagesPanel /><div class="border-t border-border" />- <header class="shrink-0 px-3 py-2 text-[11px] tracking-wider text-muted uppercase">- Layers- </header>+ <header class="shrink-0 px-3 py-2 text-[11px] font-semibold text-muted">Layers</header><LayerTree class="min-h-0 flex-1" /></div></TabsContent>diff --git a/src/components/assets-panel/AssetsPanel.vue b/src/components/assets-panel/AssetsPanel.vueindex 3a053c649..554dc010c 100644--- a/src/components/assets-panel/AssetsPanel.vue+++ b/src/components/assets-panel/AssetsPanel.vue@@ -383,7 +383,7 @@ async function insertSelectedAsset() {<div class="scrollbar-thin flex min-h-0 flex-1 flex-col overflow-y-auto px-2 pb-2"><section v-for="group in assetGroups" :key="group.pageId" class="mb-3">- <h2 class="mb-1 px-1 text-[10px] font-medium tracking-wide text-muted uppercase">+ <h2 class="mb-1 px-1 text-[11px] font-semibold text-muted">{{ group.pageName }}</h2><div :class="assetView === 'grid' ? 'grid grid-cols-2 gap-2' : 'flex flex-col gap-0.5'">@@ -591,7 +591,7 @@ async function insertSelectedAsset() {<div class="min-w-0 p-4"><section v-if="shownAsset.description" class="mb-4">- <h3 class="text-[11px] font-medium tracking-wider text-muted uppercase">+ <h3 class="text-[11px] font-semibold text-muted">{{ panels.description }}</h3><p data-test-id="asset-details-description" class="mt-1 text-xs leading-5 text-surface">@@ -600,7 +600,7 @@ async function insertSelectedAsset() {</section><section v-if="shownAsset.sourceLibraryKey" class="mb-4">- <h3 class="text-[11px] font-medium tracking-wider text-muted uppercase">+ <h3 class="text-[11px] font-semibold text-muted">{{ panels.assetLibraryBadge }}</h3><p data-test-id="asset-details-library" class="mt-1 break-all text-xs text-muted">@@ -609,7 +609,7 @@ async function insertSelectedAsset() {</section><section v-if="shownAsset.docsURL" class="mb-4">- <h3 class="text-[11px] font-medium tracking-wider text-muted uppercase">+ <h3 class="text-[11px] font-semibold text-muted">{{ panels.documentation }}</h3><AppButton@@ -626,7 +626,7 @@ async function insertSelectedAsset() {</section><section v-if="shownAsset.variants.length > 0">- <h3 class="text-[11px] font-medium tracking-wider text-muted uppercase">+ <h3 class="text-[11px] font-semibold text-muted">{{ panels.properties }}</h3><div class="mt-2 flex flex-col gap-2">diff --git a/src/components/settings/SettingsDialog.vue b/src/components/settings/SettingsDialog.vueindex d449f45f9..5135f052b 100644--- a/src/components/settings/SettingsDialog.vue+++ b/src/components/settings/SettingsDialog.vue@@ -1,7 +1,20 @@<script setup lang="ts">import { tryOnScopeDispose } from '@vueuse/core'import { AlertDialogCancel, DialogClose } from 'reka-ui'-import { computed } from 'vue'+import { computed, type Component } from 'vue'+import IconActivity from '~icons/lucide/activity'+import IconBookOpen from '~icons/lucide/book-open'+import IconChartNoAxesCombined from '~icons/lucide/chart-no-axes-combined'+import IconCloud from '~icons/lucide/cloud'+import IconDatabase from '~icons/lucide/database'+import IconImage from '~icons/lucide/image'+import IconPenTool from '~icons/lucide/pen-tool'+import IconPlug from '~icons/lucide/plug'+import IconSettings from '~icons/lucide/settings'+import IconShield from '~icons/lucide/shield'+import IconSlidersHorizontal from '~icons/lucide/sliders-horizontal'+import IconSparkles from '~icons/lucide/sparkles'+import IconType from '~icons/lucide/type'import { useViewportKind } from '@open-pencil/vue/editor/viewport-kind'import { useI18n } from '@open-pencil/vue/i18n'@@ -17,6 +30,7 @@ import { provideSettingsNavigation } from '@/app/settings/navigation/use'import { CloudSettingsSection } from '@/components/cloud/integration'import ChatSettingsSection from '@/components/settings/chat/ChatSettingsSection.vue'import DiagnosticsSettingsPanel from '@/components/settings/diagnostics/DiagnosticsSettingsPanel.vue'+import EditorSettingsPanel from '@/components/settings/editor/EditorSettingsPanel.vue'import FontSettingsPanel from '@/components/settings/fonts/FontSettingsPanel.vue'import GeneralSettingsPanel from '@/components/settings/general/GeneralSettingsPanel.vue'import SettingsBreadcrumb from '@/components/settings/layout/SettingsBreadcrumb.vue'@@ -28,7 +42,6 @@ import PrivacySettingsPanel from '@/components/settings/privacy/PrivacySettingsPimport SkillsSettingsPanel from '@/components/settings/skills/SkillsSettingsPanel.vue'import StorageSettingsPanel from '@/components/settings/storage/StorageSettingsPanel.vue'import ToolAccessSettingsPanel from '@/components/settings/tool-access/ToolAccessSettingsPanel.vue'-import ToolbarSettingsPanel from '@/components/settings/toolbar/ToolbarSettingsPanel.vue'import UsageSettingsPanel from '@/components/settings/usage/UsageSettingsPanel.vue'import AppButton from '@/components/ui/button/AppButton.vue'import {@@ -38,30 +51,64 @@ import {AppDialogRoot} from '@/components/ui/dialog'import AppSelect from '@/components/ui/select/AppSelect.vue'-import { AppTabsContent, AppTabsList, AppTabsRoot, AppTabsTrigger } from '@/components/ui/tabs'+import {+ AppTabsContent,+ AppTabsHeading,+ AppTabsList,+ AppTabsRoot,+ AppTabsTrigger+} from '@/components/ui/tabs'const { isMobile } = useViewportKind()const { settings, common } = useI18n()const navigation = provideSettingsNavigation()tryOnScopeDispose(registerSettingsNavigation(navigation.request))const { editing, confirming, crumb } = navigation-const sections = computed(- () =>- [- { value: 'general', label: settings.value.general },- { value: 'toolbar', label: settings.value.toolbar },- { value: 'ai', label: settings.value.aiAndAgents },- { value: 'usage', label: settings.value.usage },- { value: 'diagnostics', label: settings.value.diagnostics },- { value: 'privacy', label: settings.value.privacy },- { value: 'mcp', label: settings.value.mcp },- { value: 'tools', label: settings.value.toolAccess },- { value: 'skills', label: settings.value.skills },- { value: 'fonts', label: settings.value.fonts },- { value: 'media', label: settings.value.media },- { value: 'storage', label: settings.value.storage },- ...(CLOUD_INCLUDED ? [{ value: 'cloud' as const, label: settings.value.cloud }] : [])- ] satisfies { value: SettingsSection; label: string }[]+interface SectionItem {+ value: SettingsSection+ label: string+ icon: Component+}++/** The sidebar's pages, grouped as macOS and VS Code group their settings. */+const groups = computed<{ label: string; sections: SectionItem[] }[]>(() => [+ {+ label: settings.value.groupApp,+ sections: [+ { value: 'general', label: settings.value.general, icon: IconSettings },+ { value: 'editor', label: settings.value.editor, icon: IconPenTool },+ { value: 'fonts', label: settings.value.fonts, icon: IconType },+ { value: 'storage', label: settings.value.storage, icon: IconDatabase },+ ...(CLOUD_INCLUDED+ ? [{ value: 'cloud' as const, label: settings.value.cloud, icon: IconCloud }]+ : [])+ ]+ },+ {+ label: settings.value.groupAI,+ sections: [+ { value: 'ai', label: settings.value.models, icon: IconSparkles },+ { value: 'tools', label: settings.value.toolAccess, icon: IconSlidersHorizontal },+ { value: 'skills', label: settings.value.skills, icon: IconBookOpen },+ { value: 'services', label: settings.value.imageServices, icon: IconImage },+ { value: 'mcp', label: settings.value.mcp, icon: IconPlug },+ { value: 'usage', label: settings.value.usage, icon: IconChartNoAxesCombined }+ ]+ },+ {+ label: settings.value.groupDataAndPrivacy,+ sections: [+ { value: 'privacy', label: settings.value.privacy, icon: IconShield },+ { value: 'diagnostics', label: settings.value.diagnostics, icon: IconActivity }+ ]+ }+])+const sections = computed(() => groups.value.flatMap((group) => group.sections))+const selectGroups = computed(() =>+ groups.value.map((group) => ({+ label: group.label,+ options: group.sections.map(({ value, label }) => ({ value, label }))+ })))function onSectionChange(section: string | number): void {const match = sections.value.find((item) => item.value === section)@@ -70,6 +117,10 @@ function onSectionChange(section: string | number): void {settingsDialogSection.value = match.value})}+/** The page an editor was opened from, picked again in the sidebar, leads back to its list. */+function onTriggerClick(section: string): void {+ if (section === settingsDialogSection.value && editing.value) navigation.back()+}function onOpenChange(open: boolean): void {if (open) settingsDialogOpen.value = trueelse@@ -116,72 +167,42 @@ function onOpenChange(open: boolean): void {<div v-if="isMobile" class="shrink-0 border-b border-border p-3"><AppSelect:model-value="settingsDialogSection"- :options="sections"+ :groups="selectGroups":label="settings.title":ui="{ trigger: 'w-full' }"@update:model-value="onSectionChange"/></div><AppTabsList v-show="!isMobile" :label="settings.title">- <AppTabsTrigger value="general" data-test-id="settings-section-general">- <template #leading><icon-lucide-settings class="size-3.5" /></template>- {{ settings.general }}- </AppTabsTrigger>- <AppTabsTrigger value="toolbar" data-test-id="settings-section-toolbar">- <template #leading><icon-lucide-panel-bottom class="size-3.5" /></template>- {{ settings.toolbar }}- </AppTabsTrigger>- <AppTabsTrigger value="ai" data-test-id="settings-section-ai">- <template #leading><icon-lucide-sparkles class="size-3.5" /></template>- {{ settings.aiAndAgents }}- </AppTabsTrigger>- <AppTabsTrigger value="usage" data-test-id="settings-section-usage">- <template #leading><icon-lucide-chart-no-axes-combined class="size-3.5" /></template>- {{ settings.usage }}- </AppTabsTrigger>- <AppTabsTrigger value="diagnostics" data-test-id="settings-section-diagnostics">- <template #leading><icon-lucide-activity class="size-3.5" /></template>- {{ settings.diagnostics }}- </AppTabsTrigger>- <AppTabsTrigger value="privacy" data-test-id="settings-section-privacy">- <template #leading><icon-lucide-shield class="size-3.5" /></template>- {{ settings.privacy }}- </AppTabsTrigger>- <AppTabsTrigger value="mcp" data-test-id="settings-section-mcp">- <template #leading><icon-lucide-plug class="size-3.5" /></template>- {{ settings.mcp }}- </AppTabsTrigger>- <AppTabsTrigger value="tools" data-test-id="settings-section-tools">- <template #leading><icon-lucide-sliders-horizontal class="size-3.5" /></template>- {{ settings.toolAccess }}- </AppTabsTrigger>- <AppTabsTrigger value="skills" data-test-id="settings-section-skills">- <template #leading><icon-lucide-book-open class="size-3.5" /></template>- {{ settings.skills }}- </AppTabsTrigger>- <AppTabsTrigger value="fonts" data-test-id="settings-section-fonts">- <template #leading><icon-lucide-type class="size-3.5" /></template>- {{ settings.fonts }}- </AppTabsTrigger>- <AppTabsTrigger value="media" data-test-id="settings-section-media">- <template #leading><icon-lucide-image class="size-3.5" /></template>- {{ settings.media }}- </AppTabsTrigger>- <AppTabsTrigger value="storage" data-test-id="settings-section-storage">- <template #leading><icon-lucide-database class="size-3.5" /></template>- {{ settings.storage }}- </AppTabsTrigger>- <AppTabsTrigger v-if="CLOUD_INCLUDED" value="cloud" data-test-id="settings-section-cloud">- <template #leading><icon-lucide-cloud class="size-3.5" /></template>- {{ settings.cloud }}- </AppTabsTrigger>+ <template v-for="group in groups" :key="group.label">+ <AppTabsHeading>{{ group.label }}</AppTabsHeading>+ <AppTabsTrigger+ v-for="section in group.sections"+ :key="section.value"+ :value="section.value"+ :data-test-id="`settings-section-${section.value}`"+ @click="onTriggerClick(section.value)"+ >+ <template #leading><component :is="section.icon" class="size-3.5" /></template>+ {{ section.label }}+ </AppTabsTrigger>+ </template></AppTabsList><AppTabsContent value="general" as-child><SettingsPage><GeneralSettingsPanel /></SettingsPage></AppTabsContent>- <AppTabsContent value="toolbar" as-child>- <SettingsPage><ToolbarSettingsPanel /></SettingsPage>+ <AppTabsContent value="editor" as-child>+ <EditorSettingsPanel />+ </AppTabsContent>+ <AppTabsContent value="fonts" as-child>+ <FontSettingsPanel />+ </AppTabsContent>+ <AppTabsContent value="storage" as-child>+ <StorageSettingsPanel />+ </AppTabsContent>+ <AppTabsContent v-if="CLOUD_INCLUDED" value="cloud" as-child>+ <CloudSettingsSection /></AppTabsContent><AppTabsContent value="ai" as-child><section class="flex min-h-0 min-w-0 flex-1 flex-col" data-test-id="settings-ai-panel">@@ -190,35 +211,26 @@ function onOpenChange(open: boolean): void {</ModelsPanel></section></AppTabsContent>- <AppTabsContent value="usage" as-child>- <SettingsPage><UsageSettingsPanel /></SettingsPage>- </AppTabsContent>- <AppTabsContent value="diagnostics" as-child>- <SettingsPage><DiagnosticsSettingsPanel /></SettingsPage>- </AppTabsContent>- <AppTabsContent value="privacy" as-child>- <SettingsPage><PrivacySettingsPanel /></SettingsPage>- </AppTabsContent>- <AppTabsContent value="mcp" as-child>- <MCPWorkspacePanel />- </AppTabsContent><AppTabsContent value="tools" as-child><ToolAccessSettingsPanel /></AppTabsContent><AppTabsContent value="skills" as-child><SkillsSettingsPanel /></AppTabsContent>- <AppTabsContent value="fonts" as-child>- <FontSettingsPanel />- </AppTabsContent>- <AppTabsContent value="media" as-child>+ <AppTabsContent value="services" as-child><MediaSettingsPanel /></AppTabsContent>- <AppTabsContent value="storage" as-child>- <StorageSettingsPanel />+ <AppTabsContent value="mcp" as-child>+ <MCPWorkspacePanel /></AppTabsContent>- <AppTabsContent v-if="CLOUD_INCLUDED" value="cloud" as-child>- <CloudSettingsSection />+ <AppTabsContent value="usage" as-child>+ <SettingsPage><UsageSettingsPanel /></SettingsPage>+ </AppTabsContent>+ <AppTabsContent value="privacy" as-child>+ <SettingsPage><PrivacySettingsPanel /></SettingsPage>+ </AppTabsContent>+ <AppTabsContent value="diagnostics" as-child>+ <SettingsPage><DiagnosticsSettingsPanel /></SettingsPage></AppTabsContent></AppTabsRoot>diff --git a/src/components/settings/diagnostics/DiagnosticsSettingsPanel.vue b/src/components/settings/diagnostics/DiagnosticsSettingsPanel.vueindex eec18754d..e3ae6787f 100644--- a/src/components/settings/diagnostics/DiagnosticsSettingsPanel.vue+++ b/src/components/settings/diagnostics/DiagnosticsSettingsPanel.vue@@ -8,6 +8,7 @@ import { diagnostics } from '@/app/diagnostics'import { diagnosticsEnvironment } from '@/app/diagnostics/environment'import { saveDiagnosticsReport } from '@/app/diagnostics/save'import {+ DIAGNOSTICS_RETENTION_DEFAULT,DIAGNOSTICS_RETENTION_MAX,DIAGNOSTICS_RETENTION_MIN,diagnosticsRetentionPresets,@@ -30,7 +31,6 @@ const clearOpen = ref(false)const {diagnosticsEnabled,- usageEnabled,diagnosticsCount,diagnosticsSize,diagnosticsRetention,@@ -50,6 +50,11 @@ async function commitRetention(value: number): Promise<void> {await refreshDiagnosticsStats()}+async function resetRetention(): Promise<void> {+ retentionValue.value = DIAGNOSTICS_RETENTION_DEFAULT+ await commitRetention(DIAGNOSTICS_RETENTION_DEFAULT)+}+async function clearDiagnostics() {await diagnostics.clear()await refreshDiagnosticsStats()@@ -83,20 +88,17 @@ async function saveDiagnostics() {as="label":label="diagnosticMessages.localDiagnostics":description="diagnosticMessages.localDiagnosticsDescription"+ :modified="!diagnosticsEnabled"+ @reset="diagnosticsEnabled = true"><AppSwitch v-model="diagnosticsEnabled" :label="diagnosticMessages.localDiagnostics" /></SettingsRow>- <SettingsRow- as="label"- :label="diagnosticMessages.usageHistory"- :description="usageEnabled ? diagnosticMessages.usageHistoryDescription : undefined"- >- <AppSwitch v-model="usageEnabled" :label="diagnosticMessages.usageHistory" />- </SettingsRow><SettingsRow:label="diagnosticMessages.retention":description="diagnosticMessages.retentionDescription"class="max-sm:flex-col max-sm:items-stretch"+ :modified="retentionValue !== DIAGNOSTICS_RETENTION_DEFAULT"+ @reset="resetRetention"><PresetNumberFieldv-model:number="retentionValue"@@ -116,14 +118,15 @@ async function saveDiagnostics() {</SettingsRow></SettingsGroup><DiagnosticsEventList :refresh-stats="refreshDiagnosticsStats" />- <div class="flex items-center justify-between text-[11px] text-muted">- <span>{{+ <!-- On a narrow page the buttons wrap below the count rather than squeezing it. -->+ <div class="flex flex-wrap items-center justify-between gap-x-3 gap-y-1 text-[11px] text-muted">+ <span class="whitespace-nowrap">{{diagnosticMessages.eventCount({count: diagnosticsCount,size: Math.ceil(diagnosticsSize / 1024)})}}</span>- <div class="flex items-center gap-1.5">+ <div class="flex flex-wrap items-center gap-1.5"><AppButton size="xs" color="neutral" variant="ghost" @click="exportDiagnostics"><template #leading><icon-lucide-check v-if="copied" /><icon-lucide-copy v-else /></templatediff --git a/src/components/settings/editor/EditorSettingsPanel.vue b/src/components/settings/editor/EditorSettingsPanel.vuenew file mode 100644index 000000000..ea75a4af9--- /dev/null+++ b/src/components/settings/editor/EditorSettingsPanel.vue@@ -0,0 +1,39 @@+<script setup lang="ts">+import { nextTick, useTemplateRef, watch } from 'vue'++import { settingsDialogAnchor, type SettingsAnchor } from '@/app/settings/dialog'+import SettingsPage from '@/components/settings/layout/SettingsPage.vue'+import ToolbarSettingsPanel from '@/components/settings/toolbar/ToolbarSettingsPanel.vue'++import NavigationSettingsSection from './NavigationSettingsSection.vue'+import RenderingSettingsSection from './RenderingSettingsSection.vue'+import SnappingSettingsSection from './SnappingSettingsSection.vue'++/** How the canvas and its tools behave: snapping, navigation, the toolbar, and rendering. */+const toolbar = useTemplateRef<HTMLElement>('toolbar')++// Customize toolbar opens this page on the toolbar.+watch(+ settingsDialogAnchor,+ async (anchor: SettingsAnchor | null) => {+ if (!anchor) return+ await nextTick()+ if (anchor === 'toolbar') toolbar.value?.scrollIntoView({ block: 'start' })+ settingsDialogAnchor.value = null+ },+ { immediate: true }+)+</script>++<template>+ <SettingsPage data-test-id="settings-editor-panel">+ <div class="flex flex-col gap-6">+ <SnappingSettingsSection />+ <NavigationSettingsSection />+ <div ref="toolbar" class="scroll-mt-4">+ <ToolbarSettingsPanel />+ </div>+ <RenderingSettingsSection />+ </div>+ </SettingsPage>+</template>diff --git a/src/components/settings/editor/NavigationSettingsSection.vue b/src/components/settings/editor/NavigationSettingsSection.vuenew file mode 100644index 000000000..469ee3008--- /dev/null+++ b/src/components/settings/editor/NavigationSettingsSection.vue@@ -0,0 +1,56 @@+<script setup lang="ts">+import { computed } from 'vue'++import { useI18n } from '@open-pencil/vue/i18n'++import {+ appPreferences,+ DEFAULT_APP_PREFERENCES,+ updateZoomSpeed,+ ZOOM_SPEEDS,+ type ZoomSpeed+} from '@/app/settings/preferences/store'+import SettingsGroup from '@/components/settings/layout/SettingsGroup.vue'+import SettingsRow from '@/components/settings/layout/SettingsRow.vue'+import SettingsSection from '@/components/settings/layout/SettingsSection.vue'+import AppSelect from '@/components/ui/select/AppSelect.vue'++const { locale, settings } = useI18n()+const selectUI = { trigger: 'w-full sm:w-52' }++const zoomSpeed = computed<ZoomSpeed>({+ get: () => appPreferences.value.navigation.zoomSpeed,+ set: updateZoomSpeed+})++const defaultZoomSpeed = DEFAULT_APP_PREFERENCES.navigation.zoomSpeed++const zoomSpeedOptions = computed(() => {+ const format = new Intl.NumberFormat(locale.value)+ return ZOOM_SPEEDS.map((value) => ({ value, label: `${format.format(value)}×` }))+})+</script>++<template>+ <SettingsSection>+ <template #title>{{ settings.navigation }}</template>+ <template #description>{{ settings.navigationDescription }}</template>++ <SettingsGroup>+ <SettingsRow+ :label="settings.zoomSpeed"+ :description="settings.zoomSpeedDescription"+ :modified="zoomSpeed !== defaultZoomSpeed"+ @reset="zoomSpeed = defaultZoomSpeed"+ >+ <AppSelect+ v-model="zoomSpeed"+ :label="settings.zoomSpeed"+ :options="zoomSpeedOptions"+ :ui="selectUI"+ data-test-id="settings-zoom-speed"+ />+ </SettingsRow>+ </SettingsGroup>+ </SettingsSection>+</template>diff --git a/src/components/settings/general/RenderingSettingsSection.vue b/src/components/settings/editor/RenderingSettingsSection.vuesimilarity index 81%rename from src/components/settings/general/RenderingSettingsSection.vuerename to src/components/settings/editor/RenderingSettingsSection.vueindex 19d73d9a6..98034fa83 100644--- a/src/components/settings/general/RenderingSettingsSection.vue+++ b/src/components/settings/editor/RenderingSettingsSection.vue@@ -4,7 +4,11 @@ import { computed } from 'vue'import { useI18n } from '@open-pencil/vue/i18n'import { appRuntimeConfig } from '@/app/runtime/config'-import { appPreferences, updateCanvasRenderingMode } from '@/app/settings/preferences/store'+import {+ appPreferences,+ DEFAULT_APP_PREFERENCES,+ updateCanvasRenderingMode+} from '@/app/settings/preferences/store'import SettingsGroup from '@/components/settings/layout/SettingsGroup.vue'import SettingsRow from '@/components/settings/layout/SettingsRow.vue'import SettingsSection from '@/components/settings/layout/SettingsSection.vue'@@ -15,6 +19,7 @@ import AppSwitch from '@/components/ui/toggle/AppSwitch.vue'const { rendering } = useI18n()const hasURLOverride = appRuntimeConfig.sceneRendererOverrideconst tiledRendering = computed(() => appPreferences.value.rendering.canvasMode === 'tiled')+const defaultTiledRendering = DEFAULT_APP_PREFERENCES.rendering.canvasMode === 'tiled'const changed = computed(() => appPreferences.value.rendering.canvasMode !== appRuntimeConfig.sceneRenderer)@@ -30,7 +35,12 @@ function setTiledRendering(enabled: boolean): void {<template #description>{{ rendering.settingsDescription }}</template><SettingsGroup>- <SettingsRow as="label" :description="rendering.progressiveTiledDescription">+ <SettingsRow+ as="label"+ :description="rendering.progressiveTiledDescription"+ :modified="tiledRendering !== defaultTiledRendering"+ @reset="setTiledRendering(defaultTiledRendering)"+ ><template #label><span class="flex flex-wrap items-center gap-2">{{ rendering.progressiveTiled }}diff --git a/src/components/settings/editor/SnappingSettingsSection.vue b/src/components/settings/editor/SnappingSettingsSection.vuenew file mode 100644index 000000000..61c233204--- /dev/null+++ b/src/components/settings/editor/SnappingSettingsSection.vue@@ -0,0 +1,81 @@+<script setup lang="ts">+import { computed } from 'vue'++import { DEFAULT_SNAPPING_PREFERENCES } from '@open-pencil/core'+import { useSettingsMessages } from '@open-pencil/vue/i18n'++import { setSnappingPreference } from '@/app/settings/preferences/apply'+import { appPreferences } from '@/app/settings/preferences/store'+import SettingsGroup from '@/components/settings/layout/SettingsGroup.vue'+import SettingsRow from '@/components/settings/layout/SettingsRow.vue'+import SettingsSection from '@/components/settings/layout/SettingsSection.vue'+import AppSwitch from '@/components/ui/toggle/AppSwitch.vue'++const settings = useSettingsMessages()++const snapToGeometry = computed({+ get: () => appPreferences.value.editing.snapping.geometry,+ set: (enabled: boolean) => setSnappingPreference('geometry', enabled)+})++const snapToObjects = computed({+ get: () => appPreferences.value.editing.snapping.objects,+ set: (enabled: boolean) => setSnappingPreference('objects', enabled)+})++const snapToPixelGrid = computed({+ get: () => appPreferences.value.editing.snapping.pixelGrid,+ set: (enabled: boolean) => setSnappingPreference('pixelGrid', enabled)+})+</script>++<template>+ <SettingsSection>+ <template #title>{{ settings.editing }}</template>+ <template #description>{{ settings.snappingDescription }}</template>++ <SettingsGroup>+ <SettingsRow+ as="label"+ :label="settings.snapToGeometry"+ :description="settings.snapToGeometryDescription"+ :modified="snapToGeometry !== DEFAULT_SNAPPING_PREFERENCES.geometry"+ @reset="snapToGeometry = DEFAULT_SNAPPING_PREFERENCES.geometry"+ >+ <AppSwitch+ v-model="snapToGeometry"+ :label="settings.snapToGeometry"+ data-test-id="settings-snap-geometry"+ />+ </SettingsRow>+ <SettingsRow+ as="label"+ :label="settings.snapToObjects"+ :description="settings.snapToObjectsDescription"+ :modified="snapToObjects !== DEFAULT_SNAPPING_PREFERENCES.objects"+ @reset="snapToObjects = DEFAULT_SNAPPING_PREFERENCES.objects"+ >+ <AppSwitch+ v-model="snapToObjects"+ :label="settings.snapToObjects"+ data-test-id="settings-snap-objects"+ />+ </SettingsRow>+ <SettingsRow+ as="label"+ :label="settings.snapToPixelGrid"+ :description="settings.snapToPixelGridDescription"+ :modified="snapToPixelGrid !== DEFAULT_SNAPPING_PREFERENCES.pixelGrid"+ @reset="snapToPixelGrid = DEFAULT_SNAPPING_PREFERENCES.pixelGrid"+ >+ <AppSwitch+ v-model="snapToPixelGrid"+ :label="settings.snapToPixelGrid"+ data-test-id="settings-snap-pixel-grid"+ />+ </SettingsRow>+ </SettingsGroup>++ <p class="text-[11px] text-muted">{{ settings.temporaryDisableSnappingHint }}</p>+ </SettingsSection>+</template>diff --git a/src/components/settings/general/GeneralSettingsPanel.vue b/src/components/settings/general/GeneralSettingsPanel.vueindex 642d50f58..9fa8fbaa1 100644--- a/src/components/settings/general/GeneralSettingsPanel.vue+++ b/src/components/settings/general/GeneralSettingsPanel.vue@@ -1,25 +1,27 @@<script setup lang="ts">+import { isEqual } from 'es-toolkit'import { computed } from 'vue'import { type Locale, useI18n } from '@open-pencil/vue/i18n'import { recoveryEnabled, setRecoveryEnabled } from '@/app/document/recovery/preferences'+import { DEFAULT_RECENT_FILES_LIMIT } from '@/app/recent-files/limit'import { recentFilesAvailable, recentFilesLimit } from '@/app/recent-files/preferences'import { RECENT_FILES_LIMIT_MIN, RECENT_FILES_LIMIT_MAX } from '@/app/recent-files/schema'-import { setSnappingPreference } from '@/app/settings/preferences/apply'import {appPreferences,- updateZoomSpeed,- ZOOM_SPEEDS,- type ZoomSpeed+ DEFAULT_APP_PREFERENCES,+ updateAccentPreference} from '@/app/settings/preferences/store'+import { DEFAULT_THEME } from '@/app/settings/theme'+import { DEFAULT_ACCENT } from '@/app/shell/accent/palette'import { animationPreference } from '@/app/shell/motion'import { useAppTheme } from '@/app/shell/theme'import CredentialSettingsSection from '@/components/settings/credentials/CredentialSettingsSection.vue'import AccentColorPicker from '@/components/settings/general/AccentColorPicker.vue'import CollaborationNameSection from '@/components/settings/general/CollaborationNameSection.vue'-import RenderingSettingsSection from '@/components/settings/general/RenderingSettingsSection.vue'import SettingsGroup from '@/components/settings/layout/SettingsGroup.vue'+import SettingsResetButton from '@/components/settings/layout/SettingsResetButton.vue'import SettingsRow from '@/components/settings/layout/SettingsRow.vue'import SettingsSection from '@/components/settings/layout/SettingsSection.vue'import PresetNumberField from '@/components/ui/input/PresetNumberField.vue'@@ -47,38 +49,16 @@ const languageOptions = availableLocales.map((value) => ({label: localeLabels[value]}))+const defaultAnimations = DEFAULT_APP_PREFERENCES.appearance.animations+const defaultRecovery = DEFAULT_APP_PREFERENCES.recovery.enabled+const accentModified = computed(+ () => !isEqual(appPreferences.value.appearance.accent, DEFAULT_ACCENT)+)+const preserveUnsavedWork = computed({get: () => recoveryEnabled.value,set: setRecoveryEnabled})--const snapToGeometry = computed({- get: () => appPreferences.value.editing.snapping.geometry,- set: (enabled: boolean) => setSnappingPreference('geometry', enabled)-})--const snapToObjects = computed({- get: () => appPreferences.value.editing.snapping.objects,- set: (enabled: boolean) => setSnappingPreference('objects', enabled)-})--const snapToPixelGrid = computed({- get: () => appPreferences.value.editing.snapping.pixelGrid,- set: (enabled: boolean) => setSnappingPreference('pixelGrid', enabled)-})--const zoomSpeed = computed<ZoomSpeed>({- get: () => appPreferences.value.navigation.zoomSpeed,- set: updateZoomSpeed-})--const zoomSpeedOptions = computed(() => {- const format = new Intl.NumberFormat(locale.value)- return ZOOM_SPEEDS.map((value) => {- const speed = `${format.format(value)}×`- return { value, label: value === 1 ? settings.value.zoomSpeedDefault({ speed }) : speed }- })-})</script><template>@@ -87,8 +67,7 @@ const zoomSpeedOptions = computed(() => {<template #title>{{ menu.language }}</template><template #description>{{ settings.languageDescription }}</template><SettingsGroup>- <label class="flex items-center justify-between gap-4 px-3 py-2.5">- <span class="text-xs text-surface">{{ menu.language }}</span>+ <SettingsRow as="label" :label="menu.language"><AppSelectv-model="language":label="menu.language"@@ -96,15 +75,19 @@ const zoomSpeedOptions = computed(() => {:ui="selectUI"data-test-id="settings-language"/>- </label>+ </SettingsRow></SettingsGroup></SettingsSection><SettingsSection><template #title>{{ settings.appearance }}</template><SettingsGroup>- <label class="flex items-center justify-between gap-4 px-3 py-2.5">- <span class="text-xs text-surface">{{ menu.theme }}</span>+ <SettingsRow+ as="label"+ :label="menu.theme"+ :modified="theme !== DEFAULT_THEME"+ @reset="theme = DEFAULT_THEME"+ ><AppSelectv-model="theme":label="menu.theme"@@ -115,13 +98,23 @@ const zoomSpeedOptions = computed(() => {]":ui="selectUI"/>- </label>+ </SettingsRow><div class="flex flex-wrap items-center justify-between gap-x-4 gap-y-2 px-3 py-2.5">- <span class="text-xs text-surface">{{ settings.accentColor }}</span>- <AccentColorPicker />+ <span class="text-xs font-medium text-surface">{{ settings.accentColor }}</span>+ <span class="flex items-center gap-1">+ <SettingsResetButton+ v-if="accentModified"+ @reset="updateAccentPreference({ ...DEFAULT_ACCENT })"+ />+ <AccentColorPicker />+ </span></div>- <label class="flex items-center justify-between gap-4 px-3 py-2.5">- <span class="text-xs text-surface">{{ settings.animations }}</span>+ <SettingsRow+ as="label"+ :label="settings.animations"+ :modified="animationPreference !== defaultAnimations"+ @reset="animationPreference = defaultAnimations"+ ><AppSelectv-model="animationPreference":label="settings.animations"@@ -131,7 +124,7 @@ const zoomSpeedOptions = computed(() => {]":ui="selectUI"/>- </label>+ </SettingsRow></SettingsGroup></SettingsSection>@@ -145,6 +138,8 @@ const zoomSpeedOptions = computed(() => {as="label":label="recovery.preserveUnsavedWork":description="recovery.preserveUnsavedWorkDescription"+ :modified="preserveUnsavedWork !== defaultRecovery"+ @reset="preserveUnsavedWork = defaultRecovery"><AppSwitchv-model="preserveUnsavedWork"@@ -155,66 +150,6 @@ const zoomSpeedOptions = computed(() => {</SettingsGroup></SettingsSection>- <SettingsSection>- <template #title>{{ settings.editing }}</template>- <template #description>{{ settings.snappingDescription }}</template>-- <SettingsGroup>- <SettingsRow- as="label"- :label="settings.snapToGeometry"- :description="settings.snapToGeometryDescription"- >- <AppSwitch- v-model="snapToGeometry"- :label="settings.snapToGeometry"- data-test-id="settings-snap-geometry"- />- </SettingsRow>- <SettingsRow- as="label"- :label="settings.snapToObjects"- :description="settings.snapToObjectsDescription"- >- <AppSwitch- v-model="snapToObjects"- :label="settings.snapToObjects"- data-test-id="settings-snap-objects"- />- </SettingsRow>- <SettingsRow- as="label"- :label="settings.snapToPixelGrid"- :description="settings.snapToPixelGridDescription"- >- <AppSwitch- v-model="snapToPixelGrid"- :label="settings.snapToPixelGrid"- data-test-id="settings-snap-pixel-grid"- />- </SettingsRow>- </SettingsGroup>-- <p class="text-[11px] text-muted">{{ settings.temporaryDisableSnappingHint }}</p>- </SettingsSection>-- <SettingsSection>- <template #title>{{ settings.navigation }}</template>- <template #description>{{ settings.navigationDescription }}</template>-- <SettingsGroup>- <SettingsRow :label="settings.zoomSpeed" :description="settings.zoomSpeedDescription">- <AppSelect- v-model="zoomSpeed"- :label="settings.zoomSpeed"- :options="zoomSpeedOptions"- :ui="selectUI"- data-test-id="settings-zoom-speed"- />- </SettingsRow>- </SettingsGroup>- </SettingsSection>-<SettingsSection v-if="showRecentFiles"><template #title>{{ settings.recentFiles }}</template><template #description>{{ settings.recentFilesDescription }}</template>@@ -222,6 +157,8 @@ const zoomSpeedOptions = computed(() => {<SettingsRow:label="settings.recentFilesLimit"class="max-sm:flex-col max-sm:items-stretch"+ :modified="recentFilesLimit !== DEFAULT_RECENT_FILES_LIMIT"+ @reset="recentFilesLimit = DEFAULT_RECENT_FILES_LIMIT"><PresetNumberFieldv-model:number="recentFilesLimit"@@ -237,6 +174,5 @@ const zoomSpeedOptions = computed(() => {</SettingsSection><CredentialSettingsSection />- <RenderingSettingsSection /></section></template>diff --git a/src/components/settings/layout/SettingsResetButton.vue b/src/components/settings/layout/SettingsResetButton.vuenew file mode 100644index 000000000..4792f05f2--- /dev/null+++ b/src/components/settings/layout/SettingsResetButton.vue@@ -0,0 +1,23 @@+<script setup lang="ts">+import { useSettingsMessages } from '@open-pencil/vue/i18n'++import IconButton from '@/components/ui/button/IconButton.vue'++/**+ * Puts one setting back to its default. A row shows it only while its value differs from the+ * default, as VS Code's settings do, so an unchanged page shows none.+ */+const emit = defineEmits<{ reset: [] }>()+const settings = useSettingsMessages()+</script>++<template>+ <IconButton+ :label="settings.resetToDefault"+ size="sm"+ data-settings-reset+ @click.prevent="emit('reset')"+ >+ <icon-lucide-rotate-ccw class="size-3.5" />+ </IconButton>+</template>diff --git a/src/components/settings/layout/SettingsRow.vue b/src/components/settings/layout/SettingsRow.vueindex 9330f3e97..5f71be087 100644--- a/src/components/settings/layout/SettingsRow.vue+++ b/src/components/settings/layout/SettingsRow.vue@@ -1,15 +1,26 @@<script setup lang="ts">import { Primitive } from 'reka-ui'+import SettingsResetButton from './SettingsResetButton.vue'+/*** One line of a `SettingsGroup`: a label, an optional description, and its control on the right.- * As a `label`, clicking the text works the control, as a switch row does.+ * As a `label`, clicking the text works the control, as a switch row does. A `modified` row offers+ * Reset to default before its control, emitting `reset`.*/const {label,description,- as = 'div'-} = defineProps<{ label?: string; description?: string; as?: 'div' | 'label' }>()+ as = 'div',+ modified = false+} = defineProps<{+ label?: string+ description?: string+ as?: 'div' | 'label'+ /** The setting differs from its default. */+ modified?: boolean+}>()+const emit = defineEmits<{ reset: [] }>()</script><template>@@ -27,6 +38,9 @@ const {}}</span><slot name="description" /></span>- <span class="shrink-0"><slot /></span>+ <span class="flex shrink-0 items-center gap-1">+ <SettingsResetButton v-if="modified" @reset="emit('reset')" />+ <slot />+ </span></Primitive></template>diff --git a/src/components/settings/usage/UsageSettingsPanel.vue b/src/components/settings/usage/UsageSettingsPanel.vueindex 1da770f53..d0a22eb18 100644--- a/src/components/settings/usage/UsageSettingsPanel.vue+++ b/src/components/settings/usage/UsageSettingsPanel.vue@@ -3,8 +3,12 @@ import { computed } from 'vue'import { useI18n } from '@open-pencil/vue/i18n'+import { useDiagnosticsSettings } from '@/app/diagnostics/settings'import { useUsageSettings } from '@/app/usage/settings/use'+import SettingsGroup from '@/components/settings/layout/SettingsGroup.vue'+import SettingsRow from '@/components/settings/layout/SettingsRow.vue'import SettingsSection from '@/components/settings/layout/SettingsSection.vue'+import AppSwitch from '@/components/ui/toggle/AppSwitch.vue'const { diagnostics: diagnosticMessages, settings } = useI18n()@@ -13,6 +17,7 @@ function formatTokenValue(value: number | null): string {}const { summary } = useUsageSettings()+const { usageEnabled } = useDiagnosticsSettings()const totals = computed(() => {const messages = diagnosticMessages.value@@ -33,6 +38,18 @@ const totals = computed(() => {<template #title>{{ settings.usage }}</template><template #description>{{ diagnosticMessages.usageDescription }}</template>+ <SettingsGroup>+ <SettingsRow+ as="label"+ :label="diagnosticMessages.usageHistory"+ :description="diagnosticMessages.usageHistoryDescription"+ :modified="!usageEnabled"+ @reset="usageEnabled = true"+ >+ <AppSwitch v-model="usageEnabled" :label="diagnosticMessages.usageHistory" />+ </SettingsRow>+ </SettingsGroup>+<div class="grid grid-cols-2 gap-2"><div v-for="total in totals" :key="total.label" class="rounded border border-border p-3"><div class="text-[11px] text-muted">{{ total.label }}</div>diff --git a/src/components/toolbar/ToolbarContextMenu.vue b/src/components/toolbar/ToolbarContextMenu.vueindex d48bda187..58a14bf4c 100644--- a/src/components/toolbar/ToolbarContextMenu.vue+++ b/src/components/toolbar/ToolbarContextMenu.vue@@ -26,7 +26,7 @@ const menu = useMenuUI({ content: 'w-48', item: 'justify-start gap-2' })<ContextMenuPortal><ContextMenuContent :class="menu.content"><MenuScrollArea>- <ContextMenuItem :class="menu.item" @select="openSettingsDialog('toolbar')">+ <ContextMenuItem :class="menu.item" @select="openSettingsDialog('editor', 'toolbar')"><icon-lucide-sliders-horizontal :class="menu.icon" />{{ settings.customizeToolbar }}</ContextMenuItem>diff --git a/src/components/ui/tabs/AppTabsHeading.vue b/src/components/ui/tabs/AppTabsHeading.vuenew file mode 100644index 000000000..6720501c3--- /dev/null+++ b/src/components/ui/tabs/AppTabsHeading.vue@@ -0,0 +1,13 @@+<script setup lang="ts">+import { tabs } from './ui'++/**+ * Names the group of tabs below it. It is for the eye only: a tab list holds tabs, so screen+ * readers hear each tab's own name and move through them as one list.+ */+const styles = tabs()+</script>++<template>+ <div :class="styles.heading()" aria-hidden="true" data-slot="tabs-heading"><slot /></div>+</template>diff --git a/src/components/ui/tabs/index.ts b/src/components/ui/tabs/index.tsindex bf63f3dbe..56a73a7d8 100644--- a/src/components/ui/tabs/index.ts+++ b/src/components/ui/tabs/index.ts@@ -1,4 +1,5 @@export { default as AppTabsContent } from './AppTabsContent.vue'+export { default as AppTabsHeading } from './AppTabsHeading.vue'export { default as AppTabsList } from './AppTabsList.vue'export { default as AppTabsRoot } from './AppTabsRoot.vue'export { default as AppTabsTrigger } from './AppTabsTrigger.vue'diff --git a/src/theme/tabs/index.ts b/src/theme/tabs/index.tsindex 412782cde..b81684551 100644--- a/src/theme/tabs/index.ts+++ b/src/theme/tabs/index.ts@@ -4,6 +4,8 @@ export default {list: 'flex min-w-0 shrink-0 gap-1 overflow-x-auto p-2 data-[orientation=vertical]:w-40 data-[orientation=vertical]:flex-col data-[orientation=vertical]:border-r data-[orientation=vertical]:border-border',trigger:'flex shrink-0 cursor-pointer items-center gap-2 rounded px-2 py-1.5 text-left text-xs text-muted transition-colors hover:bg-hover hover:text-surface focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/50 disabled:cursor-default disabled:opacity-50 data-[state=active]:bg-hover data-[state=active]:text-surface',+ // A group's name above its tabs, styled as the side list's group titles (list/side-list.ts).+ heading: 'px-2 pt-3 pb-1 text-[11px] font-semibold text-muted select-none first:pt-1',icon: 'flex size-3.5 shrink-0 items-center justify-center',label: 'min-w-0',trailing: 'ml-auto shrink-0',diff --git a/tests/e2e/settings/diagnostics.spec.ts b/tests/e2e/settings/diagnostics.spec.tsindex 1848b51e1..c3d52f44c 100644--- a/tests/e2e/settings/diagnostics.spec.ts+++ b/tests/e2e/settings/diagnostics.spec.ts@@ -5,6 +5,7 @@ import * as v from 'valibot'import { CanvasHelper } from '#tests/helpers/canvas'import { expect, test } from '#tests/helpers/chat/fixture'+import { openAppMenu } from '#tests/helpers/menu'/** The JSON that Copy diagnostics puts on the clipboard, as far as these tests read it. */const reportSchema = v.pipe(@@ -162,3 +163,24 @@ test('uncaught errors are listed with their stack and can be filtered and copiedexpect(runtime?.attributes).toMatchObject({ source: 'window', errorName: 'TypeError' })expect(String(runtime?.attributes.stack)).toContain('TypeError')})++test('File › Diagnostics opens its own page, and usage history is switched on the Usage page', async ({+ page+}) => {+ await page.goto('/?test')+ await new CanvasHelper(page).waitForInit()+ const menu = await openAppMenu(page, 'File')+ await menu.getByRole('menuitem', { name: 'Diagnostics…' }).click()+ await expect(page.getByTestId('settings-section-diagnostics')).toHaveAttribute(+ 'aria-selected',+ 'true'+ )+ await expect(page.getByTestId('settings-diagnostics-panel')).toBeVisible()+ await expect(page.getByRole('switch', { name: 'Usage history' })).toHaveCount(0)++ await page.getByTestId('settings-section-usage').click()+ const history = page+ .getByTestId('settings-usage-panel')+ .getByRole('switch', { name: 'Usage history' })+ await expect(history).toHaveAttribute('data-state', 'checked')+})diff --git a/tests/e2e/settings/feedback.spec.ts b/tests/e2e/settings/feedback.spec.tsindex cb2acb54a..739420521 100644--- a/tests/e2e/settings/feedback.spec.ts+++ b/tests/e2e/settings/feedback.spec.ts@@ -91,7 +91,7 @@ async function failCredentialWrites(page: Page) {test('media explains optional keys and preserves input after a failed save', async ({ page }) => {await openSettings(page)- await page.getByTestId('settings-section-media').click()+ await page.getByTestId('settings-section-services').click()await page.getByRole('button', { name: /Pexels/ }).click()const key = page.getByRole('textbox', { name: 'API key', exact: true })await expect(page.getByRole('link', { name: 'Get API key' })).toHaveAttribute(diff --git a/tests/e2e/settings/general.spec.ts b/tests/e2e/settings/general.spec.tsindex c0fe5c59c..27e49aa75 100644--- a/tests/e2e/settings/general.spec.ts+++ b/tests/e2e/settings/general.spec.ts@@ -34,7 +34,8 @@ test('general snapping preferences persist and apply to editor sessions', asyncawait canvas.waitForInit()await page.getByTestId('app-settings-trigger').click()- await expect(page.getByTestId('settings-general-panel')).toBeVisible()+ await page.getByTestId('settings-section-editor').click()+ await expect(page.getByTestId('settings-editor-panel')).toBeVisible()const geometry = page.getByRole('switch', { name: 'Snap to geometry' })const objects = page.getByRole('switch', { name: 'Snap to objects' })const pixelGrid = page.getByRole('switch', { name: 'Snap to pixel grid' })@@ -55,6 +56,7 @@ test('general snapping preferences persist and apply to editor sessions', asyncawait page.reload()await canvas.waitForInit()await page.getByTestId('app-settings-trigger').click()+ await page.getByTestId('settings-section-editor').click()await expect(geometry).not.toBeChecked()await expect(objects).not.toBeChecked()await expect(pixelGrid).not.toBeChecked()@@ -75,6 +77,7 @@ test('progressive tiled rendering preference persists and URL overrides take preawait canvas.waitForInit()await page.getByTestId('app-settings-trigger').click()+ await page.getByTestId('settings-section-editor').click()const tiled = page.getByRole('switch', { name: 'Progressive rendering' })await expect(tiled).not.toBeChecked()await tiled.click()@@ -83,6 +86,7 @@ test('progressive tiled rendering preference persists and URL overrides take preawait page.reload()await canvas.waitForInit()await page.getByTestId('app-settings-trigger').click()+ await page.getByTestId('settings-section-editor').click()await expect(tiled).toBeChecked()await expect(page.evaluate(() =>@@ -97,6 +101,7 @@ test('progressive tiled rendering preference persists and URL overrides take preawait page.goto('/?test&renderer=retained')await canvas.waitForInit()await page.getByTestId('app-settings-trigger').click()+ await page.getByTestId('settings-section-editor').click()await expect(tiled).toBeChecked()await expect(page.getByText(/current session renderer is controlled by a URL override/i)@@ -130,6 +135,7 @@ test('Preferences menu snapping controls use the same preferences', async ({ pagawait objects.click()await page.getByTestId('app-settings-trigger').click()+ await page.getByTestId('settings-section-editor').click()await expect(page.getByRole('switch', { name: 'Snap to objects' })).not.toBeChecked()await page.getByRole('switch', { name: 'Snap to objects' }).click()})@@ -140,7 +146,7 @@ test('settings shortcut preserves the last visited section', async ({ page }) =>await canvas.waitForInit()await page.getByTestId('app-settings-trigger').click()- await page.getByTestId('settings-section-media').click()+ await page.getByTestId('settings-section-services').click()await page.getByTestId('app-settings-done').click()await page.keyboard.press(process.platform === 'darwin' ? 'Meta+,' : 'Control+,')diff --git a/tests/e2e/settings/mobile.spec.ts b/tests/e2e/settings/mobile.spec.tsindex e9964b82a..aec1cadb2 100644--- a/tests/e2e/settings/mobile.spec.ts+++ b/tests/e2e/settings/mobile.spec.ts@@ -17,11 +17,11 @@ for (const theme of ['light', 'dark']) {await expect(dialog).toBeVisible()const section = dialog.getByRole('combobox', { name: 'Settings', exact: true })await section.click()- await page.getByRole('option', { name: 'AI & agents', exact: true }).click()+ await page.getByRole('option', { name: 'Models', exact: true }).click()await expect(page.getByTestId('settings-ai-panel')).toBeVisible()await expect(dialog).toHaveScreenshot(`mobile-settings-models-${theme}.png`)await section.click()- await page.getByRole('option', { name: 'Cloud storage', exact: true }).click()+ await page.getByRole('option', { name: 'Storage', exact: true }).click()await expect(page.getByTestId('settings-storage-panel')).toBeVisible()await expect(dialog).toHaveScreenshot(`mobile-settings-storage-${theme}.png`)})diff --git a/tests/e2e/settings/model-editor.spec.ts b/tests/e2e/settings/model-editor.spec.tsindex cd38d2657..c6bec8e2a 100644--- a/tests/e2e/settings/model-editor.spec.ts+++ b/tests/e2e/settings/model-editor.spec.ts@@ -29,6 +29,12 @@ test('model editing keeps the Settings shell stable and isolates the form', asynawait expect(page.getByTestId('settings-breadcrumb')).toHaveCount(0)await page.getByTestId('settings-add-model').click()await expect(editor).toBeVisible()+ // So does its page, picked again in the sidebar.+ await page.getByTestId('settings-section-ai').click()+ await expect(editor).toHaveCount(0)+ await expect(page.getByRole('alertdialog')).toHaveCount(0)+ await page.getByTestId('settings-add-model').click()+ await expect(editor).toBeVisible()// Accidental dismissal must not throw away an in-progress profile.await editor.getByRole('textbox', { name: 'Name', exact: true }).fill('Draft profile')@@ -36,6 +42,10 @@ test('model editing keeps the Settings shell stable and isolates the form', asynawait expect(page.getByRole('alertdialog')).toBeVisible()await page.getByRole('button', { name: 'Keep editing', exact: true }).click()await expect(editor).toBeVisible()+ await page.getByTestId('settings-section-ai').click()+ await expect(page.getByRole('alertdialog')).toBeVisible()+ await page.getByRole('button', { name: 'Keep editing', exact: true }).click()+ await expect(editor).toBeVisible()await editor.getByRole('button', { name: 'Cancel', exact: true }).click()await expect(editor).toHaveCount(0)await expect(page.getByTestId('app-settings-done')).toBeVisible()diff --git a/tests/e2e/settings/polish.spec.ts b/tests/e2e/settings/polish.spec.tsindex 8c5abe261..9792f0586 100644--- a/tests/e2e/settings/polish.spec.ts+++ b/tests/e2e/settings/polish.spec.ts@@ -60,7 +60,7 @@ test('external Settings requests respect a dirty editor', async ({ page }) => {page.evaluate(async () => {const path = '/src/app/settings/dialog.ts'const { openSettingsDialog } = await import(path)- openSettingsDialog('media')+ openSettingsDialog('services')})await requestSection()await expect(page.getByRole('alertdialog')).toBeVisible()diff --git a/tests/e2e/settings/reset.spec.ts b/tests/e2e/settings/reset.spec.tsnew file mode 100644index 000000000..97f403673--- /dev/null+++ b/tests/e2e/settings/reset.spec.ts@@ -0,0 +1,27 @@+import { expect, test } from '@playwright/test'++import { CanvasHelper } from '#tests/helpers/canvas'++test('a changed setting offers Reset to default, which puts the default back', async ({ page }) => {+ await page.goto('/?test')+ await new CanvasHelper(page).waitForInit()+ await page.keyboard.press(process.platform === 'darwin' ? 'Meta+,' : 'Control+,')+ await page.getByTestId('settings-section-editor').click()+ const editor = page.getByTestId('settings-editor-panel')+ // Nothing has been changed, so no row offers a reset; the toolbar's own stays its section's.+ await expect(editor.locator('[data-settings-reset]')).toHaveCount(0)++ const zoomSpeed = page.getByTestId('settings-zoom-speed')+ await zoomSpeed.click()+ await page.getByRole('option', { name: '2×' }).click()+ const reset = editor+ .locator('[data-slot=settings-row]')+ .filter({ hasText: 'Zoom speed' })+ .getByRole('button', { name: 'Reset to default' })+ await expect(reset).toHaveCount(1)+ await expect(editor.locator('[data-settings-reset]')).toHaveCount(1)++ await reset.click()+ await expect(zoomSpeed).toContainText('1×')+ await expect(reset).toHaveCount(0)+})diff --git a/tests/e2e/settings/tabs.spec.ts b/tests/e2e/settings/tabs.spec.tsindex 680efe27a..957bd39a0 100644--- a/tests/e2e/settings/tabs.spec.ts+++ b/tests/e2e/settings/tabs.spec.ts@@ -17,10 +17,14 @@ test('settings tabs associate panels and support vertical keyboard navigation',await expect(dialog).toHaveScreenshot('settings-tabs-general.png')await general.focus()await general.press('ArrowDown')- const toolbar = page.getByTestId('settings-section-toolbar')- await expect(toolbar).toBeFocused()- await expect(page.getByTestId('settings-toolbar-panel')).toBeVisible()- await toolbar.press('ArrowDown')+ const editor = page.getByTestId('settings-section-editor')+ await expect(editor).toBeFocused()+ await expect(page.getByTestId('settings-editor-panel')).toBeVisible()+ // Group headings sit between the tabs without taking a stop.+ await editor.press('ArrowDown')+ await page.getByTestId('settings-section-fonts').press('ArrowDown')+ await page.getByTestId('settings-section-storage').press('ArrowDown')+ await page.getByTestId('settings-section-cloud').press('ArrowDown')const ai = page.getByTestId('settings-section-ai')await expect(ai).toBeFocused()await expect(ai).toHaveAttribute('aria-selected', 'true')@@ -34,7 +38,7 @@ test('settings tabs associate panels and support vertical keyboard navigation',await expect(general).toBeFocused()await expect(page.getByTestId('settings-general-panel')).toBeVisible()await general.press('End')- await expect(page.getByTestId('settings-section-storage')).toBeFocused()+ await expect(page.getByTestId('settings-section-diagnostics')).toBeFocused()await page.getByTestId('app-settings-done').click()await expect(dialog).not.toBeVisible()})diff --git a/tests/engine/app/shell/menu/schema.test.ts b/tests/engine/app/shell/menu/schema.test.tsindex c92188810..ba01ffb30 100644--- a/tests/engine/app/shell/menu/schema.test.ts+++ b/tests/engine/app/shell/menu/schema.test.ts@@ -51,6 +51,7 @@ describe('APP_MENU_SCHEMA', () => {expect(shellEntries.map((entry) => ('type' in entry ? '' : entry.id))).toEqual(['browse-files','open-tour',+ 'diagnostics','settings','view-design-issues','theme-light',diff --git a/tools/checks/i18n/mixed-script-baseline.txt b/tools/checks/i18n/mixed-script-baseline.txtindex 5dac46472..d81caa118 100644--- a/tools/checks/i18n/mixed-script-baseline.txt+++ b/tools/checks/i18n/mixed-script-baseline.txt@@ -208,7 +208,6 @@ ja:rendering.reloadRequiredja:rendering.settingsDescriptionja:rendering.urlOverrideja:rendering.wideGamutUnavailable-ja:settings.aiAndAgentsja:settings.baseURLHintja:settings.invalidURLja:settings.modelIDHint@@ -429,7 +428,6 @@ zh-cn:rendering.reloadRequiredzh-cn:rendering.settingsDescriptionzh-cn:rendering.urlOverridezh-cn:rendering.wideGamutUnavailable-zh-cn:settings.aiAndAgentszh-cn:settings.baseURLHintzh-cn:settings.invalidURLzh-cn:settings.temporaryDisableSnappingHintdiff --git a/tools/checks/i18n/translation-baseline.txt b/tools/checks/i18n/translation-baseline.txtindex cfcf8c316..5bcdeb482 100644--- a/tools/checks/i18n/translation-baseline.txt+++ b/tools/checks/i18n/translation-baseline.txt@@ -361,6 +361,7 @@ it:variables.formulait:variables.unitAutopl:variables.unitAutoes:menu.variables+fr:menu.diagnosticsfr:menu.variablesfr:variables.collectionsde:panels.gridAuto@@ -477,9 +478,6 @@ ru:cloudPortal.methodAppleru:cloudPortal.deploymentOfficialru:cloudPortal.emailTransportSMTPru:cloudPortal.emailTransportCloudflare-de:settings.cloud-fr:settings.cloud-it:settings.cloudes:cloud.productNamees:cloud.roleEditores:cloud.homeCloudOnHost@@ -530,3 +528,14 @@ ru:cloud.inviteEmailPlaceholderde:settings.skillsde:ai.chatReferenceSkillsfr:ai.chatReferencePages+de:settings.groupApp+de:settings.editor+es:settings.editor+it:settings.groupApp+it:settings.editor+ja:settings.groupAI+pl:settings.groupAI+zh-cn:settings.groupAI+de:settings.cloud+fr:settings.cloud+it:settings.cloud