feat(selection): homegrown region overlay for area capture - #19
Merged
Conversation
Introduces a per-display transparent BrowserWindow that drives region
selection ourselves, then hands the rect to `screencapture -R`. Replaces
the OS `screencapture -i` path for "Capture Area" behind a new
`useCustomSelectionOverlay` pref (default on, kept as a safety valve).
Unblocks "Capture Previous Area" (PR2) and v0.4 region recording, both
of which need to know the chosen rectangle (which `-i` does not expose).
- New `selection` IPC namespace + SnaporaApi bridge
- `src/main/selection/{overlay,geometry}.ts` — windows + pure math
- `src/renderer/{selection.html,selection.tsx,components/Selection.tsx}`
- `screencapture -R` arg path with region passthrough
- Geometry unit tests (17 cases)
- ADR 0003 records the decision
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
aryasadeghy
enabled auto-merge (squash)
May 9, 2026 23:05
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduces a per-display transparent BrowserWindow that drives region selection ourselves, then hands the rect to
screencapture -R. Replaces the OSscreencapture -ipath for "Capture Area" behind a newuseCustomSelectionOverlaypref (default on, kept as a safety valve).Unblocks "Capture Previous Area" (PR2) and v0.4 region recording, both of which need to know the chosen rectangle (which
-idoes not expose).selectionIPC namespace + SnaporaApi bridgesrc/main/selection/{overlay,geometry}.ts— windows + pure mathsrc/renderer/{selection.html,selection.tsx,components/Selection.tsx}screencapture -Rarg path with region passthroughSummary
Type
Screenshots / recording
Test plan
npm run lintnpm run typechecknpm testClean-room confirmation
Linked issues
Closes #