Skip to content

The truly free, open-source, local-first, cross-platform CapCut replacement. Scriptable through a JSON-RPC API & MCP.

updates

Jareer8fe2c6e52831
diff --git a/BUILD.md b/BUILD.md
index b76689d4..942052f9 100644
--- a/BUILD.md
+++ b/BUILD.md
@@ -17,10 +17,18 @@ You can work on the engine without ever touching the desktop app.
| **FFmpeg** | 7+ | Runtime dependency — the engine shells out to it | `ffmpeg -version` |
| **MSVC Build Tools** | 2022 | Windows only; Rust's default toolchain links with it | — |
-FFmpeg must be on `PATH` as both `ffmpeg` **and** `ffprobe`. WolfCut does not
-bundle it. Without it the app starts fine and then fails on first import with
+For **development**, FFmpeg must be on `PATH` as both `ffmpeg` **and**
+`ffprobe`. Without it the app starts fine and then fails on first import with
"could not run `ffprobe` - is FFmpeg installed and on PATH?".
+**Packaged builds ship their own FFmpeg** and never touch `PATH` - a `.app`
+launched from Finder does not see a shell's `PATH` at all, so relying on it
+there is a guaranteed failure. Stage the pair in `desktop/src-tauri/ffmpeg/`
+before `npm run app:build`: on Windows, download the artifact from
+`.github/workflows/ffmpeg.yml`; on macOS, build the same cut-down FFmpeg
+locally with that workflow's configure line (static x264, system frameworks
+only - verify with `otool -L`).
+
```
winget install Gyan.FFmpeg # Windows
brew install ffmpeg # macOS
diff --git a/desktop/src/components/ErrorNotice.tsx b/desktop/src/components/ErrorNotice.tsx
new file mode 100644
index 00000000..5c9587eb
--- /dev/null
+++ b/desktop/src/components/ErrorNotice.tsx
@@ -0,0 +1,72 @@
+import { useEffect, useRef, useState } from "react";
+
+import { Icon } from "./Icon";
+
+/**
+ * The standard error strip.
+ *
+ * The text is selectable and there is always a copy button, because the main
+ * thing anyone does with an error message is put it somewhere else - a bug
+ * report, a search box, a chat. The app disables selection globally, so a
+ * plain <p> here would be a message you can read but not quote.
+ */
+export function ErrorNotice({
+ message,
+ onDismiss,
+ className = "",
+}: {
+ message: string;
+ /** Rendered as a close button when given; omit for errors that clear themselves. */
+ onDismiss?: () => void;
+ className?: string;
+}) {
+ const [copied, setCopied] = useState(false);
+ const timer = useRef<number | undefined>(undefined);
+ useEffect(() => () => window.clearTimeout(timer.current), []);
+
+ const copy = async () => {
+ try {
+ await navigator.clipboard.writeText(message);
+ } catch {
+ // WebKit can refuse the async API; the selection route still works.
+ const node = document.createElement("textarea");
+ node.value = message;
+ document.body.appendChild(node);
+ node.select();
+ document.execCommand("copy");
+ node.remove();
+ }
+ setCopied(true);
+ window.clearTimeout(timer.current);
+ timer.current = window.setTimeout(() => setCopied(false), 1500);
+ };
+
+ return (
+ <div
+ className={`flex items-start gap-2 rounded-lg border border-danger bg-danger-soft px-2 py-1.5 ${className}`}
+ >
+ <p className="selectable min-w-0 flex-1 wrap-break-word font-technical text-[10px] leading-snug text-danger">
+ {message}
+ </p>
+ <button
+ type="button"
+ title={copied ? "Copied" : "Copy error"}
+ aria-label="Copy error"
+ onClick={() => void copy()}
+ className="shrink-0 cursor-pointer text-danger opacity-70 hover:opacity-100"
+ >
+ <Icon name={copied ? "check" : "copy"} size={12} />
+ </button>
+ {onDismiss && (
+ <button
+ type="button"
+ aria-label="Dismiss"
+ onClick={onDismiss}
+ className="shrink-0 cursor-pointer text-danger opacity-70 hover:opacity-100"
+ >
+ <Icon name="close" size={12} />
+ </button>
+ )}
+ </div>
+ );
+}
diff --git a/desktop/src/components/ExportDialog.tsx b/desktop/src/components/ExportDialog.tsx
index b82c4331..4ddf820c 100644
--- a/desktop/src/components/ExportDialog.tsx
+++ b/desktop/src/components/ExportDialog.tsx
@@ -5,6 +5,7 @@ import { save } from "@tauri-apps/plugin-dialog";
import type { ExportClip, ExportProgress } from "../lib/engine";
import { exportProject, onExportProgress } from "../lib/engine";
import { shortDuration } from "../lib/time";
+import { ErrorNotice } from "./ErrorNotice";
import { Icon } from "./Icon";
/** Quality presets, in the terms a person picking one actually thinks in. */
@@ -169,10 +170,7 @@ export function ExportDialog({
</div>
{phase.kind === "failed" && (
- <p className="mb-4 rounded-lg border border-danger bg-danger-soft px-3 py-2
- font-technical text-[11px] leading-snug text-danger">
- {phase.message}
- </p>
+ <ErrorNotice message={phase.message} className="mb-4" />
)}
<button
diff --git a/desktop/src/components/Icon.tsx b/desktop/src/components/Icon.tsx
index 4e5ef67a..60e177e3 100644
--- a/desktop/src/components/Icon.tsx
+++ b/desktop/src/components/Icon.tsx
@@ -225,6 +225,12 @@ const GLYPHS = {
),
moon: <path d="M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8Z" />,
check: <path d="m4 12.5 5 5 11-11" />,
+ copy: (
+ <>
+ <rect x="9" y="9" width="12" height="12" rx="2" />
+ <path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" />
+ </>
+ ),
chevronDown: <path d="m6 9 6 6 6-6" />,
chevronRight: <path d="m9 6 6 6-6 6" />,
search: (
diff --git a/desktop/src/components/MediaBin.tsx b/desktop/src/components/MediaBin.tsx
index f0e7ef5b..8dfbd937 100644
--- a/desktop/src/components/MediaBin.tsx
+++ b/desktop/src/components/MediaBin.tsx
@@ -7,6 +7,7 @@ import { subscribeAssets } from "../lib/assets";
import type { MediaItem } from "../lib/project";
import { themeColor } from "../lib/theme";
import { shortDuration } from "../lib/time";
+import { ErrorNotice } from "./ErrorNotice";
import { Icon } from "./Icon";
import { Menu } from "./Menu";
import { Empty, Panel } from "./Panel";
@@ -197,21 +198,7 @@ export function MediaBin({
</button>
</div>
- {error && (
- <div className="mx-2 mb-2 flex items-start gap-2 rounded-lg border border-danger bg-danger-soft px-2 py-1.5">
- <p className="min-w-0 flex-1 wrap-break-word font-technical text-[10px] leading-snug text-danger">
- {error}
- </p>
- <button
- type="button"
- aria-label="Dismiss"
- onClick={onDismissError}
- className="shrink-0 cursor-pointer text-danger hover:text-danger"
- >
- <Icon name="close" size={12} />
- </button>
- </div>
- )}
+ {error && <ErrorNotice message={error} onDismiss={onDismissError} className="mx-2 mb-2" />}
{visible.length === 0 ? (
<Empty
diff --git a/desktop/src/components/StartScreen.tsx b/desktop/src/components/StartScreen.tsx
index 006a01e2..fee77c69 100644
--- a/desktop/src/components/StartScreen.tsx
+++ b/desktop/src/components/StartScreen.tsx
@@ -10,6 +10,7 @@ import {
recentProjects,
type ProjectInfo,
} from "../lib/engine";
+import { ErrorNotice } from "./ErrorNotice";
import { relativeTime } from "../lib/time";
import { Icon } from "./Icon";
@@ -208,9 +209,7 @@ export function StartScreen({ onCreate }: { onCreate: (session: ProjectSession)
</p>
</Field>
- {error && (
- <p className="mt-6 text-[12px] leading-relaxed text-danger">{error}</p>
- )}
+ {error && <ErrorNotice message={error} onDismiss={() => setError(null)} className="mt-6" />}
<div className="mt-10 flex items-center gap-4">
<button