Repository navigation
Conversation
… saved inline Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
| name: attachment.name, | ||
| mimeType: attachment.mimeType, | ||
| sizeBytes: attachment.sizeBytes, | ||
| ...(attachment.source ? { source: attachment.source } : {}), |
There was a problem hiding this comment.
Preserving Snap Shot metadata broadens the attachment-persistence behavior implemented in this transport module. Could you move this persistence operation into the existing AttachmentUpload service and preserve source there, leaving the RPC handler to call the service and translate errors? Existing inline persistence is legacy, but new behavior should be added at the service boundary.
Posted via Macroscope — Effect Service Conventions
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — Inline Snap Shot attachments now retain their existing captured-window metadata, matching the normal upload path. Image validation and file persistence remain unchanged, with no new capture or access behavior. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Problem
A Snap Shot image saved through
assets.persistChatAttachmentsloses its captured-window details (app name, window title, accessibility text). The agent's prompt then has no "captured-window data" block for that image, and the message no longer shows the Snap Shot details.The RPC's input and result types both carry the optional
source, but the handler builds each saved record without it. The original Snap Shot change (#8103) keptsourcein the V1 normalizer; the V2 rewrite (#2829) dropped it.On current main, the web queued-message edit sends newly added images as data URLs through this RPC. One way to hit it: take a Snap Shot, stash the draft, edit a queued message, restore the stash into the edit composer, and save. A web send that starts before the server config arrives also uses this path. Normal sends use pending uploads, which already keep
source.Change
persistChatAttachmentscopiessourceonto the saved record when present, with the same conditional spread the V1 normalizer used.Scope and approval
This is a very small, focused fix for an obvious bug, so there is no prior issue: the RPC contract accepts and returns
source, the server dropped it, and V1 kept it. It changes 3 lines inapps/server/src/ws.tsand adds one test.Overlap search (open and closed PRs and issues): "persistChatAttachments", "snap shot", "SnapShotSource persist", "queued edit snap shot", "captured-window context". The closest is #32742 (Claude adapter MIME casing), which is a different defect in a different file.
Verification
apps/server/src/ws.test.tsdrives the realassets.persistChatAttachmentsRPC handler with a Snap Shot image. There was no existing test for this RPC to extend.cd apps/server && vp test run src/ws.test.ts -t "SnapShot source"fails withAssertionError: expected undefined to deeply equal { kind: 'snap-shot', …(4) }.vp test run src/ws.test.tspasses 24/24.vp run check:changedpasses (format, lint, knip, typecheck, tests).providerMessageTextWithAttachmentPaths).sourceisnulland the prompt is only:Reviewed with sol-loop: 1 round with GPT-6.1 Sol on high (T3 delegated review, Codex provider). Sol verdict: approved, no findings.
Created with Claude Opus 5.5 in Claude Code (T3 Code).
🤖 Generated with Claude Code