Skip to content

Commit e3d4057

Browse files
authored
fix(update): resolve Windows installer update race; drop dead pip/uv detach (#135)
* chore(docs): drop archived superpowers specs and ignore docs/archive The old design specs were moved to docs/archive/ (now gitignored). Remove the stale tracked copies under docs/superpowers/specs/ so the working tree is clean. * fix(update): wait for launcher exit in Windows installer; drop pip/uv detach The native Windows installer's Restart Manager scan raced the launching pythinker.exe teardown, finding _internal still locked and showing a spurious "could not close the program" dialog even though the update succeeded. Pass the launcher PID via /PID and wait for it to exit in InitializeSetup before the scan. Also remove the now-unreachable Windows pip/uv/pipx detached-upgrade helper: every shipped Windows install updates via the native installer, so that path only remained for source checkouts, which now run the upgrade inline like POSIX. * test(update): assert Windows upgrade never spawns a detached process Make the no-detach contract observable: fail the test if subprocess.Popen is invoked, so a regression that reintroduces the detached Windows upgrade is caught via behavior rather than internal mocks alone.
1 parent f21a84a commit e3d4057

29 files changed

Lines changed: 77 additions & 5523 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ uv.toml
1919
.idea/*
2020
.superpowers/
2121
docs/superpowers/
22+
docs/archive/
2223

2324
# Build dependencies
2425
src/pythinker_code/deps/bin

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ GitHub Releases page; `0.8.0` is the new starting line.
1515

1616
## Unreleased
1717

18+
- **Windows in-app update no longer shows a spurious "could not close the program" error.** The native installer now waits for the launching `pythinker.exe` to fully exit (its PID is passed via `/PID`) before its Restart Manager scan runs, so the scan no longer races the launcher's teardown into a false "close the program and retry" dialog. The update already succeeded in that case; now it completes cleanly without the alarming prompt.
19+
- **Simplified the Windows pip/uv/pipx update path.** Now that every shipped Windows install updates through the native installer, the Windows-only detached-spawn upgrade helper is removed; the remaining pip/uv/pipx path (a Windows source checkout, or any macOS/Linux install) runs the upgrade inline like POSIX, surfacing real command output and errors instead of a fire-and-forget process.
1820
- **Toggle auto-update from the CLI.** Running `/update` now opens a menu — *Check for updates now* (the default, so a bare `/update` + Enter still checks immediately) or *Auto-update on startup* with its current state — so the toggle is discoverable without knowing a subcommand. `/update auto on|off` still sets it directly, and `/update auto` with no value opens an interactive On/Off picker (cursor defaulted to the current setting). The same toggle appears in the interactive `/settings` panel, and `pythinker info` reports the auto-update status. All surfaces show the *effective* state — an external override (`PYTHINKER_CLI_NO_AUTO_UPDATE` or a source checkout) is surfaced as the reason, renders the `/settings` row read-only, and makes `/update auto` report the read-only state rather than popping a no-op picker, so the toggle is never a silent no-op.
1921

2022
## 0.43.0 (2026-06-13)

docs/superpowers/specs/2026-05-05-openai-codex-auth-design.md

Lines changed: 0 additions & 206 deletions
This file was deleted.

0 commit comments

Comments
 (0)