Preserve Windows GPU runtime on uninstall + fix install log z-index#23
Merged
cryptopoly merged 2 commits intomainfrom May 1, 2026
Merged
Preserve Windows GPU runtime on uninstall + fix install log z-index#23cryptopoly merged 2 commits intomainfrom
cryptopoly merged 2 commits intomainfrom
Conversation
The Tauri 2 NSIS installer is configured with a custom installer hook
file at src-tauri/installer.nsh. The hook intentionally ships as
empty stubs that document the contract the GPU runtime depends on:
%LOCALAPPDATA%\ChaosEngineAI\extras\cp{major}{minor}\site-packages
This directory holds the GPU bundle (torch + diffusers + transformers,
~2.5 GB) that the Image Studio install button writes via pip. Tauri's
default uninstaller leaves the path alone today, but the explicit hook
file makes that intent visible — anyone adding RM logic in the future
gets the comment block as a guardrail.
Changes:
- Add src-tauri/installer.nsh with documented empty pre/post
install + uninstall hooks. NSIS_HOOK_POSTUNINSTALL carries the
preserve-extras contract in a comment so the rule can't drift.
- Wire the hook into src-tauri/tauri.conf.json via
bundle.windows.nsis.installerHooks: ./installer.nsh.
- Add a comment block in src-tauri/src/lib.rs::chaosengine_extras_root
pointing at the NSIS hook so a Rust-side path move doesn't silently
break the Windows-side contract.
- Add tests/test_extras_path.py pinning the
ChaosEngineAI/extras/cp{maj}{min}/site-packages shape so any
future move loud-fails the suite. The Python ABI tag pin matches
sys.version_info against the resolved path.
Surfaced by the v0.7.2 smoke test on Windows: the user reported the
GPU runtime had been wiped after an uninstall + reinstall cycle. The
default uninstaller path doesn't touch the extras tree on the bench
config we ship, but pinning the contract via these hooks + tests
makes the regression visible if anyone adds custom uninstall logic
later.
Tests:
- .venv/bin/python -m pytest tests/test_extras_path.py -v — 3/3 pass
- Pre-existing tests still pass
The Image Studio and Video Studio layouts render the InstallLogPanel inside the runtime callout, which sits above the Prompt and Recent Outputs cards in source order. Without an explicit stacking context the streaming log panel is layered BEHIND those sibling cards on Windows during a long GPU bundle install — the log keeps accumulating output but the user cannot see it past the first few visible lines. Add 'position: relative' + 'z-index: 5' to '.install-log-panel'. That is enough to win against the surrounding '.panel' cards (which set no z-index of their own) without fighting the tooltip / modal portals that live at higher z-index tiers. Surfaced by the v0.7.2 smoke test on Windows / RTX 4090: the install log was hidden behind the Prompt + Recent Outputs section on Image Studio while the user waited on the ~2.5 GB GPU bundle install.
This was referenced May 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two smaller smoke-test follow-ups for v0.7.2:
%LOCALAPPDATA%\ChaosEngineAI\extras\cp{maj}{min}\site-packagesMUST survive uninstall + reinstall. Default Tauri NSIS doesn't touch it today, but the hook makes the intent visible so future custom uninstall logic can't silently break the GPU bundle.InstallLogPanelhad no stacking context, so on Windows during a long GPU bundle install the streaming pip output rendered behind the Prompt + Recent Outputs cards. Addsposition: relative; z-index: 5to.install-log-panel.Changes
src-tauri/installer.nsh(new)Documented empty pre/post install + uninstall hooks. The body of
NSIS_HOOK_POSTUNINSTALLcarries the preserve-extras contract in a comment so the rule cannot drift over time.src-tauri/tauri.conf.jsonWires the hook file via
bundle.windows.nsis.installerHooks: ./installer.nsh.src-tauri/src/lib.rsAdds a comment block on
chaosengine_extras_rootpointing at the NSIS hook so a Rust-side path move can't silently break the Windows-side contract.tests/test_extras_path.py(new)Three tests pinning the
ChaosEngineAI/extras/cp{maj}{min}/site-packagesshape — any future move loud-fails the suite. The Python ABI tag pin matchessys.version_infoagainst the resolved path so we'd notice a mismatched runtime tag immediately.src/styles.cssAdds
position: relative; z-index: 5to.install-log-panelso it wins against the surrounding.panelcards without fighting the tooltip / modal portals at higher z-index tiers.Test plan
.venv/bin/python -m pytest tests/test_extras_path.py -v— 3/3 pass.venv/bin/python -m pytest tests/test_setup_routes.py -q— pre-existing tests still pass%LOCALAPPDATA%\ChaosEngineAI\extras\cp312\site-packagesstill has the torch/diffusers/transformers wheels.Related