Repository navigation
Conversation
The coordinator delivered shortcut captures to the thread draft while the composer staged question attachments in a per-question draft, so a capture taken during a question stayed hidden until the answer was sent.
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a focused fix to route desktop snapshots into the currently open question attachment draft, with explicit handling for question closure, animation targeting, and shared attachment limits. The change is localized, tested, and does not alter schemas, deployment behavior, product defaults, or static-analysis configuration. Notes:
You can add or adjust custom eligibility rules. Learn more. |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (4)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughSnapshot captures can now target the active question attachment draft. Captures are pinned to the question open when capture begins, fall back to the thread target if that question closes, and are subject to the request-wide attachment limit. ChangesQuestion Snapshot Routing
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix · Severity of issue fixed: Medium Sequence Diagram(s)sequenceDiagram
participant ChatComposer
participant questionAttachments
participant SnapShotCoordinator
participant DesktopSnapShotBridge
ChatComposer->>questionAttachments: Register the active question draft
SnapShotCoordinator->>questionAttachments: Read and pin the open draft for a capture
SnapShotCoordinator->>DesktopSnapShotBridge: Read the captured snapshot
SnapShotCoordinator->>questionAttachments: Resolve the pinned draft after processing
SnapShotCoordinator->>SnapShotCoordinator: Add images to the resolved target
Possibly related PRs
Suggested labels: Suggested reviewers: Merge Risk: ⚪ Minimal · up to No identified issue blocks merging the snapshot-routing change after normal checks. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to Normal delivery preserves question attachment gates and shared limits. However, a pending capture can survive a reload while its question association cannot, allowing recovery to attach it to a different question. Sending that attachment still requires user action. Retained concerns
Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Problem
While a provider question is open, the composer stages dropped files in a per-question draft, so drag-and-drop lands beside the answer. The SnapShot coordinator still delivered shortcut captures to the thread draft, and the composer keyed the flying-capture animation to that same thread draft. A capture taken during a question therefore landed on the hidden normal composer and only appeared after the answer was sent.
Change
ChatComposerregisters the open question's attachment draft, together with the other question drafts of the same request, while the question can take attachments (the attach button's gate) and its answer is not yet sending.SnapShotCoordinatorpins that question to each capture the first time it sees it, so the animation and the delivery agree. A capture pinned to a question that has since closed goes to the thread draft, never to a newer question.addImages, becauseaddImagerefuses drafts without a thread session, which a question draft never has, and refuses a capture once the request's questions already hold the shared attachment limit, as drag-and-drop does.Web and desktop share this code. Mobile has no SnapShot path and the browser build has no desktop bridge, so nothing else changes. No contract or server change.
Scope and approval
Closes #12271, accepted by a maintainer with this fix direction: #12271 (comment)
#12293 by @Gigioxx implemented the same routing and was closed only for a missing desktop recording (#12293 (comment)). This PR rebuilds that approach on current
main, keeps its answers to the review findings, adds the ownership recheck before the insert that its final review left open, and supplies the recording.Verification
vp test run --project unit src/components/desktop/SnapShotCoordinator.test.tsinapps/web: 19 passed. Four new cases: a capture during an open question lands in the question draft and leaves the thread draft empty; a capture stays on the question it was pinned to and never moves to a newer one; a capture whose question closes while it is being read falls back to the thread draft; a capture is refused once the request's other questions hold the shared limit. With the routing reverted the first three fail, with the recheck moved back before the read the third fails, and without the limit check the fourth fails.vp lintandvp fmt --checkon the four touched files, andvp run --filter @t3tools/web typecheck: clean. The only lint warnings are the ones already onmain.vp run dev:desktop) on a fresh state with a throwaway project, a Claude thread with anAskUserQuestioncard open, SnapShots on with the default both-Shift shortcut, the dev app in front so it captured itself:mainhides the composer's image strip while a question is open (a regression from the V2 merge, fixed by fix(web): attachments on an open question are visible again #15537). The screenshots and the recording below were taken with that one-line change applied locally, so the tile is visible; this PR does not include it.Before: the shortcut was pressed while the question was open, and nothing landed in the question (its strip holds only the image dropped earlier):
Before, after Submit: the capture surfaces in the normal composer, which is the report's symptom:
After: the capture sits in the question's strip:
Recording of the shortcut capture landing in the open question and the answer being submitted with it:
12271-snapshot-into-open-question.mp4
After, Claude's reply to that answer, describing the captured window:
Claude Fable 5.1 via T3 Code