Skip to content

Preserve Windows GPU runtime on uninstall + fix install log z-index#23

Merged
cryptopoly merged 2 commits intomainfrom
fix/preserve-gpu-runtime-zindex
May 1, 2026
Merged

Preserve Windows GPU runtime on uninstall + fix install log z-index#23
cryptopoly merged 2 commits intomainfrom
fix/preserve-gpu-runtime-zindex

Conversation

@cryptopoly
Copy link
Copy Markdown
Owner

Summary

Two smaller smoke-test follow-ups for v0.7.2:

  • Feature/video gen #3 GPU runtime wiped on uninstall — adds an explicit Tauri 2 NSIS hook file that documents the contract: %LOCALAPPDATA%\ChaosEngineAI\extras\cp{maj}{min}\site-packages MUST 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.
  • Feature/video gen #4 Install log hidden behind cards — the InstallLogPanel had no stacking context, so on Windows during a long GPU bundle install the streaming pip output rendered behind the Prompt + Recent Outputs cards. Adds position: relative; z-index: 5 to .install-log-panel.

Changes

src-tauri/installer.nsh (new)

Documented empty pre/post install + uninstall hooks. The body of NSIS_HOOK_POSTUNINSTALL carries the preserve-extras contract in a comment so the rule cannot drift over time.

src-tauri/tauri.conf.json

Wires the hook file via bundle.windows.nsis.installerHooks: ./installer.nsh.

src-tauri/src/lib.rs

Adds a comment block on chaosengine_extras_root pointing 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-packages shape — any future move loud-fails the suite. The Python ABI tag pin matches sys.version_info against the resolved path so we'd notice a mismatched runtime tag immediately.

src/styles.css

Adds position: relative; z-index: 5 to .install-log-panel so it wins against the surrounding .panel cards 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
  • Manual verify on Windows: install v0.7.2 → install GPU runtime → uninstall → reinstall → confirm %LOCALAPPDATA%\ChaosEngineAI\extras\cp312\site-packages still has the torch/diffusers/transformers wheels.
  • Manual verify on Windows: kick off "Install GPU runtime" from Image Studio → confirm streaming log panel renders in front of Prompt + Recent Outputs cards.

Related

cryptopoly added 2 commits May 1, 2026 13:13
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.
@cryptopoly cryptopoly merged commit 92e6ca9 into main May 1, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant