mirror of
https://github.com/NeuralNomadsAI/CodeNomad.git
synced 2026-11-17 05:49:28 +00:00
2 commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
547398c482
|
build(tauri): update to Tauri 2.12 and keep its crates current (#1320)
## Summary Updates the Tauri desktop host from 2.10 to the current 2.12 release. The crate family (tauri, tauri-build, tauri-runtime-wry, wry, tao and the plugins) and `@tauri-apps/*` are aligned; the exact versions are in `packages/tauri-app/Cargo.toml`, `Cargo.lock` and the `package.json` files. `Cargo.toml` minimums now equal the qualified versions. Crates that follow the updated family also move: webview2-com (was pinned exactly) and windows-core with Wry, rfd with the dialog plugin. A Dependabot `cargo` entry for `/packages/tauri-app` now proposes Tauri crate updates weekly against `dev`. It allows `tauri`, `tauri-build`, `tauri-plugin-*`, `tauri-runtime*` (including the refcount test fixture's direct requirements) and `wry` (lock-only); minor and patch updates arrive grouped, each major separately. Tao is excluded, because it is vendored and patched. A new check fails a PR whose lock no longer resolves a vendored copy, so an update can't silently drop the local fixes. ## Changes that apply - **tauri-macros 2.7, second hidden macro per command:** `client_state.rs` re-exports commands explicitly and now also re-exports the new names. - **Tao 0.37, logout exit:** Tao calls `std::process::exit(0)` when its hidden window receives `WM_ENDSESSION`. Windows can deliver it there before our window, which would skip the logout flush. Session-end handling moved to `windows_session_end.rs` and is installed on Tao's hidden window too, so client state is flushed and the backend stopped before Tao exits. - **Tauri 2.12.2, macOS restart through `open -n`:** that path drops the environment, so a launch pinned with `CODENOMAD_PROFILE` or `CLI_CONFIG` would restart in another profile after a developer-mode, profile or update restart. The macOS restart now launches the bundle's executable directly at the same point (`macos_relaunch.rs`), keeping the environment. Like Tauri's own fallback, it takes the executable name from `Info.plist` (`CFBundleExecutable`), so an update that renames the executable still restarts. It uses the current binary outside a bundle or when that value is missing or unsafe. - **Tao 0.36, IME rewrite:** the IME scenario of the input-deadlock regression no longer applies and is removed. - **Tauri 2.11, macOS renderer termination:** when the app registers no `on_web_content_process_terminate` hook, as here, the runtime reloads a crashed macOS renderer itself. The reload goes through the page-load path, which resets the badge count; `NOTIFICATION_BADGES.md` and `notification_badge_lifetime.rs` describe this. The notification plugin's Windows permission fix needs no change here. The other 2.11–2.12 changes (ACL and scope fixes, `on_new_window` threading, window creation from other threads, asset protocol, updater `allowDowngrades` and stricter signature checks, fs plugin fixes) were checked and don't affect this code. ## Vendored crates - **tao:** the upstream releases now include the input-deadlock fix (tao#1215) and the macOS zoom fix (tao#1182), so those backports are gone. The Windows runner refcount correction is still needed (tauri#15408 open, tao#1290/#1334 declined), so it is re-applied to the new Tao with its SHA-256 and patch. Its negative control still crashes; the corrected build passes 5/5. - **tauri-plugin-updater:** the new release still releases client state before `ShellExecuteW`, so the success-only handoff is re-applied. Cargo can't test a patched crate with dev-dependencies, so CI's `cargo test -p tauri-plugin-updater` step is replaced by `scripts/test-tauri-updater-handoff.mjs`, which tests a temporary copy with the crate's own lockfile. - `packages/tauri-app/scripts/vendored-patches.test.mjs` (CI Linux job) fails when `Cargo.lock` no longer resolves a vendored copy. The regression scripts read the vendored Tao version from `cargo metadata`. The input-deadlock and macOS window negative controls pin the last unfixed Tao; the runner-refcount negative control reverts the counter in a temporary copy of the vendored Tao. ## Docs `dev-docs/RUNTIME_MAINTENANCE.md` (Dependabot for the Tauri crates, re-qualifying vendored crates, system-managed WebView2/WKWebView/WebKitGTK, `@tauri-apps/*` kept on the crates' minor), `TAURI_UPDATER.md`, `DESKTOP_DATA_PROFILES.md`, `NOTIFICATION_BADGES.md` and `vendor/README.md`. `docs/help` is unchanged; nothing user-facing changes. ## Validation - **Windows:** - `cargo check --workspace --all-targets`, and `cargo test --locked -- --test-threads=1` in `src-tauri`: 313 pass, including the CLI-signed updater download and tamper rejection. - Input deadlock: 4/4 reproduced on the old Tao, 4/4 pass on the new one. Refcount: reproduced, then 5/5 pass. Updater handoff and zoom (17/17) pass. - Packaging invariants 27/27; UI and root typechecks clean. - The release `npm run build` produces the NSIS installer, and `smoke:resources` passes. - Hidden smoke: the release executable ran on a separate, never-shown desktop with its own profile. It reached ready, and a simulated logout flushed client state, stopped the backend and exited 0. - **Ubuntu 24.04 VM:** `cargo test` 303 pass. The CI-style AppImage launches, renders the UI, and on close stops the backend and unmounts cleanly. - **macOS Intel VM:** `cargo test` 302 pass, including the `Info.plist` relaunch resolution tests; the window regression and its negative control pass. - **Not run end to end:** a real Windows logout, a signed-installer update, and a packaged macOS restart (the restart is unit-tested). Apple Silicon is covered by CI only. |
||
|
|
46a4ea0a85
|
fix(tauri): prevent macOS startup window event feedback (#821)
Backport the exact read-only macOS maximize getter from Tao #1182 into the existing 0.34.6 vendor override, preserving the Windows input backport. The original borderless getter changed AppKit style masks and generated geometry events whose persistence capture called the getter again, starving startup independently of OpenCode readiness. Window chrome, persistence policy and shared OpenCode lifecycle remain unchanged. Add a bounded native AppKit regression with isolated original-crate negative-control artifacts, repeated warm-cache runs, getter-phase capture evidence, maximize/restore and fixed-size/decorated cases. Reject unrelated watchdog timeouts and validate runner results with platform-independent tests. Run the native regression in macOS ARM64 CI. Validation includes the macOS Intel VM reproduction and rebuilt Tauri startup, second-window quit/relaunch with isolated OpenCode 2.0.21, 181 macOS and 188 Windows Tauri tests, Windows input negative controls, 44 targeted Electron regressions, successful ARM64 CI tests and a published ARM64 test artifact. Both independent gatekeeper findings were fixed and re-reviewed to zero findings. All test jobs passed; remaining platform builds were still running at the explicitly requested admin merge. Fixes #819. |