Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): keep screenshots when attaching preview annotations #10374

ClosedNeel2107(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/10374/headopened View on GitHub

Preview annotations captured their screenshot, then dropped it because desktop CSP blocks fetch(data:...). Decode the image with the existing dataUrlToFile helper 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

Before: crop droppedAfter: crop attached
BeforeAfter

Created with GPT-6 in Codex in T3 Code

    1. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched

    2. Approvability

      Verdict: 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:

      • Monthly spending limit reached (workspace setting). Approvability relies on correctness review in order to determine eligibility
      Review your spending limits in [Billing settings](https://app.macroscope.com/pingdotgg/settings/billing). You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    3. Superseded by #12636, which already fixed #12265 and merged (same desktop CSP / dataUrlToFile fix; overlaps with #6242). Closing this PR as leftover hygiene.

    4. juliusmarminge closed this

Sign in to join this conversation.