An upgrade emptied the "Send to a device" list, with nothing in the UI to say why.
share.rs was not the cause: the last commit to touch it is b732b91, which only
recorded received files in the history library.
The cause is the macOS Local Network grant. Builds are ad-hoc signed, so every
rebuild is a new code identity, and the grant is keyed to that identity rather than
to the bundle id - 系统设置 now holds five Shift rows, one per build this machine has
run. The declared NSLocalNetworkUsageDescription was missing, so a new identity was
never asked and simply received no group traffic: beacons still went out, direct
unicast was still answered, only the list stayed empty.
That declaration is bc5d3b8. Both READMEs and the packaged macOS note now name the
permission and say what a denial looks like, because unlike Screen Recording it
produces no error - just an empty list. The Developer ID item in M5 records that
this has now actually cost a user a feature, not merely "may reset approvals".
Also ships the Updates panel button pair from 22ff93a, which was merged after 0.1.4
and never published.
Gates: cargo fmt --check clean, cargo test --lib 152 passed / 2 ignored, pnpm check
clean, pnpm test 38 passed. Channel verified by downloading both artifacts back
from the raw endpoint and re-hashing against the manifest, and by the ignored feed
test run with the release key. 55,504,368 B DMG and 24,521,557 B installer.
Both artifacts were downloaded back from the raw endpoint and re-hashed against
the manifest rather than read from the local build output, and shift-update.sig
verifies over the manifest's exact bytes against the release public key.
The retired .pkg left the branch with this publish: the tree is rebuilt from
artifacts/ on every run, so dropping it from the build was enough.
The .pkg existed to hand a fresh machine a copy that was not quarantined, so it
opened with no prompt at all. The DMG has now been verified to work on a fresh
machine - drag to /Applications, one approval on first launch - which is the same
one approval the DMG has always needed. So the second container bought nothing
and is dropped: one artifact per platform is less to keep straight, and nothing in
the channel changes.
What the docs say instead of recommending the package: install the DMG, allow the
first launch once. In-app updates still never prompt, because Shift's own
downloader sets no quarantine flag. The macos manifest key stays a DMG for the
reason it always did - the in-app handoff mounts it with hdiutil.
scripts/macos-pkg.sh stays in the tree and RELEASE.md says plainly that it is no
longer part of a release, so the next reader does not wonder whether a publish is
missing it. The 0.1.3 branch still holds the retired package because removing it
means re-publishing; it has no manifest key, so nothing can be served it.
The packaged note is rewritten for the same reason: it told a reader to download a
file that will no longer be built, and its verification section checked the
package instead of the image.
The ad-hoc signature, the two containers and their different jobs, and how to
verify a download were explained only in docs/RELEASE.md. A user who downloads
Shift-macOS-universal.pkg from the releases branch never sees that file, so the
same write-up now also ships as artifacts/README-macOS-universal.txt, beside the
per-arch Windows notes that already travelled with the channel.
Every claim was checked against the shipped artifacts rather than carried over:
the .pkg payload is Signature=adhoc, pkgutil --check-signature reports no
signature for the package itself, and shasum -c passes on the published set. The
file is force-added to the repository even though artifacts/ is gitignored, so
the scheme is documented where a contributor reads it.
The commit before this one claimed releases that opened fine "were ad-hoc signed,
predating the config entry". They were not: every DMG this channel has published,
back to the first 0.1.0, carries Authority=Shift Local Signing, because Tauri selects
a keychain identity itself when signingIdentity is unset.
What survives is the verified part — a self-signed identity that cannot chain to a
trusted root elsewhere, and an ad-hoc binary that gets an approvable prompt instead of
a hard refusal — so the build change stands and only the archaeology is corrected.
The published DMG was refused on a fresh Mac as damaged/malware, with only
"Move to Trash" — no 仍要打开, no pane entry to approve. That is not the
"unidentified developer" box, and it is worse than shipping unsigned.
Cause: `signingIdentity: "Shift Local Signing"`, a locally created self-signed
certificate. On the build host it looks healthy — `codesign` reports valid on disk
and satisfies its Designated Requirement, `spctl` even accepts it — but the
certificate lives only in this keychain, is self-issued and CA:FALSE, so it cannot
chain to a trusted root on any other machine. Sequoia turns an unchainable
signature on a quarantined download into a hard refusal.
Releases that opened fine predates that config entry and were ad-hoc signed, which
gets the softer prompt the user can clear (right-click → 打开, or 允许 in 隐私与安全性).
Set signingIdentity to "-" explicitly so this cannot drift back, and rebuild all
three macOS/Windows artifacts from it: app is `Signature=adhoc`, the DMG carries no
signature of its own, and the pkg payload is ad-hoc too.
Docs corrected: the earlier explanation in "macOS packaging" blamed the DMG
container, which was wrong — the container still matters for first install (an
installed app is not left quarantined, so a .pkg opens with no prompt), but the
malware verdict came from the certificate.
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.
The Updates tab drops the "installs the ... artifact" chip, and the state label
now leads the status row instead of floating right, since the version it used to
sit beside moved into the header.
The file list no longer disappears on upgrade:
- The library already lived in the app data directory, outside the bundle, so an
in-app update or reinstall never touched `history.json`. What it never had was a
bridge from the store 0.1 used: that list lived in the webview's own storage,
which a reinstall does not survive, so the first launch of a newer build showed
an empty Recent list over files that were all still on disk.
- `history_import` merges those rows once, on the first launch after an upgrade.
An entry the library already lists keeps its own timestamp, the kind is
re-derived from the file rather than taken from the older store's guess, and the
legacy key is dropped only after the merge succeeds so a later upgrade cannot
resurrect rows the user has since removed.
- `HistoryEntry.kind`/`.at` gained serde defaults, so a row from the older store
degrades to a usable entry instead of failing the whole import.
Verified on this machine that the legacy `shift.recent` key is still present in the
installed app's webview store, so the import has rows to adopt.
Gates: cargo fmt --check clean, `cargo test --lib` 149 passed / 2 ignored,
`pnpm check` clean, `pnpm test` 38 passed, `pnpm build` ok.
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.