feat(screenshot): add --with-frame for full macOS window capture#15
Closed
Shadow-Azure wants to merge 9 commits into
Closed
feat(screenshot): add --with-frame for full macOS window capture#15Shadow-Azure wants to merge 9 commits into
Shadow-Azure wants to merge 9 commits into
Conversation
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
🔒 门禁检查结果
Rust 测试覆盖率
前端测试覆盖率
✅ 所有检查通过,可以合入
|
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…frame Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
When a CLI sandbox's window_id is None (e.g., Electron window not yet registered at creation time), fall back to discovering the window by title "System Test Sandbox" using ScreenCaptureKit. Cache the result so subsequent screenshots don't need to search again. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The --with-frame feature removed the renderer-based capture path for default screenshots, causing all screenshots to fall back to ScreenCaptureKit (full window with frame). This restores the request_renderer_screenshot function that captures the xterm.js canvas directly, giving terminal-only screenshots without the macOS window chrome. Also adds capture_request handler in the renderer WebSocket to respond to per-tab screenshot requests. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Use with_ignores_shadows_single_window(true) to prevent the macOS window shadow from appearing as a white border at the bottom of --with-frame screenshots. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Update release build timestamp to 2026-06-01 - Add test point 6 for comparing default vs --with-frame screenshots Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.
Summary
--with-frameflag tosandbox screenshotcommand for capturing the full macOS window (titlebar, traffic lights, tab bar, status bar)captureToPng()--with-framemode captures full Electron window via ScreenCaptureKitArchitecture
Bug Fixes
1. Default screenshots showed window frame instead of terminal-only
Problem: After adding
--with-frame, the default screenshot mode also showed the full macOS window frame.Root cause:
request_renderer_screenshot()function was removed during--with-frameimplementation, causing all screenshots to fall back to ScreenCaptureKit which captures the entire window.Fix: Restored
request_renderer_screenshot()function and addedcapture_requesthandler to renderer.2. White border at bottom of --with-frame screenshots
Problem:
--with-framescreenshots had a white border/shadow at the bottom of the window.Root cause: ScreenCaptureKit captures window shadows by default.
Fix: Added
.with_ignores_shadows_single_window(true)toSCStreamConfigurationincapture_window().Test Results
Test plan
cargo check --all-targetspasses--with-framemode captures full macOS window--with-framescreenshots🤖 Generated with Claude Code