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-25 19:06:46 +00:00
|
|
|
import {
|
|
|
|
|
Check,
|
|
|
|
|
Download,
|
|
|
|
|
LoaderCircle,
|
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-25 19:41:47 +00:00
|
|
|
Monitor,
|
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-25 19:06:46 +00:00
|
|
|
PackageOpen,
|
|
|
|
|
RefreshCw,
|
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-25 19:41:47 +00:00
|
|
|
Rss,
|
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-25 19:06:46 +00:00
|
|
|
ShieldCheck,
|
|
|
|
|
Sparkle,
|
|
|
|
|
X,
|
|
|
|
|
} from "lucide-react";
|
|
|
|
|
import { useI18n } from "../i18n";
|
|
|
|
|
import { useUpdateFlow } from "../lib/useUpdate";
|
|
|
|
|
import { formatBytes } from "../lib/utils";
|
|
|
|
|
|
|
|
|
|
interface Props {
|
|
|
|
|
/** Raw URL of the manifest, so the panel can name the feed it just queried. */
|
|
|
|
|
feedUrl: string;
|
|
|
|
|
autoCheck: boolean;
|
|
|
|
|
onAutoCheckChange: (enabled: boolean) => void;
|
|
|
|
|
/**
|
|
|
|
|
* The host this build is running on. The panel needs it because the update
|
|
|
|
|
* question is per-operating-system: which artifact the feed will serve, and
|
|
|
|
|
* whether a download can be installed at all, both follow from it.
|
|
|
|
|
*/
|
|
|
|
|
system: UpdateSystemInfo | null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** Operating-system facts, read from the same probe the Runtime tab uses. */
|
|
|
|
|
export interface UpdateSystemInfo {
|
|
|
|
|
platform: string;
|
|
|
|
|
osVersion: string;
|
|
|
|
|
architecture: string;
|
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-25 19:41:47 +00:00
|
|
|
/** Version of the copy the user is looking at, so the header needs no check. */
|
|
|
|
|
appVersion: string;
|
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-25 19:06:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** Rust reports `std::env::consts::ARCH`; the channel names the same thing differently. */
|
|
|
|
|
function architectureLabel(arch: string): string {
|
|
|
|
|
if (arch === "aarch64") return "ARM64";
|
|
|
|
|
if (arch === "x86_64") return "x64";
|
|
|
|
|
return arch;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Update channel backed by the git repository itself: the release branch carries
|
|
|
|
|
* the installers plus a manifest of SHA256 hashes, and this panel is the only
|
|
|
|
|
* place a download can be trusted. A hash mismatch is shown as an error and the
|
|
|
|
|
* file is deleted, so a half-good download can never be launched.
|
|
|
|
|
*/
|
|
|
|
|
export function UpdatePanel({ feedUrl, autoCheck, onAutoCheckChange, system }: Props) {
|
|
|
|
|
const { t } = useI18n();
|
|
|
|
|
// One state machine shared with any other view of the channel, driven by the
|
|
|
|
|
// events Rust already broadcasts, so two views cannot offer different actions.
|
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-25 19:41:47 +00:00
|
|
|
const {
|
|
|
|
|
status,
|
|
|
|
|
checking,
|
|
|
|
|
downloading,
|
|
|
|
|
installing,
|
|
|
|
|
installError,
|
|
|
|
|
progress,
|
|
|
|
|
percent,
|
|
|
|
|
check,
|
|
|
|
|
download,
|
|
|
|
|
install,
|
|
|
|
|
clear,
|
|
|
|
|
} = useUpdateFlow();
|
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-25 19:06:46 +00:00
|
|
|
|
|
|
|
|
const verified = status?.state === "ready";
|
|
|
|
|
const available = status?.state === "available" || verified;
|
|
|
|
|
const failed = status?.state === "error" || status?.state === "unavailable";
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<section className="home-settings-section">
|
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-25 19:41:47 +00:00
|
|
|
{/* The two facts an update answer has to be read against come first: which
|
|
|
|
|
machine and which Shift version is asking, then where updates come from.
|
|
|
|
|
Both precede the Updates heading so a screenshot of this panel already
|
|
|
|
|
says what was upgraded and from where. */}
|
|
|
|
|
<div className="update-meta">
|
|
|
|
|
<div className="update-meta-line">
|
|
|
|
|
<Monitor size={13} />
|
|
|
|
|
<span className="update-meta-label">{t("updateSystem")}</span>
|
|
|
|
|
{system ? (
|
|
|
|
|
<span className="update-system-host">
|
|
|
|
|
<strong>{system.osVersion || system.platform}</strong>
|
|
|
|
|
<small>{architectureLabel(system.architecture)}</small>
|
|
|
|
|
<em>Shift {system.appVersion}</em>
|
|
|
|
|
</span>
|
|
|
|
|
) : (
|
|
|
|
|
<span className="update-system-pending">{t("updateSystemPending")}</span>
|
|
|
|
|
)}
|
|
|
|
|
</div>
|
|
|
|
|
<div className="update-meta-line">
|
|
|
|
|
<Rss size={13} />
|
|
|
|
|
<span className="update-meta-label">{t("updateFeed")}</span>
|
|
|
|
|
{/* Only a status backed by a manifest may claim anything about trust: an
|
|
|
|
|
errored check has no manifest to have verified. */}
|
|
|
|
|
{status && status.state !== "error" ? (
|
|
|
|
|
<span className={`update-trust is-${status.signed ? "signed" : "unsigned"}`}>
|
|
|
|
|
<ShieldCheck size={11} />
|
|
|
|
|
{t(status.signed ? "updateSigned" : "updateUnsigned")}
|
|
|
|
|
</span>
|
|
|
|
|
) : null}
|
|
|
|
|
<code title={feedUrl}>{feedUrl || t("updateFeedNone")}</code>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
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-25 19:06:46 +00:00
|
|
|
<div className="runtime-section-head">
|
|
|
|
|
<div className="home-section-title">
|
|
|
|
|
<Sparkle size={15} />
|
|
|
|
|
{t("updates")}
|
|
|
|
|
</div>
|
|
|
|
|
<button
|
|
|
|
|
className="settings-link runtime-refresh"
|
|
|
|
|
onClick={() => void check()}
|
|
|
|
|
disabled={checking || downloading}
|
|
|
|
|
>
|
|
|
|
|
<RefreshCw size={12} className={checking ? "spin" : ""} />
|
|
|
|
|
{checking ? t("updateChecking") : t("updateCheckNow")}
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div className="update-status-row">
|
|
|
|
|
<span className={`update-state is-${status?.state ?? "idle"}`}>
|
|
|
|
|
{status
|
|
|
|
|
? t(
|
|
|
|
|
status.state === "ready"
|
|
|
|
|
? "updateReady"
|
|
|
|
|
: status.state === "available"
|
|
|
|
|
? "updateAvailable"
|
|
|
|
|
: status.state === "current"
|
|
|
|
|
? "updateCurrent"
|
|
|
|
|
: "updateUnavailable",
|
|
|
|
|
)
|
|
|
|
|
: t("updateIdle")}
|
|
|
|
|
</span>
|
release: 0.1.3 — the Recent list survives an upgrade
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.
2026-10-25 20:02:31 +00:00
|
|
|
{available && status ? (
|
|
|
|
|
<span className="update-arrow">
|
|
|
|
|
<span className="update-new">
|
|
|
|
|
<Sparkle size={11} />
|
|
|
|
|
{status.availableVersion}
|
|
|
|
|
</span>
|
|
|
|
|
<small>{status.date}</small>
|
|
|
|
|
</span>
|
|
|
|
|
) : null}
|
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-25 19:06:46 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{status?.notes ? <p className="update-notes">{status.notes}</p> : null}
|
|
|
|
|
|
|
|
|
|
{status?.fileName ? (
|
|
|
|
|
<div className="update-artifact">
|
|
|
|
|
<PackageOpen size={13} />
|
|
|
|
|
<span className="update-artifact-name" title={status.fileName}>
|
|
|
|
|
{status.fileName}
|
|
|
|
|
</span>
|
|
|
|
|
<span className="update-artifact-size">{formatBytes(status.size)}</span>
|
|
|
|
|
</div>
|
|
|
|
|
) : null}
|
|
|
|
|
|
|
|
|
|
{percent !== null ? (
|
|
|
|
|
<div className="update-progress" role="progressbar" aria-valuenow={percent}>
|
|
|
|
|
<div className="update-progress-fill" style={{ width: `${percent}%` }} />
|
|
|
|
|
<span>
|
|
|
|
|
{progress ? `${formatBytes(progress.downloaded)} / ${formatBytes(progress.total)}` : ""}
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
) : null}
|
|
|
|
|
|
|
|
|
|
{status?.sha256 ? (
|
|
|
|
|
<code className="update-hash" title={status.sha256}>
|
|
|
|
|
<ShieldCheck size={11} />
|
|
|
|
|
SHA256 {verified ? status.sha256 : `${status.sha256.slice(0, 16)}…`}
|
|
|
|
|
</code>
|
|
|
|
|
) : null}
|
|
|
|
|
|
|
|
|
|
{status?.message && (failed || verified) ? (
|
|
|
|
|
<div className={`runtime-error ${verified ? "is-ok" : ""}`}>
|
|
|
|
|
<span>{verified ? t("updateVerified") : status.message}</span>
|
|
|
|
|
</div>
|
|
|
|
|
) : null}
|
|
|
|
|
|
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-25 19:41:47 +00:00
|
|
|
{/* An install that could not run leaves the verified download in place, so it
|
|
|
|
|
is reported beside the button instead of rewriting the status. */}
|
|
|
|
|
{installError ? (
|
|
|
|
|
<div className="runtime-error">
|
|
|
|
|
<span>{installError}</span>
|
|
|
|
|
</div>
|
|
|
|
|
) : null}
|
|
|
|
|
|
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-25 19:06:46 +00:00
|
|
|
<div className="update-actions">
|
|
|
|
|
{available && !verified ? (
|
fix(updates): make install and discard read as one decision
The row under a verified download took both controls from the Runtime tab, where
rows are dense: .runtime-install is 27px tall at 8.5px text and .settings-link is
a bare 8.5px text link with no box at all. In the Updates panel, whose own status
text, artifact chip and version pill are 12px, that produced an orange pill beside
floating text - the pair did not look like one choice, and the text link did not
read as a button you could press.
They get their own .update-action now, sized to the 12px scale the panel already
uses, and both take the same box so the eye groups them. The commit variant wears
the app's existing primary gradient, so the action that does something is the loud
one and Discard stays the quiet alternative.
"放弃" also stops competing at the moment it stops meaning anything: once the
handoff script is written the app is counting down to exit, so the row collapses
to the single control still in play. update_clear only resets the status, so this
is presentation, not a saved deletion.
updateInstalling was a whole sentence inside a fixed-height pill, which is what
made that button stretch unevenly against its neighbour. It is "正在安装…" now;
the panel's own closing paragraph already says Shift will restart and interrupt a
running conversion, so the button does not have to repeat it.
2026-10-26 08:22:34 +00:00
|
|
|
<button
|
|
|
|
|
className="update-action is-commit"
|
|
|
|
|
onClick={() => void download()}
|
|
|
|
|
disabled={downloading}
|
|
|
|
|
>
|
|
|
|
|
{downloading ? <LoaderCircle size={13} className="spin" /> : <Download size={13} />}
|
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-25 19:06:46 +00:00
|
|
|
{downloading ? t("updateDownloading") : t("updateDownload")}
|
|
|
|
|
</button>
|
|
|
|
|
) : null}
|
|
|
|
|
{verified ? (
|
fix(updates): make install and discard read as one decision
The row under a verified download took both controls from the Runtime tab, where
rows are dense: .runtime-install is 27px tall at 8.5px text and .settings-link is
a bare 8.5px text link with no box at all. In the Updates panel, whose own status
text, artifact chip and version pill are 12px, that produced an orange pill beside
floating text - the pair did not look like one choice, and the text link did not
read as a button you could press.
They get their own .update-action now, sized to the 12px scale the panel already
uses, and both take the same box so the eye groups them. The commit variant wears
the app's existing primary gradient, so the action that does something is the loud
one and Discard stays the quiet alternative.
"放弃" also stops competing at the moment it stops meaning anything: once the
handoff script is written the app is counting down to exit, so the row collapses
to the single control still in play. update_clear only resets the status, so this
is presentation, not a saved deletion.
updateInstalling was a whole sentence inside a fixed-height pill, which is what
made that button stretch unevenly against its neighbour. It is "正在安装…" now;
the panel's own closing paragraph already says Shift will restart and interrupt a
running conversion, so the button does not have to repeat it.
2026-10-26 08:22:34 +00:00
|
|
|
<button
|
|
|
|
|
className="update-action is-commit"
|
|
|
|
|
onClick={() => void install()}
|
|
|
|
|
disabled={installing}
|
|
|
|
|
>
|
|
|
|
|
{installing ? <LoaderCircle size={13} className="spin" /> : <Check size={13} />}
|
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-25 19:41:47 +00:00
|
|
|
{installing ? t("updateInstalling") : t("updateInstall")}
|
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-25 19:06:46 +00:00
|
|
|
</button>
|
|
|
|
|
) : null}
|
fix(updates): make install and discard read as one decision
The row under a verified download took both controls from the Runtime tab, where
rows are dense: .runtime-install is 27px tall at 8.5px text and .settings-link is
a bare 8.5px text link with no box at all. In the Updates panel, whose own status
text, artifact chip and version pill are 12px, that produced an orange pill beside
floating text - the pair did not look like one choice, and the text link did not
read as a button you could press.
They get their own .update-action now, sized to the 12px scale the panel already
uses, and both take the same box so the eye groups them. The commit variant wears
the app's existing primary gradient, so the action that does something is the loud
one and Discard stays the quiet alternative.
"放弃" also stops competing at the moment it stops meaning anything: once the
handoff script is written the app is counting down to exit, so the row collapses
to the single control still in play. update_clear only resets the status, so this
is presentation, not a saved deletion.
updateInstalling was a whole sentence inside a fixed-height pill, which is what
made that button stretch unevenly against its neighbour. It is "正在安装…" now;
the panel's own closing paragraph already says Shift will restart and interrupt a
running conversion, so the button does not have to repeat it.
2026-10-26 08:22:34 +00:00
|
|
|
{/* An install is a countdown to this process exiting, so the row drops the
|
|
|
|
|
choice that only resets what is already decided. */}
|
|
|
|
|
{verified && !installing ? (
|
|
|
|
|
<button className="update-action" onClick={() => void clear()}>
|
|
|
|
|
<X size={13} />
|
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-25 19:06:46 +00:00
|
|
|
{t("updateDiscard")}
|
|
|
|
|
</button>
|
|
|
|
|
) : null}
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<label className="home-toggle-row home-toggle-divider">
|
|
|
|
|
<strong>{t("updateAutoCheck")}</strong>
|
|
|
|
|
<button
|
|
|
|
|
className={`home-toggle ${autoCheck ? "is-on" : ""}`}
|
|
|
|
|
onClick={() => onAutoCheckChange(!autoCheck)}
|
|
|
|
|
aria-pressed={autoCheck}
|
|
|
|
|
>
|
|
|
|
|
<span />
|
|
|
|
|
</button>
|
|
|
|
|
</label>
|
|
|
|
|
<p className="runtime-summary">{t("updateBody")}</p>
|
|
|
|
|
</section>
|
|
|
|
|
);
|
|
|
|
|
}
|