fix(tauri): stop stale UI assets from shadowing desktop builds (#258)
## Summary - prefer the bundled desktop UI over the downloaded cache when both report the same version, so rebuilt installers do not keep serving stale frontend assets - rebuild the server workspace during the Tauri prebuild step on every desktop package build, matching Electron's correctness boundary for fresh UI/server assets - add a regression test covering the equal-version bundled-vs-downloaded UI selection path ## Why - local desktop rebuilds should reflect the latest server and UI code without requiring users to manually clear cached assets - packaged updates should keep favoring the freshly bundled frontend when the cached copy is not actually newer ## Testing - node --import tsx --test packages/server/src/ui/__tests__/remote-ui.test.ts - npm run build:tauri
This commit is contained in:
@@ -250,7 +250,7 @@ async function pickBestLocalUi(args: {
|
||||
uiStaticDir: currentResolved,
|
||||
source: "downloaded",
|
||||
uiVersion: await readUiVersion(currentResolved),
|
||||
priority: 2,
|
||||
priority: 1,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -260,7 +260,7 @@ async function pickBestLocalUi(args: {
|
||||
uiStaticDir: bundledResolved,
|
||||
source: "bundled",
|
||||
uiVersion: await readUiVersion(bundledResolved),
|
||||
priority: 1,
|
||||
priority: 2,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user