Repository navigation
Conversation
Contributor
ApprovabilityVerdict: Would Approve Macroscope's review found this PR approvable — This is a focused fix that replaces a CSP-blocked data-URL fetch with local decoding for preview annotation screenshots. The change is isolated to the attachment path, preserves failure handling, and includes targeted tests without altering defaults, schemas, or deployment behavior. Not approved because:
Review your spending limits in Billing settings. You can add or adjust custom eligibility rules. Learn more. |
2 tasks done
kalvenschraut
added a commit
to RTVision/t3code
that referenced
this pull request
Sep 15, 2026
The element picker captured its crop in Electron, then dropped it in the renderer: the conversion fetched the data URL, and the desktop Content Security Policy only allows http, https, ws, and wss connections, so every attach ended with "The annotation was kept without the screenshot". Decode the data URL locally with the existing dataUrlToFile helper and remove the now-redundant conversion timeout. Failed decodes still keep the annotation without promising an attached image. Ported from upstream pingdotgg#10374. Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Member
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.
Preview annotations captured their screenshot, then dropped it because desktop CSP blocks
fetch(data:...). Decode the image with the existingdataUrlToFilehelper and remove the redundant conversion timeout. Failed conversions still keep the annotation without promising an attached image.Overlaps with #6242. Found while investigating #10366; the separate five-second Electron capture timeout is unchanged and was not reproduced locally.
Verified in desktop on macOS: the crop now attaches and opens correctly; normal screenshots still work. All 43 focused tests and web typecheck passed. Targeted lint reported only existing warnings; formatting passed.
Before / after
Created with GPT-6 in Codex in T3 Code