Skip to content

fix(update): the stable copy updates itself, and a restart keeps its profile (#104) - #105

Merged
Maxaubert merged 1 commit into
mainfrom
fix/104-stable-copy-updates-itself
Oct 1, 2026
Merged

Maxaubert merged 1 commit into
mainfrom
fix/104-stable-copy-updates-itself

Conversation

@Maxaubert

Copy link
Copy Markdown
Owner

Closes #104.

Owner, 2026-09-30: "i click the update available icon in pt stable it updates then i reopen it and its the same icon there".

Two bugs on the update handoff (installUpdate in src/main/update.ts):

  1. The installer updates the installed app, in Programs\PrismTerminal. The stable copy is a plain copy in its own folder (tools/install-stable.ps1). It was never updated, so it kept offering the same release.
  2. The restart dropped --user-data-dir. The stable copy came back on the regular app's profile, with the regular app's tabs, instead of its own.

Fix: the PowerShell the handoff runs is now built by a pure function, src/main/updateHandoff.ts.

  • Every restart keeps the --user-data-dir it was started with.
  • Run as PrismTerminalStable.exe from outside the install folder, it goes on after the silent install. It waits for the old process to exit and mirrors the installed app into the copy's folder with robocopy /MIR. Then it renames the exe back and removes the uninstaller, exactly as install-stable.ps1 does. Finally it restarts the copy on its own profile.
  • The regular app's handoff is unchanged: install, restart, remove the temp folder.

App 0.24.2. No core change.

Verified:

  • Unit tests: 983 pass. 5 are new: they read the generated command step by step for the regular app, a named profile, the stable copy and quoting, plus isStableCopy.
  • Lint and typecheck pass.
  • The update e2e scenarios (updateNotes, updateGuard, updatePreview) pass.
  • Dry run for real: the generated stable command was run in PowerShell against a fake install in a temp folder, with hostname.exe standing in for the installer. The stale file was removed, the new exe was renamed into place, the uninstaller was dropped, the copy was restarted, and the temp folder was removed.

Note: the stable copy the owner runs today still has the OLD handoff. Its own update chip gets it right only from the next build on. It needs one refresh by hand (npm run install:stable) after this merges.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FHHaWKR4M5QtW7Wecyuk4t

…profile (#104)

The handoff relaunched the exe without --user-data-dir, and the installer only
updates the installed app. Run as PrismTerminalStable.exe, the handoff now
mirrors the fresh install into the copy's folder before restarting it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FHHaWKR4M5QtW7Wecyuk4t
@Maxaubert
Maxaubert merged commit 49a5d30 into main Oct 1, 2026
2 checks passed
@Maxaubert
Maxaubert deleted the fix/104-stable-copy-updates-itself branch October 1, 2026 07:27
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.

Updating from the stable copy updates the regular app, and the stable copy restarts on the wrong profile

1 participant