Skip to content

feat: Add repair/reinstall capability for master Steam prefix#53

Closed
weter11 wants to merge 1 commit into
mainfrom
feat/repair-steam-prefix-grace-check
Closed

feat: Add repair/reinstall capability for master Steam prefix#53
weter11 wants to merge 1 commit into
mainfrom
feat/repair-steam-prefix-grace-check

Conversation

@weter11

@weter11 weter11 commented Jun 22, 2026

Copy link
Copy Markdown
Owner

Summary

This PR adds repair/reinstall capability for the master Windows Steam prefix, addressing the issue where corrupted Steam installs could not be recovered through the UI.

Changes

1. Repair Logic (src/launch/mod.rs)

  • Added repair_master_steam() function that:
    • Stops running Steam/wine processes in master prefix
    • Backs up existing prefix to master_steam_prefix.bak.<timestamp>
    • Keeps only 1 previous backup (deletes oldest before creating new)
    • Re-runs install_master_steam() against fresh prefix

2. UI Components (src/ui.rs)

  • Added "Repair / Reinstall Windows Steam Runtime" button in Settings
  • Shows confirmation dialog warning about Steam login state before proceeding
  • Displays progress/status updates via AsyncOp channel

3. Post-Launch Grace Period Health Check (src/infra/runners/wine_tkg.rs)

  • Added 2-second grace period after ready-signal detection
  • Polls try_wait() to verify Steam process is still alive
  • Detects false-positive scenario where ready-signal exists but process has crashed
  • Error message suggests using the repair action

4. Unit Test (src/launch/verification_tests.rs)

  • Added MockSteamFalsePositiveRunner and test for grace-check behavior

Acceptance Criteria Met

  • ✅ Repair action exists and is reachable from Settings panel with distinct label
  • ✅ Confirmation dialog warns about Steam login state before proceeding
  • ✅ Post-ready grace-check distinguishes healthy process from exited-process scenario
  • ✅ Error message suggests using the repair action
  • ✅ Existing install button behavior unchanged

- Add repair_master_steam() function that:
  - Stops running Steam/wine processes in master prefix
  - Backs up existing prefix to master_steam_prefix.bak.<timestamp>
  - Keeps only 1 previous backup (deletes oldest before creating new)
  - Re-runs install_master_steam() against fresh prefix

- Add UI components:
  - 'Repair / Reinstall Windows Steam Runtime' button in Settings
  - Confirmation dialog warning about Steam login state
  - Progress/status updates via AsyncOp channel

- Add post-launch grace period health check in WineTkgRunner:
  - 2-second grace period after ready-signal detection
  - Polls try_wait() to verify Steam process still alive
  - Detects false-positive scenario where ready-signal exists but
    process has crashed (e.g., steamerrorreporter appeared)
  - Error message suggests using repair action

- Add unit test for grace-check behavior
- Fix borrow checker issues in UI confirmation dialog
- Fix type mismatch in readiness loop (Option vs bool)

Co-authored-by: openhands <openhands@all-hands.dev>
@weter11 weter11 closed this Jun 23, 2026
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.

2 participants