fix(capture): keep the capture notice out of the screenshot#14
Merged
Conversation
The on-page notice leaked into captured frames: SB_SET_OVERLAY responded inside a single requestAnimationFrame, which runs *before* that frame's paint, so captureVisibleTab could fire before the overlay was actually painted hidden. Wait for the next paint (double-rAF) before responding to SB_SET_OVERLAY, and add a short settle (60ms) after the hide before capturing to cover compositor lag. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
DCCA
added a commit
that referenced
this pull request
Jun 27, 2026
- CLAUDE.md: content.ts message set (SB_CAPTURE_*), capture.ts retry helpers/guards (activateTab, sendToContentScript, isTabsBusyError, isNoReceiverError), the on-page notice flow, and wslPath/feedback helpers. - README: one-click capture, capture notice, and Copy for Claude Code in the feature list. - todo: drop the removed popup from the manual QA list; add one-click + notice QA items. - Add .docs/done/2026-06-27-one-click-capture-reliability/ change record (PRs #11-#14). Co-authored-by: Claude Opus 4.8 (1M context) <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.
Symptom
With the on-page capture notice (#13), the notice pill leaked into the saved screenshot.
Root cause
SB_SET_OVERLAY {visible:false}setdisplay:nonethen calledsendResponseinside a singlerequestAnimationFrame. rAF callbacks run before that frame is painted, so the orchestrator could receive the "hidden" ack and firecaptureVisibleTabbefore the browser had actually painted the overlay away.Fix
SB_SET_OVERLAYafter the next paint (afterPaint= doublerequestAnimationFrame), so the hide is guaranteed on screen before the orchestrator proceeds.captureFullPage: add a shortwait(60)after the hide ack, beforecaptureVisibleTab, to cover compositor commit lag.Verification
npm run typecheck,npm run lint,npm run test(54 pass),npm run format:check,npm run buildgreen.dist/content.jscontains the double-rAF.🤖 Generated with Claude Code