Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
`<!-- discord: ... -->` line in the CHANGELOG section).
Expand Down
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src-tauri/licenses/THIRD-PARTY-NOTICES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions src/lib/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 1 addition & 2 deletions src/lib/locales/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "应用程序将自动重新启动",
Expand Down
3 changes: 1 addition & 2 deletions src/lib/locales/zh-TW.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "應用程式將自動重新啟動",
Expand Down
102 changes: 0 additions & 102 deletions src/lib/services/updater.ts

This file was deleted.

5 changes: 3 additions & 2 deletions src/lib/stores/updater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -175,7 +176,7 @@ export async function checkForUpdates(silent = false): Promise<boolean | null> {
...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
Expand Down
5 changes: 4 additions & 1 deletion vitest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down