Handy/src-tauri
Shehab Tarek 214e22dc3d
fix: require magic string in portable marker to prevent false portable mode on scoop installs (#1126)
* fix: require magic string in portable marker to prevent false portable mode

Scoop's extras bucket extracts the NSIS installer via #/dl.7z, which can
leave a stale empty portable file next to the exe. This caused
portable::init() to falsely trigger portable mode on non-portable scoop
installs, storing data in Data/ next to the exe (wiped on each update).

Changes:
- portable.rs: only enable portable mode when marker contains
  "Handy Portable Mode"; extracted is_valid_portable_marker() with tests
- installer.nsi: write magic string when creating marker file
- installer.nsi: validate magic string in update auto-detect block
- installer.nsi: allow desktop shortcut creation from finish page
  checkbox in portable mode (was silently doing nothing)
- commands/mod.rs + lib.rs: expose is_portable() as a Tauri command
- UpdateChecker.tsx: show manual-update popup for portable installs
  instead of attempting auto-install (which would download MSI)
- en/translation.json: add i18n strings for portable update popup

Fixes #1124

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: add missing translation keys to all locales and fix prettier formatting

Add portableUpdateTitle, portableUpdateMessage, portableUpdateButton to
all 17 non-English locales (English fallback text) so check:translations
passes. Also run prettier on the PR's modified files to fix format:check.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: migrate legacy empty portable markers from v0.8.0

v0.8.0 created an empty `portable` marker file. Users who manually
update (drop new exe in place) would silently lose portable mode since
the new magic-string check rejects empty files.

Migration: if the marker exists but has invalid/empty content AND a
`Data/` directory is present, treat it as a real portable install and
rewrite the marker with the magic string. This handles the v0.8.0 →
new upgrade path without regressing the scoop false-positive fix
(scoop does not create a Data/ directory).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 08:52:33 +08:00
..
capabilities feat: add models settings page with filtering and management (#478) 2026-02-08 12:18:22 +08:00
gen/apple more wip but roughly is there 2025-08-01 14:15:02 -07:00
icons who knows 2025-05-09 16:07:36 -07:00
nsis fix: require magic string in portable marker to prevent false portable mode on scoop installs (#1126) 2026-03-26 08:52:33 +08:00
resources upgrade path from old giga-am to new (#1088) 2026-03-18 23:20:27 +08:00
src fix: require magic string in portable marker to prevent false portable mode on scoop installs (#1126) 2026-03-26 08:52:33 +08:00
swift feat: implement structured outputs for post-processing providers (#706) 2026-02-17 12:14:00 +08:00
.gitignore basic working transcription. 2025-02-03 09:26:37 -08:00
build.rs feat: add tray menu localization using system locale (#446) 2025-12-18 04:14:32 -08:00
Cargo.lock release v0.8.0 2026-03-23 08:43:26 +08:00
Cargo.toml release v0.8.0 2026-03-23 08:43:26 +08:00
Entitlements.plist working? ability to package/run on macos 2025-05-05 12:13:27 -07:00
Info.plist working? ability to package/run on macos 2025-05-05 12:13:27 -07:00
rustfmt.toml format everything (#323) 2025-11-10 11:39:14 +08:00
tauri.conf.json release v0.8.0 2026-03-23 08:43:26 +08:00