Commit Graph

5 Commits (0ab3768c5a616d93b93901f2f9b1fd8c3dcea112)

Author SHA1 Message Date
mula.liu 0ab3768c5a fix(update): make the Windows handoff actually run
Reported: the 0.1.13 Windows build fails after download and restart. Two
independent defects sat on that path:

- The helper was launched as `cmd.exe /D /C "<path with spaces>" ...`.
  cmd strips the first and last quote when the command has more than one
  quoted token, so the script under `%TEMP%\Shift Updates` was never
  recognized. Shift quit and nothing installed. The script path now arrives
  in an environment variable, with the extra outer quote layer cmd needs.
- A silent install could still open the WebView2 warning. Nobody is present
  to dismiss it during an in-app update, so the installer waited forever.
  The manual warning stays; silent installs skip it.

The installer also waits briefly after taskkill before overwriting the EXE,
and the handoff logs its start and a missing target so a future failure is
visible in `%TEMP%\Shift Updates\handoff.log`.

Verified with Wine: the old command reproduces the quote-stripping failure,
the new one runs; the rebuilt installer completes silently without WebView2
and the full wait-install-relaunch handoff replaces the executable.
2026-11-20 18:29:16 +08:00
mula.liu df35111326 release: prepare Shift 0.1.8 2026-10-27 18:45:32 +08:00
mula.liu 15498482fa release: 0.1.2 — install the update in place, and lead the tab with the host
Updates now finish without leaving the app. After the SHA256 gate, macOS replaces
its own `.app` from the downloaded disk image and Windows runs the same NSIS
installer with `/S`; both from a detached helper that waits for this process to
exit and then opens the new copy.

- `update.rs`: `bundle_path` (is this a bundled run?), `can_replace` (is the
  enclosing folder writable — checked before quitting, not after), and the two
  handoff scripts. Every macOS failure path still `open`s the bundle it had, so a
  failed swap leaves Shift running rather than closed.
- `windows-installer.nsi`: `${Silent}` skips the "Shift is running, close it?"
  box, which would otherwise abort an update nobody is there to answer.
- `useUpdate.ts`: a failed install reports its own error and keeps the verified
  download, instead of downgrading a "ready" status to "error".

The Updates tab now leads with two lines above everything else: system,
architecture and running version, then the feed URL. The header no longer repeats
the version in the status row.

Verified end to end on macOS: a 0.1.1 bundle swapped by the published 0.1.2 image,
`codesign --verify --deep --strict` clean afterwards, image detached, and the
busy-image path shown to reopen the old copy.

Gates: cargo fmt --check clean, `cargo test --lib` 146 passed / 2 ignored,
`pnpm check` clean, `pnpm test` 34 passed, `pnpm build` ok.
2026-10-26 03:41:47 +08:00
mula.liu b732b91ea6 release: 0.1.1 — update channel, settings/UI trims, macOS + Windows x64 only
Update path
- `src-tauri/src/update.rs`: manifest fetch, semver compare, optional ed25519
  signature check against a key baked in at build time, then a size + SHA256
  gate before an installer can run. `UpdateStatus` now reports the artifact key
  it resolved so the UI can name what it will install.
- Settings → Updates panel shows the feed, the check/download state machine, and
  the local OS, architecture and release artifact for this machine.
- `scripts/publish-release.sh` + `scripts/release-key.py` publish installers and a
  signed `shift-update.json` onto an orphan `releases` branch.

Scope trims requested for this release
- Settings: the Radial rings tab is gone, so ring orders are read from
  `settings.json` with no in-app editor for now.
- Main window: the update entry in the header bar is gone; updates live in
  Settings → Updates only.
- Release targets are macOS universal and Windows x64. ARM64 and Linux stay
  buildable and are no longer published; `docs/RELEASE.md` records the decision.

Gates: cargo fmt --check clean, `cargo test --lib` 142 passed / 2 ignored,
`pnpm check` clean, `pnpm test` 34 passed, `pnpm build` ok.
2026-10-26 03:06:46 +08:00
mula.liu c6eff4e131 修复bug 2026-10-25 12:24:05 +08:00