Skip to content

fix: reliable Stop, snappier console, consistent naming - #2

Merged
karan5028ji merged 2 commits into
mainfrom
fix/stop-speed-and-naming
Aug 13, 2026
Merged

fix: reliable Stop, snappier console, consistent naming#2
karan5028ji merged 2 commits into
mainfrom
fix/stop-speed-and-naming

Conversation

@karan5028ji

Copy link
Copy Markdown
Owner

What & why

Two user-reported issues plus housekeeping:

  1. Stop button "does nothing" / app stuck in Running
    supervise_run could block forever on thread.join() when a grandchild
    (winget's msiexec installer, DISM, etc.) inherited the stdout pipe and
    outlived the parent. optimizer:done never fired, so the UI stayed stuck
    in "Running" and Stop became a no-op.

    • Every run now lives in a kill-on-close Windows Job Object; Stop closes
      the job, killing the whole tree including escaped installers.
    • supervise_run never blocks on reader join — it always emits done after
      the drain grace.
    • Job is detached on natural completion so Start-Process panels/Explorer
      restarts survive the run.
    • taskkill /T /F kept as fallback when job creation/assignment fails.
  2. App feels too slow
    Console re-rendered up to 4000 joined log lines on every ~80ms flush.

    • Console now renders only the last 300 lines.
  3. Consistency: all remaining "PC Optimizer"/pc-optimizer references
    renamed 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

  • All three PowerShell modules parse clean (Parser::ParseFile).
  • backend.js passes node --check.
  • Not verified on this machine: cargo check and npm run build could not
    run (no Rust toolchain / no node_modules). The job-object code follows
    windows-sys 0.59 signatures; please build before merging.

…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).
@karan5028ji karan5028ji mentioned this pull request Aug 13, 2026
@karan5028ji
karan5028ji merged commit bc37537 into main Aug 13, 2026
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
@karan5028ji
karan5028ji deleted the fix/stop-speed-and-naming branch August 13, 2026 10:03
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