diff --git a/webui/native/dist/index.html b/webui/native/dist/index.html
index 2f173ad9a..96c2ddfad 100644
--- a/webui/native/dist/index.html
+++ b/webui/native/dist/index.html
@@ -31,20 +31,20 @@
diff --git a/webui/native/package-lock.json b/webui/native/package-lock.json
index 7287976c2..eed075683 100644
--- a/webui/native/package-lock.json
+++ b/webui/native/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "audiocpp-native-webui",
- "version": "0.1.0",
+ "version": "0.8.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "audiocpp-native-webui",
- "version": "0.1.0",
+ "version": "0.8.1",
"dependencies": {
"abcjs": "^6.7.0"
},
diff --git a/webui/native/package.json b/webui/native/package.json
index 967e48f47..3ccfe5e2a 100644
--- a/webui/native/package.json
+++ b/webui/native/package.json
@@ -1,7 +1,7 @@
{
"name": "audiocpp-native-webui",
"private": true,
- "version": "0.1.0",
+ "version": "0.8.1",
"type": "module",
"scripts": {
"dev": "vite dev",
diff --git a/webui/native/svelte.config.js b/webui/native/svelte.config.js
index a5ce70d05..d56fb91bd 100644
--- a/webui/native/svelte.config.js
+++ b/webui/native/svelte.config.js
@@ -1,5 +1,29 @@
+import { readFileSync } from 'node:fs';
+
import adapter from '@sveltejs/adapter-static';
+// SvelteKit defaults kit.version.name to Date.now() and derives the
+// __sveltekit_ global it embeds in dist/index.html from it, so two builds
+// of identical source differ. dist/index.html is committed -- it is embedded
+// into the server binary at configure time, which is what lets the project
+// build a working server without a JavaScript toolchain -- so any two branches
+// that rebuild the web UI conflict in it whether or not their source changes
+// overlap.
+//
+// Naming the version after the UI package makes the bundle a pure function of
+// the source tree. Keep webui/native/package.json's version in step with the
+// release it ships in; nothing derives it automatically, because audio.cpp's
+// own version is tag-driven (AUDIOCPP_VERSION is passed at configure time and
+// is not committed anywhere in the tree).
+//
+// Note that this is an identifier, not a live update channel: the app never
+// imports SvelteKit's `updated` store, version.pollInterval is left at its
+// default of 0, and the single-file bundle ships no _app/version.json for the
+// client to poll. A stale version here costs nothing but a stale label.
+const { version } = JSON.parse(
+ readFileSync(new URL('./package.json', import.meta.url), 'utf8')
+);
+
/** @type {import('@sveltejs/kit').Config} */
const config = {
kit: {
@@ -17,6 +41,9 @@ const config = {
},
paths: {
relative: true
+ },
+ version: {
+ name: version
}
}
};