fix: reliable Stop, snappier console, consistent naming - #2
Merged
Conversation
…ming - Stop reaps the whole process tree via a kill-on-close Windows job object, catching grandchildren (winget/DISM/msiexec) even if they escape the direct tree; supervise_run never blocks on reader join, so optimizer:done always fires and the UI can't stay stuck in 'Running'. - Console renders only the last 300 lines instead of up to 4000 per flush. - Context-menu toggle now reads real registry state (Get-ContextMenuState). - run_capture output drain gets a grace period so cached listings can't hang. - Locked/access-denied temp folders run the sweep instead of 'already empty'. - Win11 ISO image info extraction errors gracefully instead of crashing. - Rename remaining 'PC Optimizer'/pc-optimizer refs to Win-Optimizer-Pro. - Bundle portable zip target; profile export supports OpenSSH (-Ssh).
Closed
karan5028ji
added a commit
that referenced
this pull request
Aug 13, 2026
fix: PR #2 build-breaking bugs - zip target, JobObjects import, no taskkill on drop
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.
What & why
Two user-reported issues plus housekeeping:
Stop button "does nothing" / app stuck in Running
supervise_runcould block forever onthread.join()when a grandchild(winget's msiexec installer, DISM, etc.) inherited the stdout pipe and
outlived the parent.
optimizer:donenever fired, so the UI stayed stuckin "Running" and Stop became a no-op.
the job, killing the whole tree including escaped installers.
supervise_runnever blocks on reader join — it always emits done afterthe drain grace.
Start-Processpanels/Explorerrestarts survive the run.
taskkill /T /Fkept as fallback when job creation/assignment fails.App feels too slow
Console re-rendered up to 4000 joined log lines on every ~80ms flush.
Consistency: all remaining "PC Optimizer"/
pc-optimizerreferencesrenamed to Win-Optimizer-Pro (title, package-lock, headers, restore-point
description, debug env var).
Plus earlier fixes folded in: context-menu toggle reads real state, cached
listings can't hang (drain grace), locked temp folders are swept instead of
"already empty", Win11 ISO edition error handling, portable zip bundle target,
SSH flag for profile export.
Verification
Parser::ParseFile).backend.jspassesnode --check.cargo checkandnpm run buildcould notrun (no Rust toolchain / no
node_modules). The job-object code followswindows-sys 0.59 signatures; please build before merging.