Skip to content

Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.

test(cli): cover pack/info, and drop the no-op --preview-size

Etienne Lescotada1a0d08107
diff --git a/docs/cli.md b/docs/cli.md
index 0d0f8a598..9e965bcc1 100644
--- a/docs/cli.md
+++ b/docs/cli.md
@@ -129,7 +129,6 @@ openscreen export demo.openscreen --json | while read line; do ...; done
| `--format <mp4\|gif>` | Override the project's stored format |
| `--quality <medium\|good\|source>` | MP4 quality |
| `--gif-fps <15\|20\|25\|30>`, `--gif-size <medium\|large\|original>` | GIF settings |
-| `--preview-size <WxH>` | Reference preview box (default `1280x720`), see below |
| `--auto-zoom` | Add automatic zooms from cursor telemetry before rendering — the same dwell-detection engine as the editor's magic wand. Existing zoom regions are kept; suggestions never overlap them |
| `--audio <file>` | Mix a voiceover file into the MP4 (mp3/wav/m4a — anything Chromium can decode; AIFF is not supported) |
| `--audio-mode <mix\|replace>` | Layer the voiceover over the recording's audio (default `mix`) or replace it |
@@ -148,10 +147,6 @@ when it lives in the app's recordings directory or **next to the project file**.
Keep `.openscreen` files beside their media (or record via the CLI, which uses
the recordings directory).
-**`--preview-size`** is accepted for compatibility but is a no-op on the
-native pipeline: annotation geometry is percentage-based in the scene
-description, so exports no longer depend on any preview box.
-
**No cancel**: the native compositor has no abort mechanism — killing the CLI
mid-export stops output but the render worker runs until process exit.
diff --git a/electron/cli/args.test.ts b/electron/cli/args.test.ts
index e33acb672..7f0b18e09 100644
--- a/electron/cli/args.test.ts
+++ b/electron/cli/args.test.ts
@@ -45,8 +45,6 @@ describe("parseCliArgs", () => {
"out.gif",
"--gif-fps",
"20",
- "--preview-size",
- "1600x900",
"--json",
]);
expect(cmd).toMatchObject({
@@ -54,8 +52,6 @@ describe("parseCliArgs", () => {
outPath: inCwd("out.gif"),
format: "gif",
gifFrameRate: 20,
- previewWidth: 1600,
- previewHeight: 900,
json: true,
});
});
diff --git a/electron/cli/args.ts b/electron/cli/args.ts
index 56fea1ee5..0dad8d07c 100644
--- a/electron/cli/args.ts
+++ b/electron/cli/args.ts
@@ -61,7 +61,6 @@ Export options:
--gif-fps <15|20|25|30> GIF frame rate (default: from project)
--gif-size <medium|large|original>
GIF size preset (default: from project)
- --preview-size <WxH> Reference preview box for annotation scaling (default 1280x720)
--auto-zoom Add automatic zooms from cursor telemetry (editor's magic wand)
--audio <file> Mix a voiceover audio file into the MP4 (mp3/wav/m4a)
--audio-mode <mix|replace>
@@ -150,8 +149,6 @@ function parseExport(args: string[], cwd: string): CliCommand {
quality: null,
gifFrameRate: null,
gifSizePreset: null,
- previewWidth: null,
- previewHeight: null,
autoZoom: false,
audioPath: null,
audioMode: "mix",
@@ -205,20 +202,6 @@ function parseExport(args: string[], cwd: string): CliCommand {
i = next;
break;
}
- case "--preview-size": {
- const [value, next] = takeValue(args, i, arg);
- const match = /^(\d+)x(\d+)$/.exec(value);
- if (!match) throw new Error(`--preview-size must look like 1280x720, got "${value}"`);
- const previewWidth = Number(match[1]);
- const previewHeight = Number(match[2]);
- if (previewWidth <= 0 || previewHeight <= 0) {
- throw new Error(`--preview-size dimensions must be positive, got "${value}"`);
- }
- request.previewWidth = previewWidth;
- request.previewHeight = previewHeight;
- i = next;
- break;
- }
case "--auto-zoom":
request.autoZoom = true;
break;
diff --git a/electron/cli/cliMain.ts b/electron/cli/cliMain.ts
index 611c3cae2..b5f02afdf 100644
--- a/electron/cli/cliMain.ts
+++ b/electron/cli/cliMain.ts
@@ -17,6 +17,7 @@ import { getSelectedDesktopSource, registerIpcHandlers } from "../ipc/handlers";
import { registerSttIpc } from "../stt";
import { ASSET_BASE_URL_ARG } from "../windows";
import { CLI_USAGE, type CliCommand } from "./args";
+import { runInfoCommand, runPackCommand } from "./projectCommands";
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const VITE_DEV_SERVER_URL = process.env["VITE_DEV_SERVER_URL"];
@@ -209,169 +210,8 @@ function setupRecordStopSignals(stop: (reason: string) => void): void {
}
}
-interface PackedProjectData {
- version?: number;
- media?: { screenVideoPath?: string; webcamVideoPath?: string; cursorCaptureMode?: string };
- videoPath?: string;
- editor?: Record<string, unknown>;
-}
-
-/** Copies a project and everything it references into one portable folder. */
-async function runPackCommand(projectPath: string, outDir: string, json: boolean): Promise<number> {
- const emit = (message: string) => {
- if (!json) safeWrite(process.stdout, `${message}\n`);
- };
-
- const raw = await fs.readFile(projectPath, "utf8");
- const data = JSON.parse(raw) as PackedProjectData;
- const media = data.media ?? (data.videoPath ? { screenVideoPath: data.videoPath } : undefined);
- const screenVideoPath = media?.screenVideoPath;
- if (!screenVideoPath) {
- throw new Error("Project file does not reference a screen video");
- }
-
- const projectDir = path.dirname(path.resolve(projectPath));
- const resolveSource = async (mediaPath: string): Promise<string> => {
- const exists = await fs
- .stat(mediaPath)
- .then((stats) => stats.isFile())
- .catch(() => false);
- if (exists) return mediaPath;
- const sibling = path.join(projectDir, path.basename(mediaPath));
- const siblingExists = await fs
- .stat(sibling)
- .then((stats) => stats.isFile())
- .catch(() => false);
- if (siblingExists) return sibling;
- throw new Error(`Referenced media not found: ${mediaPath}`);
- };
-
- await fs.mkdir(outDir, { recursive: true });
-
- const copied: string[] = [];
- const copyIn = async (sourcePath: string): Promise<string> => {
- const ext = path.extname(sourcePath);
- const stem = path.basename(sourcePath, ext);
- let destination = path.join(outDir, stem + ext);
- // Screen and webcam can share a basename across directories; don't overwrite.
- for (let n = 1; copied.includes(destination); n++) {
- destination = path.join(outDir, `${stem}-${n}${ext}`);
- }
- if (path.resolve(sourcePath) !== path.resolve(destination)) {
- await fs.copyFile(sourcePath, destination);
- }
- copied.push(destination);
- return destination;
- };
-
- const screenSource = await resolveSource(screenVideoPath);
- const newScreenPath = await copyIn(screenSource);
-
- let newWebcamPath: string | undefined;
- if (media.webcamVideoPath) {
- newWebcamPath = await copyIn(await resolveSource(media.webcamVideoPath));
- }
-
- // Cursor telemetry sidecar sits at "<video path>.cursor.json".
- const cursorSidecar = `${screenSource}.cursor.json`;
- const hasCursorData = await fs
- .stat(cursorSidecar)
- .then((stats) => stats.isFile())
- .catch(() => false);
- if (hasCursorData) {
- await copyIn(cursorSidecar);
- }
-
- const packedProject: PackedProjectData = {
- ...data,
- media: {
- ...media,
- screenVideoPath: newScreenPath,
- ...(newWebcamPath ? { webcamVideoPath: newWebcamPath } : {}),
- },
- };
- delete packedProject.videoPath;
- const packedProjectPath = path.join(outDir, path.basename(projectPath));
- await fs.writeFile(packedProjectPath, JSON.stringify(packedProject, null, 2), "utf8");
-
- if (json) {
- safeWrite(
- process.stdout,
- `${JSON.stringify({
- event: "done",
- success: true,
- projectPath: packedProjectPath,
- files: [packedProjectPath, ...copied],
- cursorData: hasCursorData,
- })}\n`,
- );
- } else {
- emit(`Packed project → ${packedProjectPath}`);
- for (const file of copied) {
- emit(` + ${path.basename(file)}`);
- }
- if (!hasCursorData) {
- emit(" (no cursor telemetry sidecar found)");
- }
- emit(
- "The folder is self-contained: if the stored paths go stale after moving it, the loader falls back to files next to the project.",
- );
- }
- return 0;
-}
-
-async function runInfoCommand(projectPath: string, json: boolean): Promise<number> {
- const raw = await fs.readFile(projectPath, "utf8");
- const data = JSON.parse(raw) as {
- version?: number;
- media?: { screenVideoPath?: string; webcamVideoPath?: string; cursorCaptureMode?: string };
- videoPath?: string;
- editor?: Record<string, unknown>;
- };
- const editor = data.editor ?? {};
- const count = (key: string) =>
- Array.isArray(editor[key]) ? (editor[key] as unknown[]).length : 0;
- const screenVideoPath = data.media?.screenVideoPath ?? data.videoPath ?? null;
- const mediaExists = screenVideoPath
- ? await fs
- .access(screenVideoPath)
- .then(() => true)
- .catch(() => false)
- : false;
-
- const summary = {
- projectPath,
- version: data.version ?? null,
- screenVideoPath,
- screenVideoExists: mediaExists,
- webcamVideoPath: data.media?.webcamVideoPath ?? null,
- cursorCaptureMode: data.media?.cursorCaptureMode ?? null,
- exportFormat: (editor.exportFormat as string) ?? null,
- exportQuality: (editor.exportQuality as string) ?? null,
- aspectRatio: (editor.aspectRatio as string) ?? null,
- zoomRegions: count("zoomRegions"),
- trimRegions: count("trimRegions"),
- speedRegions: count("speedRegions"),
- annotationRegions: count("annotationRegions"),
- };
-
- if (json) {
- safeWrite(process.stdout, `${JSON.stringify(summary)}\n`);
- } else {
- safeWrite(
- process.stdout,
- [
- `Project: ${summary.projectPath} (version ${summary.version ?? "?"})`,
- `Video: ${summary.screenVideoPath ?? "(none)"}${mediaExists ? "" : " [MISSING]"}`,
- `Webcam: ${summary.webcamVideoPath ?? "(none)"}`,
- `Cursor: ${summary.cursorCaptureMode ?? "(unknown)"}`,
- `Export: ${summary.exportFormat ?? "?"} / ${summary.exportQuality ?? "?"} / ${summary.aspectRatio ?? "?"}`,
- `Timeline: ${summary.zoomRegions} zooms, ${summary.trimRegions} trims, ${summary.speedRegions} speed regions, ${summary.annotationRegions} annotations`,
- ].join("\n") + "\n",
- );
- }
- return summary.screenVideoPath && !mediaExists ? 1 : 0;
-}
+/** Both file-only commands write through the same EPIPE-safe stdout writer. */
+const writeStdout = (text: string) => safeWrite(process.stdout, text);
export function runCli(command: CliCommand): void {
if (command.kind === "help") {
@@ -449,7 +289,7 @@ export function runCli(command: CliCommand): void {
.whenReady()
.then(async () => {
if (command.kind === "info") {
- const code = await runInfoCommand(command.projectPath, command.json === true);
+ const code = await runInfoCommand(command.projectPath, command.json === true, writeStdout);
app.exit(code);
return;
}
@@ -459,6 +299,7 @@ export function runCli(command: CliCommand): void {
command.projectPath,
command.outDir,
command.json === true,
+ writeStdout,
);
app.exit(code);
return;
diff --git a/electron/cli/projectCommands.test.ts b/electron/cli/projectCommands.test.ts
new file mode 100644
index 000000000..0748ad44d
--- /dev/null
+++ b/electron/cli/projectCommands.test.ts
@@ -0,0 +1,139 @@
+import fs from "node:fs/promises";
+import os from "node:os";
+import path from "node:path";
+import { afterEach, beforeEach, describe, expect, it } from "vitest";
+import { type PackedProjectData, runInfoCommand, runPackCommand } from "./projectCommands";
+
+let root = "";
+
+/** Absolute path inside the throwaway root, parents created. */
+async function make(relative: string, contents = "video-bytes"): Promise<string> {
+ const target = path.join(root, relative);
+ await fs.mkdir(path.dirname(target), { recursive: true });
+ await fs.writeFile(target, contents, "utf8");
+ return target;
+}
+
+async function writeProject(relative: string, data: PackedProjectData): Promise<string> {
+ return make(relative, JSON.stringify(data));
+}
+
+const readProject = async (file: string): Promise<PackedProjectData> =>
+ JSON.parse(await fs.readFile(file, "utf8"));
+
+/** Collects CLI output instead of writing to stdout. */
+function recorder() {
+ const chunks: string[] = [];
+ const write = (text: string) => {
+ chunks.push(text);
+ };
+ return { write, text: () => chunks.join("") };
+}
+
+beforeEach(async () => {
+ root = await fs.mkdtemp(path.join(os.tmpdir(), "os-cli-pack-"));
+});
+
+afterEach(async () => {
+ await fs.rm(root, { recursive: true, force: true });
+});
+
+describe("runPackCommand", () => {
+ it("keeps screen and webcam apart when they share a basename", async () => {
+ const screen = await make("rec/a/clip.mp4", "screen");
+ const webcam = await make("rec/b/clip.mp4", "webcam");
+ const project = await writeProject("demo.openscreen", {
+ version: 1,
+ media: { screenVideoPath: screen, webcamVideoPath: webcam },
+ });
+ const outDir = path.join(root, "packed");
+
+ const out = recorder();
+ expect(await runPackCommand(project, outDir, false, out.write)).toBe(0);
+
+ const packed = await readProject(path.join(outDir, "demo.openscreen"));
+ expect(packed.media?.screenVideoPath).not.toBe(packed.media?.webcamVideoPath);
+ await expect(fs.readFile(packed.media?.screenVideoPath ?? "", "utf8")).resolves.toBe("screen");
+ await expect(fs.readFile(packed.media?.webcamVideoPath ?? "", "utf8")).resolves.toBe("webcam");
+ });
+
+ it("copies the cursor sidecar and drops the legacy videoPath", async () => {
+ const screen = await make("rec/clip.mp4", "screen");
+ await make("rec/clip.mp4.cursor.json", "[]");
+ const project = await writeProject("demo.openscreen", { version: 1, videoPath: screen });
+ const outDir = path.join(root, "packed");
+
+ const out = recorder();
+ expect(await runPackCommand(project, outDir, true, out.write)).toBe(0);
+
+ const packed = await readProject(path.join(outDir, "demo.openscreen"));
+ expect(packed.videoPath).toBeUndefined();
+ expect(packed.media?.screenVideoPath).toBe(path.join(outDir, "clip.mp4"));
+ await expect(fs.readFile(path.join(outDir, "clip.mp4.cursor.json"), "utf8")).resolves.toBe(
+ "[]",
+ );
+ expect(JSON.parse(out.text())).toMatchObject({ event: "done", cursorData: true });
+ });
+
+ it("falls back to media sitting next to the project when the stored path is stale", async () => {
+ await make("moved/clip.mp4", "screen");
+ const project = await writeProject("moved/demo.openscreen", {
+ version: 1,
+ media: { screenVideoPath: path.join(root, "gone", "clip.mp4") },
+ });
+ const outDir = path.join(root, "packed");
+
+ const out = recorder();
+ expect(await runPackCommand(project, outDir, false, out.write)).toBe(0);
+ await expect(fs.readFile(path.join(outDir, "clip.mp4"), "utf8")).resolves.toBe("screen");
+ });
+
+ it("fails when the referenced media is nowhere to be found", async () => {
+ const project = await writeProject("demo.openscreen", {
+ version: 1,
+ media: { screenVideoPath: path.join(root, "gone", "clip.mp4") },
+ });
+
+ const out = recorder();
+ await expect(
+ runPackCommand(project, path.join(root, "packed"), false, out.write),
+ ).rejects.toThrow(/Referenced media not found/);
+ });
+});
+
+describe("runInfoCommand", () => {
+ it("exits 1 when the project's video is missing, 0 when it is there", async () => {
+ const missing = await writeProject("missing.openscreen", {
+ version: 1,
+ media: { screenVideoPath: path.join(root, "gone", "clip.mp4") },
+ });
+ const present = await writeProject("present.openscreen", {
+ version: 1,
+ media: { screenVideoPath: await make("rec/clip.mp4") },
+ });
+
+ const out = recorder();
+ expect(await runInfoCommand(missing, false, out.write)).toBe(1);
+ expect(out.text()).toContain("[MISSING]");
+ expect(await runInfoCommand(present, false, out.write)).toBe(0);
+ });
+
+ it("counts timeline regions in --json mode", async () => {
+ const project = await writeProject("demo.openscreen", {
+ version: 1,
+ media: { screenVideoPath: await make("rec/clip.mp4") },
+ editor: { zoomRegions: [{}, {}], trimRegions: [{}], exportFormat: "mp4" },
+ });
+
+ const out = recorder();
+ expect(await runInfoCommand(project, true, out.write)).toBe(0);
+ expect(JSON.parse(out.text())).toMatchObject({
+ zoomRegions: 2,
+ trimRegions: 1,
+ speedRegions: 0,
+ annotationRegions: 0,
+ exportFormat: "mp4",
+ screenVideoExists: true,
+ });
+ });
+});
diff --git a/electron/cli/projectCommands.ts b/electron/cli/projectCommands.ts
new file mode 100644
index 000000000..30e211e8c
--- /dev/null
+++ b/electron/cli/projectCommands.ts
@@ -0,0 +1,174 @@
+// The two CLI commands that only touch the project file and its media:
+// `openscreen pack` and `openscreen info`. They live outside cliMain.ts so they
+// carry no `electron` import and stay unit-testable — the caller passes the
+// writer, so nothing here knows about process.stdout either.
+
+import fs from "node:fs/promises";
+import path from "node:path";
+
+/** Writes one already-newline-terminated chunk of CLI output. */
+export type CliWriter = (text: string) => void;
+
+export interface PackedProjectData {
+ version?: number;
+ media?: { screenVideoPath?: string; webcamVideoPath?: string; cursorCaptureMode?: string };
+ videoPath?: string;
+ editor?: Record<string, unknown>;
+}
+
+const isFile = (candidate: string): Promise<boolean> =>
+ fs
+ .stat(candidate)
+ .then((stats) => stats.isFile())
+ .catch(() => false);
+
+/** Copies a project and everything it references into one portable folder. */
+export async function runPackCommand(
+ projectPath: string,
+ outDir: string,
+ json: boolean,
+ out: CliWriter,
+): Promise<number> {
+ const emit = (message: string) => {
+ if (!json) out(`${message}\n`);
+ };
+
+ const raw = await fs.readFile(projectPath, "utf8");
+ const data = JSON.parse(raw) as PackedProjectData;
+ const media = data.media ?? (data.videoPath ? { screenVideoPath: data.videoPath } : undefined);
+ const screenVideoPath = media?.screenVideoPath;
+ if (!screenVideoPath) {
+ throw new Error("Project file does not reference a screen video");
+ }
+
+ const projectDir = path.dirname(path.resolve(projectPath));
+ const resolveSource = async (mediaPath: string): Promise<string> => {
+ if (await isFile(mediaPath)) return mediaPath;
+ // Moved project: the stored absolute path is stale but the media travelled
+ // with the .openscreen file. Same rule as the loader's sibling fallback.
+ const sibling = path.join(projectDir, path.basename(mediaPath));
+ if (await isFile(sibling)) return sibling;
+ throw new Error(`Referenced media not found: ${mediaPath}`);
+ };
+
+ await fs.mkdir(outDir, { recursive: true });
+
+ const copied: string[] = [];
+ const copyIn = async (sourcePath: string): Promise<string> => {
+ const ext = path.extname(sourcePath);
+ const stem = path.basename(sourcePath, ext);
+ let destination = path.join(outDir, stem + ext);
+ // Screen and webcam can share a basename across directories; don't overwrite.
+ for (let n = 1; copied.includes(destination); n++) {
+ destination = path.join(outDir, `${stem}-${n}${ext}`);
+ }
+ if (path.resolve(sourcePath) !== path.resolve(destination)) {
+ await fs.copyFile(sourcePath, destination);
+ }
+ copied.push(destination);
+ return destination;
+ };
+
+ const screenSource = await resolveSource(screenVideoPath);
+ const newScreenPath = await copyIn(screenSource);
+
+ let newWebcamPath: string | undefined;
+ if (media.webcamVideoPath) {
+ newWebcamPath = await copyIn(await resolveSource(media.webcamVideoPath));
+ }
+
+ // Cursor telemetry sidecar sits at "<video path>.cursor.json".
+ const cursorSidecar = `${screenSource}.cursor.json`;
+ const hasCursorData = await isFile(cursorSidecar);
+ if (hasCursorData) {
+ await copyIn(cursorSidecar);
+ }
+
+ const packedProject: PackedProjectData = {
+ ...data,
+ media: {
+ ...media,
+ screenVideoPath: newScreenPath,
+ ...(newWebcamPath ? { webcamVideoPath: newWebcamPath } : {}),
+ },
+ };
+ delete packedProject.videoPath;
+ const packedProjectPath = path.join(outDir, path.basename(projectPath));
+ await fs.writeFile(packedProjectPath, JSON.stringify(packedProject, null, 2), "utf8");
+
+ if (json) {
+ out(
+ `${JSON.stringify({
+ event: "done",
+ success: true,
+ projectPath: packedProjectPath,
+ files: [packedProjectPath, ...copied],
+ cursorData: hasCursorData,
+ })}\n`,
+ );
+ } else {
+ emit(`Packed project → ${packedProjectPath}`);
+ for (const file of copied) {
+ emit(` + ${path.basename(file)}`);
+ }
+ if (!hasCursorData) {
+ emit(" (no cursor telemetry sidecar found)");
+ }
+ emit(
+ "The folder is self-contained: if the stored paths go stale after moving it, the loader falls back to files next to the project.",
+ );
+ }
+ return 0;
+}
+
+/** Prints what a project references and whether its media is still reachable. */
+export async function runInfoCommand(
+ projectPath: string,
+ json: boolean,
+ out: CliWriter,
+): Promise<number> {
+ const raw = await fs.readFile(projectPath, "utf8");
+ const data = JSON.parse(raw) as PackedProjectData;
+ const editor = data.editor ?? {};
+ const count = (key: string) =>
+ Array.isArray(editor[key]) ? (editor[key] as unknown[]).length : 0;
+ const screenVideoPath = data.media?.screenVideoPath ?? data.videoPath ?? null;
+ const mediaExists = screenVideoPath
+ ? await fs
+ .access(screenVideoPath)
+ .then(() => true)
+ .catch(() => false)
+ : false;
+
+ const summary = {
+ projectPath,
+ version: data.version ?? null,
+ screenVideoPath,
+ screenVideoExists: mediaExists,
+ webcamVideoPath: data.media?.webcamVideoPath ?? null,
+ cursorCaptureMode: data.media?.cursorCaptureMode ?? null,
+ exportFormat: (editor.exportFormat as string) ?? null,
+ exportQuality: (editor.exportQuality as string) ?? null,
+ aspectRatio: (editor.aspectRatio as string) ?? null,
+ zoomRegions: count("zoomRegions"),
+ trimRegions: count("trimRegions"),
+ speedRegions: count("speedRegions"),
+ annotationRegions: count("annotationRegions"),
+ };
+
+ if (json) {
+ out(`${JSON.stringify(summary)}\n`);
+ } else {
+ out(
+ [
+ `Project: ${summary.projectPath} (version ${summary.version ?? "?"})`,
+ `Video: ${summary.screenVideoPath ?? "(none)"}${mediaExists ? "" : " [MISSING]"}`,
+ `Webcam: ${summary.webcamVideoPath ?? "(none)"}`,
+ `Cursor: ${summary.cursorCaptureMode ?? "(unknown)"}`,
+ `Export: ${summary.exportFormat ?? "?"} / ${summary.exportQuality ?? "?"} / ${summary.aspectRatio ?? "?"}`,
+ `Timeline: ${summary.zoomRegions} zooms, ${summary.trimRegions} trims, ${summary.speedRegions} speed regions, ${summary.annotationRegions} annotations`,
+ ].join("\n") + "\n",
+ );
+ }
+ return summary.screenVideoPath && !mediaExists ? 1 : 0;
+}
diff --git a/src/cli/CliExportRunner.tsx b/src/cli/CliExportRunner.tsx
index 2b42da58e..f9c57c682 100644
--- a/src/cli/CliExportRunner.tsx
+++ b/src/cli/CliExportRunner.tsx
@@ -180,13 +180,6 @@ async function runExport(request: CliExportRequest): Promise<CliDoneResult> {
const gifSizePreset = request.gifSizePreset ?? editor.gifSizePreset;
const outPath =
request.outPath ?? replaceExtension(request.projectPath, format === "gif" ? ".gif" : ".mp4");
- if (request.previewWidth !== null || request.previewHeight !== null) {
- window.electronAPI.cliLog(
- "info",
- "--preview-size is a no-op on the native pipeline (annotation geometry is percentage-based) and kept only for CLI compatibility",
- );
- }
-
// Cursor telemetry: only needed to compute --auto-zoom suggestions. The
// native compositor discovers the `<video>.cursor.json` sidecar itself.
let cursorTelemetry: CursorTelemetryPoint[] = [];
diff --git a/src/lib/cliContracts.ts b/src/lib/cliContracts.ts
index 111f2ed2a..186613a85 100644
--- a/src/lib/cliContracts.ts
+++ b/src/lib/cliContracts.ts
@@ -23,8 +23,6 @@ export interface CliExportRequest {
* same way the editor's on-screen preview does. The composition is fitted
* into this box, mirroring the editor layout. Defaults to 1280x720.
*/
- previewWidth: number | null;
- previewHeight: number | null;
/**
* Add automatic zoom regions derived from cursor-dwell telemetry (same
* suggestion engine as the editor's magic wand) before rendering. Existing