Skip to content

feat: one-line fix script reinstalls a broken desktop app - #25319

Draft
flamboh wants to merge 1 commit into
pingdotgg:mainfrom
flamboh:t3/unfuck-broken-setups
Draft

flamboh wants to merge 1 commit into
pingdotgg:mainfrom
flamboh:t3/unfuck-broken-setups

Conversation

@flamboh

@flamboh flamboh commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Note

🤖 Claude Opus 5.5 on behalf of Oliver

Problem

When a release crashes before the UI loads, like the boot-time chunk cycle fixed in #25295, the desktop app can't install the fix. Update checks keep running in the main process, but download and install wait on a click in the UI that just crashed. Today the only thing we can tell users is "go download the app again."

Fix

One line to paste in Discord or GitHub:

curl -fsSL https://t3.codes/fix.sh | sh      # macOS, Linux
irm https://t3.codes/fix.ps1 | iex           # Windows

The scripts run no T3 Code code, so they work however broken the install is. They need only curl or PowerShell and built-in OS tools. They only move forward: each run installs the newest published release, so recovery is "publish the fix, then post the line."

  • Works out the platform and channel on its own. OS and CPU architecture come from the system, with Apple silicon detected even in a Rosetta shell. Stable or nightly comes from the installed app: the .app name, the AppImage filename, the .deb version, or the Windows uninstall entry. It asks only when it can't tell (nothing installed, or both installed on macOS/Linux). The prompt reads from /dev/tty because curl | sh puts the script on stdin, and with no terminal it falls back to a default. T3CODE_CHANNEL and T3CODE_VERSION override.
  • Verifies every download against electron-builder's base64 SHA-512 in that channel's latest*.yml or nightly*.yml.
  • Quits only T3 Code's own processes. On macOS it asks the app to quit, then signals processes inside the .app bundle. On Linux it matches processes whose APPIMAGE points at the file. On Windows it matches processes running from the install directory.
  • Installs per platform: replaces the .app with the release .zip on macOS, reinstalls the .deb with apt or swaps the AppImage in place on Linux (found through the desktop entry the app writes, then common folders), and runs the NSIS installer with /S on Windows. Then it reopens the app. AUR installs get pointed at their AUR helper instead.
  • Data is left alone. It never touches ~/.t3.
  • The marketing site serves the scripts next to install.sh/install.ps1, so they go live with the next nightly after merge.

This is the mechanical path. It complements #25305 (npx t3@nightly unfuck, an agent-guided recovery), and the scripts end by pointing there when a reinstall doesn't help. That hint assumes #25305 lands.

Validation

  • Ran fix.sh end to end on Linux in a throwaway HOME, with a stale T3-Code-0.1.1-x86_64.AppImage recorded in the desktop entry. It downloaded 0.1.2, the checksum matched, it installed the new file next to the old one, and it removed the old one.
  • Ran the channel selection with the installers stubbed out: nothing installed and no terminal → fresh stable; both installed and no terminal → both reinstalled; T3CODE_CHANNEL=nightly → nightly only; T3CODE_VERSION → that version's channel; with a terminal, it re-asks after an invalid answer and installs the chosen channel.
  • Checked the AppImage process match against a tracked sleep with a matching APPIMAGE.
  • New .github/workflows/fix-scripts.yml runs on changes to the scripts. It installs the previous stable release on macOS, Linux AppImage, Linux deb, and Windows (PowerShell 5.1), runs the fix, and asserts the newest version is installed. That's the first real run of the macOS, deb, and Windows paths.
  • vp run check:changed passes.

Claude Opus 5.5 (Claude Code in T3 Code)

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XL 500-999 changed lines (additions + deletions). labels Oct 26, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL 500-999 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant