The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.
TypeScript agentai-chatai-studioall-in-onecoding-agentdesktop-appfluximage-generationlinuxllmlocal-ailocal-llmopen-sourceprivacyself-hostedstable-diffusionuncensoreduncensored-aivideo-generationwindows
hotfix v2.4.5 follow-up: Bug D unit tests + Bug B/C live E2E documented
purple60a3c1b95336
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex e8ef4f6a..6ea083a9 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -21,13 +21,16 @@ Drop-in hotfix on top of v2.4.4. Four user-reported bugs and two carry-forward d- **Arch / Wayland AppImage now actually paints content** (Bug D — emilmjt Discord 11.05.). The "empty window" symptom on Arch is Tauri 2 + webkit2gtk-4.1 silently failing on DMABUF buffer-sharing and DMA-compositing paths on certain Mesa versions (tauri-apps/tauri#9304). `src-tauri/src/main.rs` now sets `WEBKIT_DISABLE_DMABUF_RENDERER=1` and `WEBKIT_DISABLE_COMPOSITING_MODE=1` at startup on Linux, falling back to software composite — same workaround the GNOME and KDE maintainers recommend. Only set when the user hasn't already exported the vars themselves. `tauri.conf.json` also now declares explicit `bundle.linux.deb.depends` and `bundle.linux.rpm.depends` for `webkit2gtk-4.1`, `gtk3`, and `libayatana-appindicator3-1`, and enables `bundleMediaFramework` on AppImage so gstreamer plugins ship inside the AppImage instead of relying on the host distribution.### Tests-- `vitest`: +7 new tests for `parseOllamaError` missing-blob coverage in `src/lib/__tests__/ollama-errors.test.ts` (Anson192 verbatim error, generic no-fallback-model, forward+back-slash tolerance, Rust-proxy wrapping, chat-style message wording with + without model).+- `vitest`: 2271 passed (93 files) — +7 new tests for `parseOllamaError` missing-blob coverage in `src/lib/__tests__/ollama-errors.test.ts` (Anson192 verbatim error, generic no-fallback-model, forward+back-slash tolerance, Rust-proxy wrapping, chat-style message wording with + without model), +1 smoke test for the new `videohelpersuite` `CUSTOM_NODE_REGISTRY` entry in `src/api/__tests__/comfyui-bundles.test.ts`.+- `cargo test --release`: 57 passed — +5 new tests in `src-tauri/src/main.rs::tests` for the Bug D Linux webkit workaround function (`webkit_workaround_sets_both_vars_when_unset`, `preserves_user_dmabuf_override`, `preserves_user_compositing_override`, `preserves_empty_string_as_explicit_unset`, `is_idempotent`). Tests serialize via `ENV_MUTEX` since env vars are process-global.- `cargo check --release`: clean (1 dead-code warning on unused `save_binary_file_dialog`, pre-existing).- `tsc --noEmit`: clean.-### Verification-- Live E2E on Windows 10 + RTX 3060 Ti via Computer-Use: Bug A (modal triggers correctly when `VHS_VideoCombine` is removed, install path completes + restarts ComfyUI + produces MP4), Bug B (kill-after-60s flow stops a stuck ComfyUI cleanly), Bug C (missing-blob banner appears + `ollama pull` repairs).-- Bug D verification pending Arch VirtualBox VM (no Linux box on dev machine) — env-var workaround is the documented upstream-recommended fix for the symptom class.+### Verification — HARDCORE LIVE E2E (Windows 10 + RTX 3060 Ti + ComfyUI 0.12.0 via Computer-Use)+- **Bug A**: Modal "Install MP4 support?" appears on Generate when `VHS_VideoCombine` missing. **Full install path live-verified** end-to-end: git clone of Kosinkadink/ComfyUI-VideoHelperSuite into `custom_nodes/`, pip install (opencv-python + imageio-ffmpeg), ComfyUI stop+start, reconnect-poll, workflow rebuild, actual Wan-video sampling phase started ("Loading text encoder... 2s"). Cancel path also verified (modal closes cleanly, returns to "Ready to generate").+- **Bug B**: Suspended ComfyUI via `NtSuspendProcess` while user navigates back to Create tab → triggers `useEffect` re-mount, `pollStatus` re-starts, detects ComfyUI down. Live-verified entire UI sequence: (1) "ComfyUI loading (12s)" elapsed-counter banner, (2) switch to actionable "ComfyUI is taking unusually long (86s)" panel after 60s threshold, (3) failure-mode explanation text rendered, (4) "View logs" toggle works (button label flips to "Hide logs"), (5) empty-logs fallback message renders ("No startup logs captured yet — ComfyUI hasn't emitted anything to stdout."), (6) "Kill process" button actually kills the spawned ComfyUI process (verified via PID gone + port 8188 free), (7) state machine transitions cleanly to "ComfyUI not responding" with Retry, (8) Retry click respawns ComfyUI which comes back online.+- **Bug C**: Disabled the qwen2.5:0.5b blob (`sha256-c5396e...`) → triggered LU's startup health scan → banner "Ollama 0.20.7 broke 1 of your model. qwen2.5:0.5b" appeared + inline "stale — refresh? ↻ Refresh" chip next to Lichtschalter. Clicked "Refresh all" → `pullModel` triggered → DownloadBadge showed completion within seconds. Note: Ollama 0.20.7 transforms ALL blob errors (missing OR 0-byte corrupted) into the `"X does not support generate"` pattern, so the new `missing-blob` regex primarily protects users on older Ollama versions (Anson192's exact scenario on RTX 4090). Both error paths route to the same one-click repair UX.+- **Bug D**: Linux webkit env-var function unit-tested cross-platform via 5 cargo tests (sets-both-when-unset, preserves user DMABUF override, preserves user COMPOSITING override, preserves empty-string as explicit unset, idempotent). Arch VirtualBox boot test deferred — env-var workaround is the documented upstream-recommended fix for the symptom class.## [2.4.4] - 2026-05-11diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rsindex 945bd0c5..290b5a62 100644--- a/src-tauri/src/main.rs+++ b/src-tauri/src/main.rs@@ -13,26 +13,32 @@ use tauri::{image::Image,};+/// Bug D (v2.4.5 — emilmjt Discord 2026-05-11): on Arch Linux + Wayland+/// and on a handful of Mesa versions, Tauri 2's webkit2gtk-4.1 webview+/// initialises with DMABUF buffer-sharing or DMA-compositing enabled+/// and the GPU path silently fails — the window opens but the page+/// never paints, so the user sees an empty rectangle. Disabling those+/// two paths forces webkit back onto the slower-but-reliable software+/// composite, which is the same workaround the GNOME, KDE, and Tauri+/// upstream maintainers recommend (tauri-apps/tauri#9304, GNOME+/// GitLab #1731). Only applied when the user hasn't already set the+/// vars themselves — power users with a working DMABUF setup keep it.+///+/// Extracted to a module-level function (not `#[cfg(target_os = "linux")]`)+/// so the no-overwrite logic is unit-testable cross-platform — see+/// `tests::webkit_workaround_*` below.+fn apply_linux_webkit_workarounds() {+ if std::env::var_os("WEBKIT_DISABLE_DMABUF_RENDERER").is_none() {+ std::env::set_var("WEBKIT_DISABLE_DMABUF_RENDERER", "1");+ }+ if std::env::var_os("WEBKIT_DISABLE_COMPOSITING_MODE").is_none() {+ std::env::set_var("WEBKIT_DISABLE_COMPOSITING_MODE", "1");+ }+}+fn main() {- // Bug D (v2.4.5 — emilmjt Discord 2026-05-11): on Arch Linux + Wayland- // and on a handful of Mesa versions, Tauri 2's webkit2gtk-4.1 webview- // initialises with DMABUF buffer-sharing or DMA-compositing enabled- // and the GPU path silently fails — the window opens but the page- // never paints, so the user sees an empty rectangle. Disabling those- // two paths forces webkit back onto the slower-but-reliable software- // composite, which is the same workaround the GNOME, KDE, and Tauri- // upstream maintainers recommend (tauri-apps/tauri#9304, GNOME- // GitLab #1731). Only applied when the user hasn't already set the- // vars themselves — power users with a working DMABUF setup keep it.#[cfg(target_os = "linux")]- {- if std::env::var_os("WEBKIT_DISABLE_DMABUF_RENDERER").is_none() {- std::env::set_var("WEBKIT_DISABLE_DMABUF_RENDERER", "1");- }- if std::env::var_os("WEBKIT_DISABLE_COMPOSITING_MODE").is_none() {- std::env::set_var("WEBKIT_DISABLE_COMPOSITING_MODE", "1");- }- }+ apply_linux_webkit_workarounds();let app_state = AppState::new();@@ -238,3 +244,88 @@ fn main() {.run(tauri::generate_context!()).expect("error while running tauri application");}++#[cfg(test)]+mod tests {+ use std::sync::Mutex;++ // env vars are process-global; serialize these tests so they don't+ // stomp each other when cargo runs them in parallel.+ static ENV_MUTEX: Mutex<()> = Mutex::new(());++ const DMABUF: &str = "WEBKIT_DISABLE_DMABUF_RENDERER";+ const COMPOSITING: &str = "WEBKIT_DISABLE_COMPOSITING_MODE";++ fn cleanup() {+ std::env::remove_var(DMABUF);+ std::env::remove_var(COMPOSITING);+ }++ #[test]+ fn webkit_workaround_sets_both_vars_when_unset() {+ let _g = ENV_MUTEX.lock().unwrap_or_else(|p| p.into_inner());+ cleanup();+ super::apply_linux_webkit_workarounds();+ assert_eq!(std::env::var(DMABUF).ok().as_deref(), Some("1"));+ assert_eq!(std::env::var(COMPOSITING).ok().as_deref(), Some("1"));+ cleanup();+ }++ #[test]+ fn webkit_workaround_preserves_user_dmabuf_override() {+ // User explicitly disabled the workaround — e.g. their Mesa is fine+ // and they want full GPU compositing. We must NOT clobber.+ let _g = ENV_MUTEX.lock().unwrap_or_else(|p| p.into_inner());+ cleanup();+ std::env::set_var(DMABUF, "0");+ super::apply_linux_webkit_workarounds();+ assert_eq!(std::env::var(DMABUF).ok().as_deref(), Some("0"), "user-set DMABUF should be preserved");+ assert_eq!(std::env::var(COMPOSITING).ok().as_deref(), Some("1"), "unset COMPOSITING should still be applied");+ cleanup();+ }++ #[test]+ fn webkit_workaround_preserves_user_compositing_override() {+ let _g = ENV_MUTEX.lock().unwrap_or_else(|p| p.into_inner());+ cleanup();+ std::env::set_var(COMPOSITING, "custom-value");+ super::apply_linux_webkit_workarounds();+ assert_eq!(std::env::var(DMABUF).ok().as_deref(), Some("1"), "unset DMABUF should still be applied");+ assert_eq!(std::env::var(COMPOSITING).ok().as_deref(), Some("custom-value"), "user-set COMPOSITING should be preserved");+ cleanup();+ }++ #[test]+ fn webkit_workaround_preserves_empty_string_as_explicit_unset() {+ // Edge case: empty value still counts as "set" via var_os().is_some(),+ // so we don't overwrite. Some shells/wrappers use "" to mean "unset+ // me explicitly" — respect that intent.+ let _g = ENV_MUTEX.lock().unwrap_or_else(|p| p.into_inner());+ cleanup();+ std::env::set_var(DMABUF, "");+ std::env::set_var(COMPOSITING, "");+ super::apply_linux_webkit_workarounds();+ assert_eq!(std::env::var(DMABUF).ok().as_deref(), Some(""));+ assert_eq!(std::env::var(COMPOSITING).ok().as_deref(), Some(""));+ cleanup();+ }++ #[test]+ fn webkit_workaround_is_idempotent() {+ // Calling twice should not change anything after the first call.+ let _g = ENV_MUTEX.lock().unwrap_or_else(|p| p.into_inner());+ cleanup();+ super::apply_linux_webkit_workarounds();+ let after_first = (+ std::env::var(DMABUF).ok(),+ std::env::var(COMPOSITING).ok(),+ );+ super::apply_linux_webkit_workarounds();+ let after_second = (+ std::env::var(DMABUF).ok(),+ std::env::var(COMPOSITING).ok(),+ );+ assert_eq!(after_first, after_second, "second call should be a no-op");+ cleanup();+ }+}