Skip to content

feat(recording): capture all displays simultaneously#234

Open
couragefalco wants to merge 2 commits intoJerryZLiu:mainfrom
couragefalco:feat/multi-display-recording
Open

feat(recording): capture all displays simultaneously#234
couragefalco wants to merge 2 commits intoJerryZLiu:mainfrom
couragefalco:feat/multi-display-recording

Conversation

@couragefalco
Copy link
Copy Markdown

Summary

  • Captures all connected displays on every screenshot tick instead of only the display under the mouse cursor
  • Each display produces its own JPEG per interval, using the existing nextScreenshotURL() timestamp-based naming (millisecond precision avoids collisions)
  • The ActiveDisplayTracker is preserved so the "active" display metadata still reflects where the user is working
  • No database schema changes needed - each screenshot is a separate row as before

Motivation

On multi-monitor setups, the current behavior only records whichever screen the mouse is on. This means significant portions of the workday (code on one screen, browser/docs on the other) go unrecorded and don't appear in the timeline.

Changes

ScreenRecorder.swift (only file changed):

  • Added cachedDisplays array alongside existing cachedDisplay
  • setupCapture() now caches all displays from SCShareableContent
  • captureScreenshot() iterates over all displays instead of just one
  • refreshDisplay() updates the full display list
  • stop() clears the display array

Storage impact

Screenshot count scales linearly with display count (2x for dual monitors). The existing storageLimitRecordingsBytes setting still applies and will naturally limit total storage.

Test plan

  • Build and run with single monitor - verify behavior unchanged
  • Connect second monitor - verify both screens produce screenshots
  • Disconnect monitor mid-recording - verify no crash, graceful fallback
  • Check storage usage stays within configured limits

🤖 Generated with Claude Code

couragefalco and others added 2 commits March 13, 2026 17:45
…the active one

Previously, ScreenRecorder only captured whichever display the mouse cursor
was on (tracked via ActiveDisplayTracker). For multi-monitor setups this means
large portions of the workday go unrecorded.

This change makes captureScreenshot() iterate over all connected displays and
save one JPEG per display per capture tick. The active display tracker is kept
so the "primary" display field still reflects where the user is working.

Storage impact: screenshot count scales linearly with display count (2x for
dual monitors). The existing storage limit settings still apply.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The initial implementation cached the display list only during setupCapture(),
which meant hot-plugged monitors wouldn't be picked up until a restart.
Now captureScreenshot() fetches fresh SCShareableContent each tick, falling
back to the cached list on error.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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