Reported: "收到系统小图标时采用黑/白单色图标." The tray was handed
`app.default_window_icon()`, the 512 px gradient wheel, and `tray-icon`
scales whatever it is given to 18 pt: on the menu bar and in the Windows
notification area that is a blob, not a mark.
The new icon is drawn flat and alpha-only by `scripts/build-tray-icon.py`,
in the shape of the ring the app itself paints so the two read as one
product, and `icon_as_template` lets macOS tint it black or white per the
menu bar. Windows has no tinting to ask of, so it gets the same glyph at a
size it can actually render.
Co-Authored-By: Codex <noreply@openai.com>
A raw ed25519 private key is 32 bytes and so is its public half, so
'pubkey KEY_FILE' could not tell them apart and printed the private bytes as a
public key. Baking those into a build produces a key no signature can verify
against, and build.rs accepts any 64 hex characters, so the mistake is silent at
build time and shows up on a user's machine as an update check that cannot verify
the manifest.
Anything not named *.pub is now read as the private key it came from and expanded,
so both documented spellings of the command yield the same key.
Builds are signed with the self-signed "Shift Local Signing" identity and are not
notarized, so Gatekeeper calls Shift an unidentified developer. Dragging the app out
of the DMG hands that verdict to the app: a fresh machine refuses the first launch
until the user approves it in 系统设置 → 隐私与安全性.
`scripts/macos-pkg.sh` wraps the built bundle with pkgbuild and the channel now
publishes `Shift-macOS-universal.pkg` alongside the DMG. Verified rather than
assumed: installing a quarantined copy of the package leaves the installed app with
only `com.apple.provenance` — no `com.apple.quarantine` — and `codesign --verify
--deep --strict` still passes, because pkgbuild neither re-signs nor strips the
payload (CDHash identical across built bundle, DMG copy and pkg copy: 3b7fac6c…).
The package is unsigned because `productsign` needs an Installer Signing certificate
and this build has only a code-signing identity, so the approval does not vanish — it
moves to the download, once, before anything is installed. `installer -pkg … -target
/` needs no approval at all.
The `macos` manifest key stays a DMG on purpose: `update_install`'s handoff mounts the
image with hdiutil, so pointing the key at a .pkg would break in-app updates.
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.
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.