Skip to content

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

feat(cli): finer milestones across the window-setup gap

EtienneLescot374226b859f3
diff --git a/electron/cli/cliMain.ts b/electron/cli/cliMain.ts
index f9a91742b..dde00b66d 100644
--- a/electron/cli/cliMain.ts
+++ b/electron/cli/cliMain.ts
@@ -342,7 +342,11 @@ export function runCli(command: CliCommand): void {
return;
}
- await fs.mkdir(path.join(app.getPath("userData"), "recordings"), { recursive: true });
+ milestone("resolving userData path");
+ const userDataDir = app.getPath("userData");
+ milestone(`userData = ${userDataDir}`);
+ await fs.mkdir(path.join(userDataDir, "recordings"), { recursive: true });
+ milestone("recordings directory ready");
// Media/screen permissions for the renderer (mic metering, future browser
// capture paths). Mirrors the GUI allowlist.
@@ -380,6 +384,7 @@ export function runCli(command: CliCommand): void {
},
{ useSystemPicker: false },
);
+ milestone("session permission handlers registered");
if (command.kind === "record" && command.mic && process.platform === "darwin") {
const micStatus = systemPreferences.getMediaAccessStatus("microphone");
@@ -388,12 +393,16 @@ export function runCli(command: CliCommand): void {
}
}
+ milestone("media access checked");
+
let cliWindow: BrowserWindow | null = null;
registerAppHandlersForCli(() => cliWindow);
+ milestone("app handlers registered");
// Speech-to-text backs the captions command; registered by the GUI boot
// path (main.ts) rather than registerIpcHandlers.
registerSttIpc(ipcMain);
+ milestone("stt ipc registered");
// Registered by the GUI boot path (main.ts) rather than registerIpcHandlers;
// the renderer's i18n init invokes it unconditionally.
@@ -494,6 +503,7 @@ export function runCli(command: CliCommand): void {
setupRecordStopSignals(stop);
}
+ milestone("cli ipc registered; resolving window type");
const windowType = {
export: "cli-export",
record: "cli-record",