Skip to content

Add the screen recorder, moved from SpyDE - #42

Merged
CSSFrancis merged 1 commit into
mainfrom
feat/screen-recorder
Nov 16, 2026
Merged

CSSFrancis merged 1 commit into
mainfrom
feat/screen-recorder

Conversation

@CSSFrancis

@CSSFrancis CSSFrancis commented Nov 15, 2026 •

Copy link
Copy Markdown
Member

SpyDE's Help → Record Screen, moved into the shell so every app gets it (Autopilot is the first to wire it).

  • main: registerScreenRecorder(win) answers getDisplayMedia with the window's own frame: no source picker, nothing outside the app in the file, no macOS Screen Recording prompt. The IPC is in screenRecorderCore.ts with Electron and the disk injected, so it runs under node --test.
  • preload: recorder.start(format) / chunk(bytes) / stop() on <appId>:record-*. The path stays in main, so chunks only ever land in the file the user named.
  • renderer: <ScreenRecorder recorder={window.<app>.recorder} style?> plus toggleScreenRecording(), to be called from a real click (Chromium needs user activation). style moves the pill for an app whose title bar center is taken.

Differences from SpyDE's copy:

  • A recording that never got a byte (the capture failed after the save dialog) removes its empty file.
  • Stops on its own if the capture track ends.
  • Async file writes, and the format is validated in main.
  • Colors come from the shell's theme tokens.

SpyDE's own copy can be dropped once this is released (a follow-up SpyDE PR).

Checks run: npm run typecheck, npm run test:unit (201 pass, 1 skipped; 12 new recorder tests). Autopilot's e2e (screen-recorder.spec.ts, Autopilot's companion PR) records 4 s through this branch and checks the file on disk.

https://claude.ai/code/session_01DzXsKAUJSM4XYpqqzrcuV5

An app records its own window to a video file: registerScreenRecorder(win)
in main answers the display-media request with the window itself (no
picker, nothing outside the app), the preload bridge's recorder names the
file and appends chunks, and <ScreenRecorder> with toggleScreenRecording()
drives it and shows the REC pill. A recording that never got a byte leaves
no empty file.

Claude-Session: https://claude.ai/code/session_01DzXsKAUJSM4XYpqqzrcuV5
@CSSFrancis
CSSFrancis merged commit fdc370a into main Nov 16, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant