From 22949100189e643a717a351cc3c21ba24a5e3210 Mon Sep 17 00:00:00 2001 From: Dylan Hunt Date: Wed, 2 Dec 2026 20:23:35 +0800 Subject: [PATCH 1/5] docs: correct which release notes carry the Developers section CrabNebula gets every released CHANGELOG section with Developers included (the update modal hides it); only the echophrase-releases GitHub Release strips it. --- CLAUDE.md | 8 +-- src/lib/services/updater.ts | 102 ------------------------------------ 2 files changed, 5 insertions(+), 105 deletions(-) delete mode 100644 src/lib/services/updater.ts diff --git a/CLAUDE.md b/CLAUDE.md index 01a841d..9a3bb0c 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -412,9 +412,11 @@ buttons). Add an entry whenever you work around a bug you do not own. (staging vite mode + devtools). Every release publishes to the CrabNebula **default** channel. `# TRANSITION:` steps in `release.yml` also publish to the legacy `beta`/`stable` channels until old installs migrate. -- **Every release ships its full patch notes, everywhere.** The release's CHANGELOG section - (minus `### Developers`) is the notes for the in-app update modal (CrabNebula) AND the - `echophrase-releases` GitHub Release (`scripts/changelog-section.sh`). Never placeholder +- **Every release ships its full patch notes, everywhere.** CrabNebula (the in-app update + modal) gets every released CHANGELOG section, `### Developers` included: the modal hides + those sections itself until the user ticks "Show developer changes". The + `echophrase-releases` GitHub Release gets only the release's own section with + `### Developers` removed (`scripts/changelog-section.sh`). Never placeholder notes like "See echophrase.com for details". A successful release also posts a one-line summary to the #echophrase Discord (`DISCORD_WEBHOOK_URL` secret; text from the `` line in the CHANGELOG section). diff --git a/src/lib/services/updater.ts b/src/lib/services/updater.ts deleted file mode 100644 index 8b6f73a..0000000 --- a/src/lib/services/updater.ts +++ /dev/null @@ -1,102 +0,0 @@ -// SPDX-FileCopyrightText: 2025-2026 Imperium42 LLC -// -// SPDX-License-Identifier: MPL-2.0 - -/** - * Auto-Update Service - * - * Handles checking for and installing app updates via CrabNebula Cloud. - * Uses Tauri's updater plugin with signed updates for security. - */ - -import { check, type Update } from '@tauri-apps/plugin-updater'; -import { ask } from '@tauri-apps/plugin-dialog'; -import { relaunch } from '@tauri-apps/plugin-process'; -import { translate } from '#lib/locales/index.ts'; - -/** Track if we've already shown an update prompt this session */ -let updatePromptShown = false; - -/** - * Check for available updates - * - * @param silent - If true, won't show "up to date" message or prompt user - * @returns true if update was found (and optionally installed) - */ -export async function checkForUpdates(silent = false): Promise { - try { - const update = await check(); - - if (!update?.available) { - if (!silent) { - console.log('[Updater] App is up to date'); - } - return false; - } - - console.log(`[Updater] Update available: ${update.version}`); - - // In silent mode, just return that update exists (don't prompt) - if (silent && updatePromptShown) { - return true; - } - - // Prompt user to update - const confirmed = await promptForUpdate(update); - - if (confirmed) { - await installUpdate(update); - } - - updatePromptShown = true; - return true; - } catch (error) { - // Don't spam console in silent mode (startup check) - if (!silent) { - console.error('[Updater] Check failed:', error); - } - return false; - } -} - -/** - * Show update dialog to user - */ -async function promptForUpdate(update: Update): Promise { - const releaseNotes = update.body || translate('update.defaultNotes'); - - return await ask( - translate('update.versionAvailable', { version: update.version, notes: releaseNotes }), - { - title: translate('update.updateAvailable'), - kind: 'info', - okLabel: translate('update.updateNow'), - cancelLabel: translate('update.later'), - } - ); -} - -/** - * Download and install update, then relaunch app - */ -async function installUpdate(update: Update): Promise { - console.log('[Updater] Downloading and installing...'); - - // TODO: Could add progress tracking here via update.downloadAndInstall callbacks - await update.downloadAndInstall(); - - console.log('[Updater] Update installed, relaunching...'); - await relaunch(); -} - -/** - * Get current app version - */ -export async function getCurrentVersion(): Promise { - try { - const { getVersion } = await import('@tauri-apps/api/app'); - return await getVersion(); - } catch { - return 'unknown'; - } -} From cf2eafd7b3e27f046597c3717699229eaaf0f6e5 Mon Sep 17 00:00:00 2001 From: Dylan Hunt Date: Wed, 2 Dec 2026 20:23:42 +0800 Subject: [PATCH 2/5] chore: remove dead updater service and localize update fallback notes src/lib/services/updater.ts had no importers and showed raw release notes in a native dialog, bypassing the Developers filter. Drop it with its orphaned locale keys (update.versionAvailable, update.releaseNotesTitle), and route the two hardcoded English fallbacks in stores/updater.ts through the locale files. --- src/lib/locales/en.json | 3 +-- src/lib/locales/zh-CN.json | 3 +-- src/lib/locales/zh-TW.json | 3 +-- src/lib/stores/updater.ts | 5 +++-- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/lib/locales/en.json b/src/lib/locales/en.json index cd38895..01d6b91 100644 --- a/src/lib/locales/en.json +++ b/src/lib/locales/en.json @@ -650,13 +650,12 @@ "updateNow": "Update Now", "later": "Later", "defaultNotes": "Bug fixes and improvements.", - "versionAvailable": "Version {version} is available!\n\n{notes}", "title": "Version {version} is available", "currentVersion": "You have {version}", "releaseNotes": "Release notes", "viewReleaseNotes": "Release notes", "showDevChanges": "Show developer changes", - "releaseNotesTitle": "Latest Release Notes", + "notesNotBundled": "Release notes for v{version} are not included in this build.", "downloading": "Downloading...", "installing": "Installing update...", "installingSub": "The app will restart automatically", diff --git a/src/lib/locales/zh-CN.json b/src/lib/locales/zh-CN.json index f19a3e3..34563c5 100644 --- a/src/lib/locales/zh-CN.json +++ b/src/lib/locales/zh-CN.json @@ -650,13 +650,12 @@ "updateNow": "立即更新", "later": "稍后", "defaultNotes": "错误修正与改善。", - "versionAvailable": "版本 {version} 已可用!\n\n{notes}", "title": "版本 {version} 已可用", "currentVersion": "您目前是 {version}", "releaseNotes": "更新说明", "viewReleaseNotes": "更新说明", "showDevChanges": "显示开发者变更", - "releaseNotesTitle": "最新版本说明", + "notesNotBundled": "此版本未附带 v{version} 的更新说明。", "downloading": "下载中...", "installing": "正在安装更新...", "installingSub": "应用程序将自动重新启动", diff --git a/src/lib/locales/zh-TW.json b/src/lib/locales/zh-TW.json index b31972e..146b6dd 100644 --- a/src/lib/locales/zh-TW.json +++ b/src/lib/locales/zh-TW.json @@ -650,13 +650,12 @@ "updateNow": "立即更新", "later": "稍後", "defaultNotes": "錯誤修正與改善。", - "versionAvailable": "版本 {version} 已可用!\n\n{notes}", "title": "版本 {version} 已可用", "currentVersion": "您目前是 {version}", "releaseNotes": "更新說明", "viewReleaseNotes": "更新說明", "showDevChanges": "顯示開發者變更", - "releaseNotesTitle": "最新版本說明", + "notesNotBundled": "此版本未附帶 v{version} 的更新說明。", "downloading": "下載中...", "installing": "正在安裝更新...", "installingSub": "應用程式將自動重新啟動", diff --git a/src/lib/stores/updater.ts b/src/lib/stores/updater.ts index 93d8a4b..d951e04 100644 --- a/src/lib/stores/updater.ts +++ b/src/lib/stores/updater.ts @@ -10,6 +10,7 @@ */ import { writable, derived, get } from 'svelte/store'; +import { translate } from '#lib/locales/index.ts'; /** Update check state */ export type UpdateStatus = 'idle' | 'checking' | 'available' | 'downloading' | 'ready' | 'error'; @@ -82,7 +83,7 @@ export function openReleaseNotes(): void { version: s.currentVersion || s.version, releaseNotes: s.releaseNotes || - `Release notes for v${current.currentVersion || 'current'} are not bundled in this build.`, + translate('update.notesNotBundled', { version: current.currentVersion || '?' }), })); showUpdateModal.set(true); } @@ -175,7 +176,7 @@ export async function checkForUpdates(silent = false): Promise { ...s, status: 'available', version: update.version, - releaseNotes: update.body || 'Bug fixes and improvements.', + releaseNotes: update.body || translate('update.defaultNotes'), })); // In silent mode on startup, just note the update exists From 6f2ab354179323e3927be737d59e54fce0fc03d5 Mon Sep 17 00:00:00 2001 From: Dylan Hunt Date: Thu, 3 Dec 2026 09:55:34 +0800 Subject: [PATCH 3/5] test: fix vite-plugin-svelte config warnings in vitest The standalone svelte() plugin warned about the removed `hot` option and logged that no Svelte config file exists (SvelteKit 3 keeps it inline in vite.config.js). Use compilerOptions.hmr and configFile: false instead. --- vitest.config.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vitest.config.js b/vitest.config.js index 2621668..f91d463 100644 --- a/vitest.config.js +++ b/vitest.config.js @@ -6,7 +6,10 @@ import { defineConfig } from 'vitest/config'; import { svelte } from '@sveltejs/vite-plugin-svelte'; export default defineConfig({ - plugins: [svelte({ hot: false })], + // configFile: false - SvelteKit 3 keeps its config inline in vite.config.js, so there + // is no svelte.config.js for this standalone plugin to find (it logs a notice if it looks). + // compilerOptions.hmr replaces the removed `hot` plugin option. + plugins: [svelte({ configFile: false, compilerOptions: { hmr: false } })], resolve: { // Svelte 5 ships separate client/server builds selected via package export // conditions. Without forcing 'browser' here, vite-plugin-svelte compiles From db98f6fb84fdbd1e44044451f1da6b60770c0728 Mon Sep 17 00:00:00 2001 From: Dylan Hunt Date: Thu, 3 Dec 2026 13:44:49 +0800 Subject: [PATCH 4/5] chore(deps): bump cookie to 0.18.3 (GHSA-8wcq-xq25-7fhm) Lockfile-only patch bump of a transitive dependency of tauri and wry. --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 80bb2a8..e87c2c7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -948,9 +948,9 @@ dependencies = [ [[package]] name = "cookie" -version = "0.18.2" +version = "0.18.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a373e3602691c3cdea496d2f0ee5935151e6168fe87739483c463db1b2f2f87" +checksum = "d55f2d6c30eeec7d5c6f98bd4395d4abb1895629eab97ee6522d340623615f8a" dependencies = [ "time", "version_check", From c6e06046c393c195f677d1fc7daf6f14e6cc6963 Mon Sep 17 00:00:00 2001 From: Dylan Hunt Date: Thu, 3 Dec 2026 13:50:49 +0800 Subject: [PATCH 5/5] chore: regenerate attribution for cookie 0.18.3 Also document in CLAUDE.md that lockfile changes need the regenerated attribution committed in the same PR, and the generator's side effects. --- CLAUDE.md | 2 +- src-tauri/licenses/THIRD-PARTY-NOTICES.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 9a3bb0c..12cc8bb 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -389,7 +389,7 @@ buttons). Add an entry whenever you work around a bug you do not own. - When updating `env.yaml`, also update `env.yaml.template` - Safetensors only for Candle models (no GGUF, no PyTorch .bin) - All user-facing strings must be localized. When adding or changing any string, update all three of `src/lib/locales/en.json`, `src/lib/locales/zh-TW.json` and `src/lib/locales/zh-CN.json` (a vitest parity test fails on key drift). Use `t('key')` in templates and `translate('key')` in JS. -- **When adding a new Rust dependency** (`cargo add`), check its license against `src-tauri/about.toml`'s `accepted` allowlist (the copyleft guard - `cargo about generate` fails the build if a shipped crate's license isn't listed). If the license is already accepted (MIT, Apache-2.0, BSD, MIT-0, CC0-1.0, etc.), no action needed - attribution text itself is auto-generated from `Cargo.lock` at release time (`bun run licenses:generate`), never hand-written. If it's a new license not yet in the list, confirm it's permissive/notice-only (never add GPL/AGPL/LGPL) before adding it to `accepted`. New frontend (`bun add`) dependencies are covered automatically by `rollup-license-plugin` in `vite.config.js` - no manual step there either. +- **When adding a new Rust dependency** (`cargo add`), check its license against `src-tauri/about.toml`'s `accepted` allowlist (the copyleft guard - `cargo about generate` fails the build if a shipped crate's license isn't listed). If the license is already accepted (MIT, Apache-2.0, BSD, MIT-0, CC0-1.0, etc.), no action needed - attribution text itself is auto-generated from `Cargo.lock` (`bun run licenses:generate`), never hand-written. Any `Cargo.lock` change that alters a shipped crate's name, version or license (even a patch bump of a transitive crate) must commit the regenerated `ATTRIBUTION.md` / `src-tauri/licenses/THIRD-PARTY-NOTICES.txt` in the same PR, or the "Attribution is current" CI job fails. The generator also rebuilds the frontend (which rewrites the tracked `static/index.html` - restore it) and writes `licenses.generated.json` into a sibling `echophrase-www` checkout when one exists. If it's a new license not yet in the list, confirm it's permissive/notice-only (never add GPL/AGPL/LGPL) before adding it to `accepted`. New frontend (`bun add`) dependencies are covered automatically by `rollup-license-plugin` in `vite.config.js` - no manual step there either. ### Backend Architecture Principles - **Traits for swappable systems**: VAD, transcription, GPU providers use trait interfaces diff --git a/src-tauri/licenses/THIRD-PARTY-NOTICES.txt b/src-tauri/licenses/THIRD-PARTY-NOTICES.txt index be9f1ba..8f5bb05 100644 --- a/src-tauri/licenses/THIRD-PARTY-NOTICES.txt +++ b/src-tauri/licenses/THIRD-PARTY-NOTICES.txt @@ -1513,7 +1513,7 @@ limitations under the License. ============================================================================== Apache License 2.0 (Apache-2.0) -Used by: cookie 0.18.2 +Used by: cookie 0.18.3 ------------------------------------------------------------------------------ Apache License Version 2.0, January 2004