nex_shift/src/components/UpdatePanel.tsx

236 lines
8.1 KiB
TypeScript
Raw Normal View History

import {
Check,
Download,
LoaderCircle,
Monitor,
PackageOpen,
RefreshCw,
Rss,
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;
/** Version of the copy the user is looking at, so the header needs no check. */
appVersion: string;
}
/** 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.
const {
status,
checking,
downloading,
installing,
installError,
progress,
percent,
check,
download,
install,
clear,
} = useUpdateFlow();
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">
{/* 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">
feat(ui): drop onto a button, and read the panels again Three changes to the main window, requested together. A file drop is now aimed. The three buttons are the only drop targets and the button you release on is the action it runs; a release anywhere else on the panel runs nothing and says so, instead of opening an action ring nobody asked for. This replaces the old fallback in both delivery paths - the DOM handler and the native webview drop - because two routes to the same gesture must not have two different rules. dropFiles therefore takes a required action rather than an optional one, and the actions ring is still reachable from the Shift-drag gesture and from a file type with no convertible formats. Recent rows can be dragged back onto those buttons. A row leaves Shift as a real file drag, so one gesture can be reported twice, once by the DOM and once by the native events, and which arrives first depends on the engine; recentDrag.landed lets only the first through. The hint under the buttons names the affordance, which is otherwise invisible, and all three buttons light up as candidates for as long as any drag is in flight - a native one via dragging, an internal one via rowDragging, since a row drag inside the webview does not raise native events. Type sizes are on one ladder now (--text-3xs to --text-hero) instead of being invented per rule, which is how the settings drawer drifted down to 7-8px. 92 declarations under 12px became one. The drawer is wider, its tabs are pills, and the runtime, share, setup and radial surfaces moved onto the same scale. The capture-behaviour setting is removed: the CaptureAfter enum, its field, its command and its UI. A finished capture always shows the result card, falling back to the editor when a card window cannot be created. Stored settings that still carry captureAfter load unchanged, because the struct does not deny unknown fields. Also dropped 23 i18n keys no surface used, one dead re-export in history.ts, and a stale .home-drop p rule that was outranking the new hint and sizing it as body copy. tsconfig now turns on noUnusedLocals, noUnusedParameters and noFallthroughCasesInSwitch, which is what keeps the dead imports from coming back; the tree already passes all three.
2026-11-01 04:02:24 +00:00
<Monitor size={15} />
<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">
feat(ui): drop onto a button, and read the panels again Three changes to the main window, requested together. A file drop is now aimed. The three buttons are the only drop targets and the button you release on is the action it runs; a release anywhere else on the panel runs nothing and says so, instead of opening an action ring nobody asked for. This replaces the old fallback in both delivery paths - the DOM handler and the native webview drop - because two routes to the same gesture must not have two different rules. dropFiles therefore takes a required action rather than an optional one, and the actions ring is still reachable from the Shift-drag gesture and from a file type with no convertible formats. Recent rows can be dragged back onto those buttons. A row leaves Shift as a real file drag, so one gesture can be reported twice, once by the DOM and once by the native events, and which arrives first depends on the engine; recentDrag.landed lets only the first through. The hint under the buttons names the affordance, which is otherwise invisible, and all three buttons light up as candidates for as long as any drag is in flight - a native one via dragging, an internal one via rowDragging, since a row drag inside the webview does not raise native events. Type sizes are on one ladder now (--text-3xs to --text-hero) instead of being invented per rule, which is how the settings drawer drifted down to 7-8px. 92 declarations under 12px became one. The drawer is wider, its tabs are pills, and the runtime, share, setup and radial surfaces moved onto the same scale. The capture-behaviour setting is removed: the CaptureAfter enum, its field, its command and its UI. A finished capture always shows the result card, falling back to the editor when a card window cannot be created. Stored settings that still carry captureAfter load unchanged, because the struct does not deny unknown fields. Also dropped 23 i18n keys no surface used, one dead re-export in history.ts, and a stale .home-drop p rule that was outranking the new hint and sizing it as body copy. tsconfig now turns on noUnusedLocals, noUnusedParameters and noFallthroughCasesInSwitch, which is what keeps the dead imports from coming back; the tree already passes all three.
2026-11-01 04:02:24 +00:00
<Rss size={15} />
<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"}`}>
feat(ui): drop onto a button, and read the panels again Three changes to the main window, requested together. A file drop is now aimed. The three buttons are the only drop targets and the button you release on is the action it runs; a release anywhere else on the panel runs nothing and says so, instead of opening an action ring nobody asked for. This replaces the old fallback in both delivery paths - the DOM handler and the native webview drop - because two routes to the same gesture must not have two different rules. dropFiles therefore takes a required action rather than an optional one, and the actions ring is still reachable from the Shift-drag gesture and from a file type with no convertible formats. Recent rows can be dragged back onto those buttons. A row leaves Shift as a real file drag, so one gesture can be reported twice, once by the DOM and once by the native events, and which arrives first depends on the engine; recentDrag.landed lets only the first through. The hint under the buttons names the affordance, which is otherwise invisible, and all three buttons light up as candidates for as long as any drag is in flight - a native one via dragging, an internal one via rowDragging, since a row drag inside the webview does not raise native events. Type sizes are on one ladder now (--text-3xs to --text-hero) instead of being invented per rule, which is how the settings drawer drifted down to 7-8px. 92 declarations under 12px became one. The drawer is wider, its tabs are pills, and the runtime, share, setup and radial surfaces moved onto the same scale. The capture-behaviour setting is removed: the CaptureAfter enum, its field, its command and its UI. A finished capture always shows the result card, falling back to the editor when a card window cannot be created. Stored settings that still carry captureAfter load unchanged, because the struct does not deny unknown fields. Also dropped 23 i18n keys no surface used, one dead re-export in history.ts, and a stale .home-drop p rule that was outranking the new hint and sizing it as body copy. tsconfig now turns on noUnusedLocals, noUnusedParameters and noFallthroughCasesInSwitch, which is what keeps the dead imports from coming back; the tree already passes all three.
2026-11-01 04:02:24 +00:00
<ShieldCheck size={13} />
{t(status.signed ? "updateSigned" : "updateUnsigned")}
</span>
) : null}
<code title={feedUrl}>{feedUrl || t("updateFeedNone")}</code>
</div>
</div>
<div className="runtime-section-head">
<div className="home-section-title">
feat(ui): drop onto a button, and read the panels again Three changes to the main window, requested together. A file drop is now aimed. The three buttons are the only drop targets and the button you release on is the action it runs; a release anywhere else on the panel runs nothing and says so, instead of opening an action ring nobody asked for. This replaces the old fallback in both delivery paths - the DOM handler and the native webview drop - because two routes to the same gesture must not have two different rules. dropFiles therefore takes a required action rather than an optional one, and the actions ring is still reachable from the Shift-drag gesture and from a file type with no convertible formats. Recent rows can be dragged back onto those buttons. A row leaves Shift as a real file drag, so one gesture can be reported twice, once by the DOM and once by the native events, and which arrives first depends on the engine; recentDrag.landed lets only the first through. The hint under the buttons names the affordance, which is otherwise invisible, and all three buttons light up as candidates for as long as any drag is in flight - a native one via dragging, an internal one via rowDragging, since a row drag inside the webview does not raise native events. Type sizes are on one ladder now (--text-3xs to --text-hero) instead of being invented per rule, which is how the settings drawer drifted down to 7-8px. 92 declarations under 12px became one. The drawer is wider, its tabs are pills, and the runtime, share, setup and radial surfaces moved onto the same scale. The capture-behaviour setting is removed: the CaptureAfter enum, its field, its command and its UI. A finished capture always shows the result card, falling back to the editor when a card window cannot be created. Stored settings that still carry captureAfter load unchanged, because the struct does not deny unknown fields. Also dropped 23 i18n keys no surface used, one dead re-export in history.ts, and a stale .home-drop p rule that was outranking the new hint and sizing it as body copy. tsconfig now turns on noUnusedLocals, noUnusedParameters and noFallthroughCasesInSwitch, which is what keeps the dead imports from coming back; the tree already passes all three.
2026-11-01 04:02:24 +00:00
<Sparkle size={17} />
{t("updates")}
</div>
<button
className="settings-link runtime-refresh"
onClick={() => void check()}
disabled={checking || downloading}
>
feat(ui): drop onto a button, and read the panels again Three changes to the main window, requested together. A file drop is now aimed. The three buttons are the only drop targets and the button you release on is the action it runs; a release anywhere else on the panel runs nothing and says so, instead of opening an action ring nobody asked for. This replaces the old fallback in both delivery paths - the DOM handler and the native webview drop - because two routes to the same gesture must not have two different rules. dropFiles therefore takes a required action rather than an optional one, and the actions ring is still reachable from the Shift-drag gesture and from a file type with no convertible formats. Recent rows can be dragged back onto those buttons. A row leaves Shift as a real file drag, so one gesture can be reported twice, once by the DOM and once by the native events, and which arrives first depends on the engine; recentDrag.landed lets only the first through. The hint under the buttons names the affordance, which is otherwise invisible, and all three buttons light up as candidates for as long as any drag is in flight - a native one via dragging, an internal one via rowDragging, since a row drag inside the webview does not raise native events. Type sizes are on one ladder now (--text-3xs to --text-hero) instead of being invented per rule, which is how the settings drawer drifted down to 7-8px. 92 declarations under 12px became one. The drawer is wider, its tabs are pills, and the runtime, share, setup and radial surfaces moved onto the same scale. The capture-behaviour setting is removed: the CaptureAfter enum, its field, its command and its UI. A finished capture always shows the result card, falling back to the editor when a card window cannot be created. Stored settings that still carry captureAfter load unchanged, because the struct does not deny unknown fields. Also dropped 23 i18n keys no surface used, one dead re-export in history.ts, and a stale .home-drop p rule that was outranking the new hint and sizing it as body copy. tsconfig now turns on noUnusedLocals, noUnusedParameters and noFallthroughCasesInSwitch, which is what keeps the dead imports from coming back; the tree already passes all three.
2026-11-01 04:02:24 +00:00
<RefreshCw size={13} 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>
{available && status ? (
<span className="update-arrow">
<span className="update-new">
feat(ui): drop onto a button, and read the panels again Three changes to the main window, requested together. A file drop is now aimed. The three buttons are the only drop targets and the button you release on is the action it runs; a release anywhere else on the panel runs nothing and says so, instead of opening an action ring nobody asked for. This replaces the old fallback in both delivery paths - the DOM handler and the native webview drop - because two routes to the same gesture must not have two different rules. dropFiles therefore takes a required action rather than an optional one, and the actions ring is still reachable from the Shift-drag gesture and from a file type with no convertible formats. Recent rows can be dragged back onto those buttons. A row leaves Shift as a real file drag, so one gesture can be reported twice, once by the DOM and once by the native events, and which arrives first depends on the engine; recentDrag.landed lets only the first through. The hint under the buttons names the affordance, which is otherwise invisible, and all three buttons light up as candidates for as long as any drag is in flight - a native one via dragging, an internal one via rowDragging, since a row drag inside the webview does not raise native events. Type sizes are on one ladder now (--text-3xs to --text-hero) instead of being invented per rule, which is how the settings drawer drifted down to 7-8px. 92 declarations under 12px became one. The drawer is wider, its tabs are pills, and the runtime, share, setup and radial surfaces moved onto the same scale. The capture-behaviour setting is removed: the CaptureAfter enum, its field, its command and its UI. A finished capture always shows the result card, falling back to the editor when a card window cannot be created. Stored settings that still carry captureAfter load unchanged, because the struct does not deny unknown fields. Also dropped 23 i18n keys no surface used, one dead re-export in history.ts, and a stale .home-drop p rule that was outranking the new hint and sizing it as body copy. tsconfig now turns on noUnusedLocals, noUnusedParameters and noFallthroughCasesInSwitch, which is what keeps the dead imports from coming back; the tree already passes all three.
2026-11-01 04:02:24 +00:00
<Sparkle size={13} />
{status.availableVersion}
</span>
<small>{status.date}</small>
</span>
) : null}
</div>
{status?.notes ? <p className="update-notes">{status.notes}</p> : null}
{status?.fileName ? (
<div className="update-artifact">
feat(ui): drop onto a button, and read the panels again Three changes to the main window, requested together. A file drop is now aimed. The three buttons are the only drop targets and the button you release on is the action it runs; a release anywhere else on the panel runs nothing and says so, instead of opening an action ring nobody asked for. This replaces the old fallback in both delivery paths - the DOM handler and the native webview drop - because two routes to the same gesture must not have two different rules. dropFiles therefore takes a required action rather than an optional one, and the actions ring is still reachable from the Shift-drag gesture and from a file type with no convertible formats. Recent rows can be dragged back onto those buttons. A row leaves Shift as a real file drag, so one gesture can be reported twice, once by the DOM and once by the native events, and which arrives first depends on the engine; recentDrag.landed lets only the first through. The hint under the buttons names the affordance, which is otherwise invisible, and all three buttons light up as candidates for as long as any drag is in flight - a native one via dragging, an internal one via rowDragging, since a row drag inside the webview does not raise native events. Type sizes are on one ladder now (--text-3xs to --text-hero) instead of being invented per rule, which is how the settings drawer drifted down to 7-8px. 92 declarations under 12px became one. The drawer is wider, its tabs are pills, and the runtime, share, setup and radial surfaces moved onto the same scale. The capture-behaviour setting is removed: the CaptureAfter enum, its field, its command and its UI. A finished capture always shows the result card, falling back to the editor when a card window cannot be created. Stored settings that still carry captureAfter load unchanged, because the struct does not deny unknown fields. Also dropped 23 i18n keys no surface used, one dead re-export in history.ts, and a stale .home-drop p rule that was outranking the new hint and sizing it as body copy. tsconfig now turns on noUnusedLocals, noUnusedParameters and noFallthroughCasesInSwitch, which is what keeps the dead imports from coming back; the tree already passes all three.
2026-11-01 04:02:24 +00:00
<PackageOpen size={15} />
<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}>
feat(ui): drop onto a button, and read the panels again Three changes to the main window, requested together. A file drop is now aimed. The three buttons are the only drop targets and the button you release on is the action it runs; a release anywhere else on the panel runs nothing and says so, instead of opening an action ring nobody asked for. This replaces the old fallback in both delivery paths - the DOM handler and the native webview drop - because two routes to the same gesture must not have two different rules. dropFiles therefore takes a required action rather than an optional one, and the actions ring is still reachable from the Shift-drag gesture and from a file type with no convertible formats. Recent rows can be dragged back onto those buttons. A row leaves Shift as a real file drag, so one gesture can be reported twice, once by the DOM and once by the native events, and which arrives first depends on the engine; recentDrag.landed lets only the first through. The hint under the buttons names the affordance, which is otherwise invisible, and all three buttons light up as candidates for as long as any drag is in flight - a native one via dragging, an internal one via rowDragging, since a row drag inside the webview does not raise native events. Type sizes are on one ladder now (--text-3xs to --text-hero) instead of being invented per rule, which is how the settings drawer drifted down to 7-8px. 92 declarations under 12px became one. The drawer is wider, its tabs are pills, and the runtime, share, setup and radial surfaces moved onto the same scale. The capture-behaviour setting is removed: the CaptureAfter enum, its field, its command and its UI. A finished capture always shows the result card, falling back to the editor when a card window cannot be created. Stored settings that still carry captureAfter load unchanged, because the struct does not deny unknown fields. Also dropped 23 i18n keys no surface used, one dead re-export in history.ts, and a stale .home-drop p rule that was outranking the new hint and sizing it as body copy. tsconfig now turns on noUnusedLocals, noUnusedParameters and noFallthroughCasesInSwitch, which is what keeps the dead imports from coming back; the tree already passes all three.
2026-11-01 04:02:24 +00:00
<ShieldCheck size={13} />
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}
{/* 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}
<div className="update-actions">
{available && !verified ? (
<button
className="update-action is-commit"
onClick={() => void download()}
disabled={downloading}
>
feat(ui): drop onto a button, and read the panels again Three changes to the main window, requested together. A file drop is now aimed. The three buttons are the only drop targets and the button you release on is the action it runs; a release anywhere else on the panel runs nothing and says so, instead of opening an action ring nobody asked for. This replaces the old fallback in both delivery paths - the DOM handler and the native webview drop - because two routes to the same gesture must not have two different rules. dropFiles therefore takes a required action rather than an optional one, and the actions ring is still reachable from the Shift-drag gesture and from a file type with no convertible formats. Recent rows can be dragged back onto those buttons. A row leaves Shift as a real file drag, so one gesture can be reported twice, once by the DOM and once by the native events, and which arrives first depends on the engine; recentDrag.landed lets only the first through. The hint under the buttons names the affordance, which is otherwise invisible, and all three buttons light up as candidates for as long as any drag is in flight - a native one via dragging, an internal one via rowDragging, since a row drag inside the webview does not raise native events. Type sizes are on one ladder now (--text-3xs to --text-hero) instead of being invented per rule, which is how the settings drawer drifted down to 7-8px. 92 declarations under 12px became one. The drawer is wider, its tabs are pills, and the runtime, share, setup and radial surfaces moved onto the same scale. The capture-behaviour setting is removed: the CaptureAfter enum, its field, its command and its UI. A finished capture always shows the result card, falling back to the editor when a card window cannot be created. Stored settings that still carry captureAfter load unchanged, because the struct does not deny unknown fields. Also dropped 23 i18n keys no surface used, one dead re-export in history.ts, and a stale .home-drop p rule that was outranking the new hint and sizing it as body copy. tsconfig now turns on noUnusedLocals, noUnusedParameters and noFallthroughCasesInSwitch, which is what keeps the dead imports from coming back; the tree already passes all three.
2026-11-01 04:02:24 +00:00
{downloading ? <LoaderCircle size={15} className="spin" /> : <Download size={15} />}
{downloading ? t("updateDownloading") : t("updateDownload")}
</button>
) : null}
{verified ? (
<button
className="update-action is-commit"
onClick={() => void install()}
disabled={installing}
>
feat(ui): drop onto a button, and read the panels again Three changes to the main window, requested together. A file drop is now aimed. The three buttons are the only drop targets and the button you release on is the action it runs; a release anywhere else on the panel runs nothing and says so, instead of opening an action ring nobody asked for. This replaces the old fallback in both delivery paths - the DOM handler and the native webview drop - because two routes to the same gesture must not have two different rules. dropFiles therefore takes a required action rather than an optional one, and the actions ring is still reachable from the Shift-drag gesture and from a file type with no convertible formats. Recent rows can be dragged back onto those buttons. A row leaves Shift as a real file drag, so one gesture can be reported twice, once by the DOM and once by the native events, and which arrives first depends on the engine; recentDrag.landed lets only the first through. The hint under the buttons names the affordance, which is otherwise invisible, and all three buttons light up as candidates for as long as any drag is in flight - a native one via dragging, an internal one via rowDragging, since a row drag inside the webview does not raise native events. Type sizes are on one ladder now (--text-3xs to --text-hero) instead of being invented per rule, which is how the settings drawer drifted down to 7-8px. 92 declarations under 12px became one. The drawer is wider, its tabs are pills, and the runtime, share, setup and radial surfaces moved onto the same scale. The capture-behaviour setting is removed: the CaptureAfter enum, its field, its command and its UI. A finished capture always shows the result card, falling back to the editor when a card window cannot be created. Stored settings that still carry captureAfter load unchanged, because the struct does not deny unknown fields. Also dropped 23 i18n keys no surface used, one dead re-export in history.ts, and a stale .home-drop p rule that was outranking the new hint and sizing it as body copy. tsconfig now turns on noUnusedLocals, noUnusedParameters and noFallthroughCasesInSwitch, which is what keeps the dead imports from coming back; the tree already passes all three.
2026-11-01 04:02:24 +00:00
{installing ? <LoaderCircle size={15} className="spin" /> : <Check size={15} />}
{installing ? t("updateInstalling") : t("updateInstall")}
</button>
) : null}
{/* 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()}>
feat(ui): drop onto a button, and read the panels again Three changes to the main window, requested together. A file drop is now aimed. The three buttons are the only drop targets and the button you release on is the action it runs; a release anywhere else on the panel runs nothing and says so, instead of opening an action ring nobody asked for. This replaces the old fallback in both delivery paths - the DOM handler and the native webview drop - because two routes to the same gesture must not have two different rules. dropFiles therefore takes a required action rather than an optional one, and the actions ring is still reachable from the Shift-drag gesture and from a file type with no convertible formats. Recent rows can be dragged back onto those buttons. A row leaves Shift as a real file drag, so one gesture can be reported twice, once by the DOM and once by the native events, and which arrives first depends on the engine; recentDrag.landed lets only the first through. The hint under the buttons names the affordance, which is otherwise invisible, and all three buttons light up as candidates for as long as any drag is in flight - a native one via dragging, an internal one via rowDragging, since a row drag inside the webview does not raise native events. Type sizes are on one ladder now (--text-3xs to --text-hero) instead of being invented per rule, which is how the settings drawer drifted down to 7-8px. 92 declarations under 12px became one. The drawer is wider, its tabs are pills, and the runtime, share, setup and radial surfaces moved onto the same scale. The capture-behaviour setting is removed: the CaptureAfter enum, its field, its command and its UI. A finished capture always shows the result card, falling back to the editor when a card window cannot be created. Stored settings that still carry captureAfter load unchanged, because the struct does not deny unknown fields. Also dropped 23 i18n keys no surface used, one dead re-export in history.ts, and a stale .home-drop p rule that was outranking the new hint and sizing it as body copy. tsconfig now turns on noUnusedLocals, noUnusedParameters and noFallthroughCasesInSwitch, which is what keeps the dead imports from coming back; the tree already passes all three.
2026-11-01 04:02:24 +00:00
<X size={15} />
{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>
);
}