Skip to content

fix: Recording doesn't work with different windows#485

Merged
ExtraBinoss merged 1 commit intowebadderallorg:mainfrom
ExtraBinoss:fix/source-selection
May 9, 2026
Merged

fix: Recording doesn't work with different windows#485
ExtraBinoss merged 1 commit intowebadderallorg:mainfrom
ExtraBinoss:fix/source-selection

Conversation

@ExtraBinoss
Copy link
Copy Markdown
Collaborator

@ExtraBinoss ExtraBinoss commented May 9, 2026

Closes #483 Recording doesn't work with different windows

Since we refactored LaunchWindow, maybe we omitted those two lines of code :

const windowId = parseWindowId(source?.id);
					const isWindowCapture = Boolean(windowId && source?.id?.startsWith("window:"));

This is why recording would only work on the screen itself and never on the window you wanted. Now it works on both. This path was taken only by "Windows" machine and shouldn't affect other platforms

Summary by CodeRabbit

  • Bug Fixes
    • Improved screen recording to properly handle both window-specific and display-wide capture modes. Each capture type now uses appropriate configuration settings, resulting in better accuracy and more reliable diagnostic reporting.

Review Change Stack

Copilot AI review requested due to automatic review settings May 9, 2026 21:36
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 9, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 31dcb379-8371-4829-b1e7-d10274b9d3d2

📥 Commits

Reviewing files that changed from the base of the PR and between 7ec1f8a and 30c82fc.

📒 Files selected for processing (1)
  • electron/ipc/register/recording.ts

📝 Walkthrough

Walkthrough

The PR modifies Windows native screen-recording initialization to differentiate between window-specific and display-wide capture requests. When a windowId is present in the source, the capture targets that window and sets windowHandle in the native config; otherwise, it captures the full display using displayId and rounded boundary coordinates.

Changes

Windows Window vs Display Capture Logic

Layer / File(s) Summary
Window vs Display Detection
electron/ipc/register/recording.ts
Source ID is parsed to extract windowId and determine isWindowCapture boolean flag.
Native Config Construction
electron/ipc/register/recording.ts
Windows native config is conditionally set: config.windowHandle for window captures, or config.displayId with rounded bounds for display captures.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related issues

  • #483: Recording always captures the current screen regardless of window selection; this PR fixes that by parsing windowId and setting config.windowHandle for window-targeted captures.

Possibly related PRs

  • webadderallorg/Recordly#314: Both PRs modify the same Windows native recording start logic in electron/ipc/register/recording.ts to adjust how windowHandle vs display coordinates are handled.

Suggested labels

Checked

Poem

🐰 A window trapped in the display's wide frame,
Now gets its capture moment of fame!
The windowId parsed, the config's set right,
Recording just one pane instead of the sight. ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main bug fix: recording now works with different windows, which directly matches the changeset that restores window-specific capture logic.
Description check ✅ Passed The description clearly identifies the issue (#483), explains the root cause (omitted window parsing lines), provides the code snippet, and states the solution and platform scope.
Linked Issues check ✅ Passed The PR directly addresses the objective in #483 by restoring window ID parsing and capture type detection, fixing the bug where recording always captured the entire screen instead of the selected window.
Out of Scope Changes check ✅ Passed All changes are directly related to fixing the window recording issue described in #483; no unrelated modifications are present in the changeset.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@ExtraBinoss ExtraBinoss merged commit f6a40d7 into webadderallorg:main May 9, 2026
7 of 8 checks passed
@ExtraBinoss ExtraBinoss deleted the fix/source-selection branch May 9, 2026 21:39
@ExtraBinoss ExtraBinoss review requested due to automatic review settings May 9, 2026 21:58
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.

Recording doesn't work with different windows

1 participant