Skip to content

Commit 1e43660

Browse files
committed
fix(webui-tauri): re-wire shell to tools/ui after the tools/server/webui rename
Three coupled regressions surfaced when Markus hit super+A after the 2026-05-16 rebase: the Tauri shell binary was returning HTTP 500 on /index.html because tools/server/public/ had been emptied by the rebase (master's PR ggml-org#22937 moved the build sink to build/tools/ui/), and the existing config kept pointing at the old paths. Fixes in tauri.conf.json: - beforeBuildCommand now `cd ../../ui && bun run build && copy → public`. The old `cd ../webui` path no longer exists; the appended copy step keeps tools/server/public/ populated so frontendDist resolves on a fresh checkout without manual intervention. - beforeDevCommand and devUrl updated to match (and to bind 127.0.0.1 rather than localhost so the dev server doesn't accidentally land on ::1). - Window URL changed from http://localhost:5173/... → http://127.0.0.1:5173/... Sidesteps webkit2gtk's IPv6-first localhost resolution entirely. The embedded tiny-http server is already pinned IPv4 in src/lib.rs:73, so this makes both ends speak v4 explicitly and any future IPv6 squatter on 5173 can't intercept the webview. .gitignore: tools/server/public/ is now a pure build sink, and the tracked tts-default-ref.mp3 it carried was a stale duplicate of tools/ui/static/tts-default-ref.mp3 (the SvelteKit canonical static). Untracked it; the build step recopies the canonical file each time. Diagnosed and fixed jointly with snoop-kube (cloud) and inventory-dev (squatter cleanup) via /tmp/app-launch-summit.md.
1 parent 6a3c9a1 commit 1e43660

3 files changed

Lines changed: 9 additions & 4 deletions

File tree

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,11 @@
9999
/tools/ui/node_modules
100100
/tools/ui/dist
101101

102+
# Build sink for the Tauri shell — beforeBuildCommand copies
103+
# build/tools/ui/dist/* into here so frontendDist resolves. Tracked
104+
# source assets live in tools/ui/static/.
105+
/tools/server/public/
106+
102107
# Python
103108

104109
/.venv
-151 KB
Binary file not shown.

tools/server/webui-tauri/src-tauri/tauri.conf.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
"identifier": "com.heiervang.htllama.webui",
66
"build": {
77
"frontendDist": "../../public",
8-
"devUrl": "http://localhost:5173",
9-
"beforeDevCommand": "cd ../webui && bun run dev -- --host localhost",
10-
"beforeBuildCommand": "cd ../webui && bun run build"
8+
"devUrl": "http://127.0.0.1:5173",
9+
"beforeDevCommand": "cd ../../ui && bun run dev -- --host 127.0.0.1",
10+
"beforeBuildCommand": "cd ../../ui && bun run build && mkdir -p ../server/public && cp -r ../../build/tools/ui/dist/. ../server/public/"
1111
},
1212
"app": {
1313
"windows": [
1414
{
1515
"title": "ht-llama.cpp",
16-
"url": "http://localhost:5173/index.html#/",
16+
"url": "http://127.0.0.1:5173/index.html#/",
1717
"width": 1280,
1818
"height": 860,
1919
"resizable": true,

0 commit comments

Comments
 (0)