Repository navigation
fix: keep browser annotation context coupled to its screenshot - #120848
Conversation
413276c to
406d5d3
Compare
|
Codex review: needs changes before merge. Reviewed August 9, 2026, 7:44 AM ET / 11:44 UTC. ClawSweeper reviewWhat this changesThis PR represents browser screenshots and generated page context as structured composer attachments, adding removal, Undo, send, and pane-remount lifecycle handling. Merge readiness⛔ Blocked by patch quality or review findings - 6 items remain Keep this maintainer-owned PR open: its attachment-owned annotation design addresses the linked defect, but it still turns slash commands with an attached annotation into ordinary model messages. Priority: P1 Review scores
Verification
How this fits togetherThe Control UI browser panel creates marked screenshots with page context for the active chat composer. The composer decides whether typed text is a local command or a model message, then owns attachment delivery and pane cleanup. flowchart LR
Capture[Browser capture] --> Package[Annotation package]
Package --> Composer[Chat composer]
Composer --> Command[Command classification]
Command --> Delivery[Model message delivery]
Composer --> Lifecycle[Pane lifecycle]
Lifecycle --> Cleanup[Payload cleanup]
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource +790, Tests +1422, Docs +5. Total +2217 across 39 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Classify and execute the raw user-authored message first, then materialize annotation context only for ordinary model sends while retaining the attachment-owned lifecycle design. Do we have a high-confidence way to reproduce the issue? Yes, from source: stage a browser annotation and submit Is this the best way to solve the issue? No. Attachment-owned context is the right repair boundary, but composing it before command classification regresses existing command behavior. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 4cb33d48cddb. LabelsLabel justifications:
EvidenceAcceptance criteria:
What I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles)
|
406d5d3 to
28cf3c8
Compare
|
🦞👀 Pull request received. I will update this pull request when review starts. |
2cac2e1 to
7868e65
Compare
7868e65 to
0a898b7
Compare
Fixes #120744
What Problem This Solves
Fixes an issue where removing a browser annotation from the Control UI composer removed its screenshot but left generated page context in the editable draft. That stale text could claim a screenshot was still attached and made replacing an annotation risk deleting unrelated user-written text.
Why This Change Was Made
Browser annotations now remain one structured, attachment-owned composer package: the marked screenshot, bounded page metadata, and generated model context share one lifecycle. The textarea remains exclusively user-authored.
Removal and bounded Undo operate on the complete annotation package. Send materializes each remaining annotation once before queue admission. A bounded annotation-only handoff preserves complete annotations across same-tab route and active split-pane remounts without changing ordinary attachment behavior.
User Impact
Users can identify, remove, replace, and undo browser annotations without losing their draft or sending context for a screenshot they removed. Complete annotations survive supported same-tab navigation, while pane closure, ownership changes, hard reload, and application shutdown clean them up without leaving hidden context.
When the annotation limit is reached, the browser capture remains available so the user can remove a card and retry.
Evidence