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 { useCallback, useEffect, useState } from "react";
|
|
|
|
|
import {
|
|
|
|
|
Check,
|
|
|
|
|
FolderOpen,
|
|
|
|
|
Keyboard,
|
|
|
|
|
LoaderCircle,
|
|
|
|
|
RefreshCw,
|
|
|
|
|
ScanLine,
|
|
|
|
|
ShieldCheck,
|
|
|
|
|
X,
|
|
|
|
|
} from "lucide-react";
|
|
|
|
|
import { useI18n } from "../i18n";
|
|
|
|
|
import { api } from "../lib/api";
|
|
|
|
|
import type { HotkeyStatus, RuntimeInfo, WriteCheck } from "../types";
|
|
|
|
|
|
|
|
|
|
type State = "checking" | "ok" | "problem" | "unknown";
|
|
|
|
|
|
|
|
|
|
interface Row {
|
|
|
|
|
id: "capture" | "folders" | "shortcuts" | "tools";
|
|
|
|
|
state: State;
|
|
|
|
|
detail: string;
|
|
|
|
|
action?: { label: string; run: () => void };
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Guided first-run checks. Everything here is a probe that Settings also offers, so
|
|
|
|
|
* the flow reports the same truth rather than a first-run guess: it reads the OS
|
|
|
|
|
* permission state, writes a probe file into each output folder, asks which copy owns
|
|
|
|
|
* the global hotkeys, and lists optional tools the platform is missing. Dismissing it
|
|
|
|
|
* never disables anything.
|
|
|
|
|
*/
|
|
|
|
|
export function SetupPanel({
|
|
|
|
|
onDone,
|
|
|
|
|
onOpenRuntime,
|
|
|
|
|
}: {
|
|
|
|
|
onDone: () => void;
|
|
|
|
|
onOpenRuntime: () => void;
|
|
|
|
|
}) {
|
|
|
|
|
const { t } = useI18n();
|
|
|
|
|
const [rows, setRows] = useState<Row[]>([
|
|
|
|
|
{ id: "capture", state: "checking", detail: "" },
|
|
|
|
|
{ id: "folders", state: "checking", detail: "" },
|
|
|
|
|
{ id: "shortcuts", state: "checking", detail: "" },
|
|
|
|
|
{ id: "tools", state: "checking", detail: "" },
|
|
|
|
|
]);
|
|
|
|
|
const [checks, setChecks] = useState<WriteCheck[] | null>(null);
|
|
|
|
|
|
|
|
|
|
const patch = (id: Row["id"], next: Partial<Row>) =>
|
|
|
|
|
setRows((current) => current.map((row) => (row.id === id ? { ...row, ...next } : row)));
|
|
|
|
|
|
|
|
|
|
const refresh = useCallback(async () => {
|
|
|
|
|
setRows((current) => current.map((row) => ({ ...row, state: "checking" as State })));
|
|
|
|
|
|
|
|
|
|
void api
|
|
|
|
|
.screenCaptureAccessStatus()
|
|
|
|
|
.then((allowed) =>
|
|
|
|
|
patch(
|
|
|
|
|
"capture",
|
|
|
|
|
allowed
|
|
|
|
|
? { state: "ok", detail: t("setupCaptureOk") }
|
|
|
|
|
: {
|
|
|
|
|
state: "problem",
|
|
|
|
|
detail: t("screenPermissionPrompt"),
|
|
|
|
|
action: {
|
|
|
|
|
label: t("openScreenSettings"),
|
|
|
|
|
run: () => void api.openScreenRecordingSettings(),
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
.catch(() => patch("capture", { state: "unknown", detail: t("setupCheckFailed") }));
|
|
|
|
|
|
|
|
|
|
void api
|
|
|
|
|
.checkOutputAccess()
|
|
|
|
|
.then((results) => {
|
|
|
|
|
setChecks(results);
|
|
|
|
|
const broken = results.filter((check) => !check.ok);
|
|
|
|
|
patch(
|
|
|
|
|
"folders",
|
|
|
|
|
broken.length === 0
|
|
|
|
|
? { state: "ok", detail: t("setupFoldersOk") }
|
|
|
|
|
: { state: "problem", detail: broken.map((check) => check.message).join(" ") },
|
|
|
|
|
);
|
|
|
|
|
})
|
|
|
|
|
.catch(() => patch("folders", { state: "unknown", detail: t("setupCheckFailed") }));
|
|
|
|
|
|
|
|
|
|
void api
|
|
|
|
|
.hotkeyStatus()
|
|
|
|
|
.then((status: HotkeyStatus) =>
|
|
|
|
|
patch(
|
|
|
|
|
"shortcuts",
|
|
|
|
|
status.live
|
|
|
|
|
? { state: "ok", detail: t("setupShortcutsOk") }
|
|
|
|
|
: {
|
|
|
|
|
state: "problem",
|
|
|
|
|
detail: status.others.length > 0 ? t("hotkeysDead") : t("hotkeysNotLive"),
|
|
|
|
|
action: {
|
|
|
|
|
label: t("hotkeysFix"),
|
|
|
|
|
run: () =>
|
|
|
|
|
void api
|
|
|
|
|
.quitOtherInstances()
|
|
|
|
|
.then(() => api.reclaimHotkeys())
|
|
|
|
|
.then((live) =>
|
|
|
|
|
patch(
|
|
|
|
|
"shortcuts",
|
|
|
|
|
live.live
|
|
|
|
|
? { state: "ok", detail: t("setupShortcutsOk") }
|
|
|
|
|
: { state: "problem", detail: t("hotkeysNotLive") },
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
.catch(() => patch("shortcuts", { state: "unknown", detail: t("setupCheckFailed") })),
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
.catch(() => patch("shortcuts", { state: "unknown", detail: t("setupCheckFailed") }));
|
|
|
|
|
|
|
|
|
|
void api
|
|
|
|
|
.getRuntimeInfo()
|
|
|
|
|
.then((info: RuntimeInfo) => {
|
|
|
|
|
const missing = info.components.filter((component) => !component.available);
|
|
|
|
|
const installable = missing.filter((component) => component.installable);
|
|
|
|
|
// Anything missing is the same state; only the fix differs. A platform with
|
|
|
|
|
// no installer still says what is absent rather than "not checked", which
|
|
|
|
|
// would imply the probe never ran.
|
|
|
|
|
patch(
|
|
|
|
|
"tools",
|
|
|
|
|
missing.length === 0
|
|
|
|
|
? { state: "ok", detail: t("setupToolsOk") }
|
|
|
|
|
: {
|
|
|
|
|
state: "problem",
|
|
|
|
|
detail: t("setupToolsMissing", { count: missing.length }),
|
|
|
|
|
action: installable.length
|
|
|
|
|
? { label: t("runtimeOpenPanel"), run: onOpenRuntime }
|
|
|
|
|
: undefined,
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
})
|
|
|
|
|
.catch(() => patch("tools", { state: "unknown", detail: t("setupCheckFailed") }));
|
|
|
|
|
}, [t, onDone, onOpenRuntime]);
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
void refresh();
|
|
|
|
|
}, [refresh]);
|
|
|
|
|
|
|
|
|
|
const icons = {
|
|
|
|
|
capture: ScanLine,
|
|
|
|
|
folders: FolderOpen,
|
|
|
|
|
shortcuts: Keyboard,
|
|
|
|
|
tools: ShieldCheck,
|
|
|
|
|
} as const;
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div className="setup-scrim" role="dialog" aria-modal="true" aria-label={t("setupTitle")}>
|
|
|
|
|
<div className="setup-card">
|
|
|
|
|
<header className="setup-head">
|
|
|
|
|
<div>
|
|
|
|
|
<h2>{t("setupTitle")}</h2>
|
|
|
|
|
<p>{t("setupIntro")}</p>
|
|
|
|
|
</div>
|
|
|
|
|
<button className="setup-refresh" onClick={() => void refresh()}>
|
|
|
|
|
<RefreshCw size={13} />
|
|
|
|
|
{t("setupRecheck")}
|
|
|
|
|
</button>
|
|
|
|
|
</header>
|
|
|
|
|
|
|
|
|
|
<ul className="setup-list">
|
|
|
|
|
{rows.map((row) => {
|
|
|
|
|
const Icon = icons[row.id];
|
|
|
|
|
return (
|
|
|
|
|
<li key={row.id} className={`setup-row is-${row.state}`}>
|
|
|
|
|
<span className="setup-row-icon">
|
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
|
|
|
<Icon size={17} />
|
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
|
|
|
</span>
|
|
|
|
|
<span className="setup-row-body">
|
|
|
|
|
<strong>{t(`setupRow_${row.id}`)}</strong>
|
|
|
|
|
<small>
|
|
|
|
|
{row.state === "checking" ? (
|
|
|
|
|
<>
|
|
|
|
|
<LoaderCircle size={11} className="spin" /> {t("setupChecking")}
|
|
|
|
|
</>
|
|
|
|
|
) : (
|
|
|
|
|
row.detail
|
|
|
|
|
)}
|
|
|
|
|
</small>
|
|
|
|
|
{row.action ? (
|
|
|
|
|
<button className="settings-link" onClick={row.action.run}>
|
|
|
|
|
{row.action.label}
|
|
|
|
|
</button>
|
|
|
|
|
) : null}
|
|
|
|
|
</span>
|
|
|
|
|
<span className={`setup-state is-${row.state}`}>
|
|
|
|
|
{row.state === "ok" ? (
|
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
|
|
|
<Check size={16} />
|
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
|
|
|
) : row.state === "problem" ? (
|
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={16} />
|
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
|
|
|
) : null}
|
|
|
|
|
{t(
|
|
|
|
|
row.state === "ok"
|
|
|
|
|
? "setupStateOk"
|
|
|
|
|
: row.state === "problem"
|
|
|
|
|
? "setupStateProblem"
|
|
|
|
|
: "setupStateUnknown",
|
|
|
|
|
)}
|
|
|
|
|
</span>
|
|
|
|
|
</li>
|
|
|
|
|
);
|
|
|
|
|
})}
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
{checks ? (
|
|
|
|
|
<div className="setup-paths">
|
|
|
|
|
{checks.map((check) => (
|
|
|
|
|
<code key={check.kind}>{check.path}</code>
|
|
|
|
|
))}
|
|
|
|
|
</div>
|
|
|
|
|
) : null}
|
|
|
|
|
|
|
|
|
|
<footer className="setup-foot">
|
|
|
|
|
<span>{t("setupFootnote")}</span>
|
|
|
|
|
<button className="runtime-install" onClick={onDone}>
|
|
|
|
|
{t("setupStart")}
|
|
|
|
|
</button>
|
|
|
|
|
</footer>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|