fix(browser): keep attachment sends in the active chat - #431
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed September 7, 2026, 11:42 AM ET / 15:42 UTC. ClawSweeper reviewWhat this changesThe PR binds browser attachment uploads, prompt editing, and submission to the original ChatGPT context, adds guarded button activation, and expands browser regression coverage. Merge readiness⛔ Blocked before merge - 3 items remain The PR remains useful and the earlier source-level findings are addressed. Current signed-in compatibility remains unresolved; the repository profile also prohibits automatic closure. Priority: P1 Review scores
Verification
How this fits togetherOracle’s browser engine sends user prompts and local files through a signed-in ChatGPT page. Its attachment pipeline prepares files, checks composer readiness, submits the prompt, and verifies that a user turn committed. flowchart TD
A[Prompt and local files] --> B[Capture original chat context]
B --> C[Guard file assignment]
C --> D[Verify upload evidence]
D --> E[Guard prompt editing]
E --> F{Context and exact send button ready?}
F -->|Yes| G[Submit once and verify committed turn]
F -->|No| H[Stop with diagnostics]
Decision needed
Why: The branch intentionally removes permissive attachment activation paths; passing fixtures cannot determine acceptable disruption to existing signed-in workflows. Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep context-bound, single-dispatch attachment handling while establishing signed-in upgrade compatibility and obtaining maintainer acceptance of deliberate fail-closed behavior. Do we have a high-confidence way to reproduce the issue? Yes: the current-main coordinate path and the supplied real-Chrome project-switch comparison establish a concrete mechanism; this read-only review did not execute it. Is this the best way to solve the issue? Yes for the context-safety repair: checks at file delivery, editing, and submission address the actual boundaries while retaining attachment evidence; signed-in compatibility still needs resolution. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 54dafa78fe6f. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (8 earlier review cycles)
|
7b753df to
7d5a052
Compare
7d5a052 to
13b4d5f
Compare
|
Updated the PR body with exact-head signed-in @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
13b4d5f to
79c364f
Compare
|
Addressed the remaining landing/project-context P1 on exact head @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Co-authored-by: oraclexing <xing_z@hotmail.com>
Co-authored-by: oraclexing <xing_z@hotmail.com>
|
Maintainer proof for head beb7f7f. Contributor history is preserved. Current main was integrated, then a follow-up commit closed prompt-staging and post-event context gaps found during review. No changelog delta is included in this branch. Validation: pnpm test passed 2,164 tests (45 skipped); pnpm lint, pnpm build, and pnpm docs:check passed. Local and final branch autoreview through P2 are clean. Exact-head CI: https://github.com/steipete/oracle/actions/runs/34138528924 — all four jobs succeeded. Real execution: node scripts/attachment-cli-proof.mjs passed all 27 current-candidate cases through the actual built CLI and isolated real Chrome. The matrix covers local/remote files, context switches before/between assignments, native/renderer assignment and post-handler rollback, exact plus/send focus and readiness, Work machine values, unrelated selected Work labels, same-conversation rewrites, filename-less image bytes, and prompt editing/fallback in textareas and contenteditable editors. Prompt focus, beforeinput, and application input-handler navigation leave zero staged characters and zero sends; file-handler navigation clears the newly assigned selection and sends nothing. Two controlled before/after observations support the root-cause repairs. The main-branch build sent after a project switch; the candidate refuses that switch. A built-CLI control using the pre-fix f4647e5 prompt-staging module left all 61 prompt characters in the wrong context even though send was refused; the current renderer-bound editing path leaves zero. The existing three-file progress/hash proof also passed both routes with exactly one trusted send and no editor Enter. The expanded actual-CLI matrix runs in Linux CI. File delivery is authorized only while the captured context matches. If provider code changes context inside its own handler after receiving the File, post-handler checks stop further Oracle actions and clear the DOM selection; they cannot revoke copied File objects or cancel provider requests already queued. The fixture records final DOM cleanup, not proof that the handler never accessed the file. Limits: no fresh signed-in ChatGPT attachment/menu/Work DOM proof, no verification of its current framework handling of renderer editing commands, no complete localization guarantee without stable identity, and no account-specific upload/provider-processing proof. All pages/files here are synthetic. These checks do not establish a fix for #463's separate signed-in bundle-visibility report. The deferred release-note line is in the PR body. Ready for orchestrator review; not merged. |
Keep attachment uploads and sends in their original ChatGPT context. The maintainer integration preserves upload-progress blocking and per-file evidence from main, including filename-less image previews, while refusing unrelated plus/send controls and context switches before each file assignment and prompt send.
Native file input events and renderer DataTransfer assignment validate the pre-upload page identity before application handlers can consume bytes. Exact plus and send activation recheck the original button, focus, context, and send readiness at event delivery. Attachment prompt editing and fallback writes are bound to the original renderer/editor, with guarded beforeinput/input events; a document replacement cannot redirect a delayed CDP text-insertion command. A possibly dispatched key is never replayed after transport failure. Same-conversation URL rewrites remain valid; Work identities and other conversations/projects are rejected. Label-based Work checks are scoped to composer controls; unrelated selected sidebar items and unknown localized labels are not treated as proof of Work mode.
The actual built CLI and isolated real Chrome reproduce the main-branch project-switch failure, then exercise local/remote uploads, first/between-file context switches, delayed send/assignment transitions, plus focus races, localized Chat and Work machine values, missing exact controls, focus/readiness recovery, byte-for-byte filename-less images, prompt focus/input races, and textarea/contenteditable editing with forced fallback. The existing three-file progress/hash proof also remains required. Linux CI runs the CLI fixture. Full-suite results, exact-head CI, and branch review are recorded in the proof comment.
File delivery is authorized only while the captured context matches. If provider code changes context inside its own handler after receiving the File, post-handler checks stop further Oracle actions and clear the DOM selection; they cannot revoke copied File objects or cancel provider requests already queued. The fixture records final DOM cleanup, not proof that the handler never accessed the file.
Unproven here: fresh signed-in ChatGPT attachment/menu/Work DOM variants and framework handling of renderer editing commands, localization without stable mode identity, account-specific upload handling, and actual provider processing of the files. These fixture results do not establish a fix for #463's distinct current signed-in bundle visibility report.
Thanks @oraclexing. Deferred changelog line after landing: Browser: keep attachment uploads and sends in the original chat, validate exact controls at delivery, and stop context/focus races without replaying a dispatched action; thanks @oraclexing.