Commit Graph

12 Commits

Author SHA1 Message Date
程序员阿江(Relakkes) 44137ccb91 fix(desktop): stop built-in updates from tripping the installer legacy-data guard #1160
The NSIS installer spawned by quitAndInstall() inherits the app process
environment, including the app-managed CLAUDE_CONFIG_DIR /
CC_HAHA_APP_PORTABLE_DIR pair that applyStartupPortableMode() derives
from app-mode.json. The installer's recovery helper then re-validated
that snapshot against the persisted mode it reads via its own APPDATA
and blocked the whole upgrade on any disagreement (mode switched without
a restart, APPDATA differing from the app's known-folder view), even
though an active data directory outside every install directory cannot
be touched by removing the old version. Manually launched setups never
saw the variables, which is why they kept working.

- clear the app-managed portable env before handing off to the spawned
  installer (shared with the existing app.relaunch() cleanup), so
  built-in updates present the same clean environment as a manual setup
- downgrade the recovery helper's managed-mode consistency check from
  fail-closed to treating the directory as externally managed; the
  install-contained legacy data guard below it still refuses unsafe
  removals, and matching persisted modes behave exactly as before
2026-08-01 01:35:50 +08:00
程序员阿江(Relakkes) 100a2b25b8 fix(release): remove environment-dependent alias fixture 2026-07-18 20:25:42 +08:00
程序员阿江(Relakkes) f8cccb096f fix(release): stabilize Windows recovery self-test 2026-07-18 20:20:34 +08:00
程序员阿江(Relakkes) c48171e2f0 fix(desktop): harden Windows upgrades (#1028, #1029, #1036) 2026-07-17 23:38:59 +08:00
程序员阿江(Relakkes) d587ddbb19 fix(desktop): filter empty installer paths 2026-07-14 05:15:30 +08:00
程序员阿江(Relakkes) 73a4aef95f fix(desktop): skip empty shared install scans 2026-07-14 05:06:30 +08:00
程序员阿江(Relakkes) 5dcf9b80d4 fix(desktop): accept missing shared install paths 2026-07-14 04:58:43 +08:00
程序员阿江(Relakkes) 835213da53 fix(desktop): avoid full install scan on user upgrades 2026-07-14 04:42:14 +08:00
程序员阿江(Relakkes) 406f603015 fix(desktop): skip legacy recovery on fresh install 2026-07-14 04:31:01 +08:00
程序员阿江(Relakkes) ecb66bfdd5 fix(desktop): unblock Windows installer upgrades #1000 2026-07-14 03:16:12 +08:00
程序员阿江(Relakkes) 347dbc3368 fix(desktop): preserve Windows data directories #959 #973 #1000 2026-07-11 21:09:19 +08:00
程序员阿江(Relakkes) 85cf04e305 fix(desktop): make macOS signing+notarization explicit and Windows signing optional
- mac.notarize=true + hardenedRuntime + entitlements so a signed CI release
  actually notarizes (gatekeeper smoke + Squirrel.Mac auto-update need it)
- entitlements grant disable-library-validation for the Bun sidecar/node-pty
- local unsigned build passes -c.mac.notarize=false so electron:package still
  works without an Apple account
- release signing-preflight now hard-requires only the Apple secrets; Windows
  cert is optional (unsigned NSIS still auto-updates, just SmartScreen warning)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-03 14:17:13 +08:00