Repository navigation
fix(browser): enable paste into agent browser panels - #148451
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review in progressClawSweeper is reviewing this revision. This supersedes any previous blocked status. |
|
Codex review: needs maintainer review before merge. Reviewed September 14, 2026, 3:08 PM ET / 19:08 UTC (Revision 3). ClawSweeper reviewWhat this changesEnables plain-text paste into streamed browser panels, preserves remote click ordering, sanitizes paste errors, adds regression coverage and documentation, and removes a duplicate test registration. Merge readiness✅ Ready for maintainer review The fix remains useful: current main and the latest release lack panel paste handling. No actionable introduced defect was found, and the inspected native proof supports the changed behavior. Priority: P2 Review scores
Verification
How this fits togetherThe Control UI displays a Gateway-controlled browser as a streamed page. Local input passes through the browser plugin’s guarded action route to the focused field in the remote browser. flowchart LR
A[Native paste event] --> B[Browser panel input]
C[Remote click completion] --> B
B --> D{Current tab and connection?}
D -->|Yes| E[Guarded browser action]
E --> F[Focused remote field]
D -->|No| G[Discard stale input]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +162, Tests +418, Docs +2. Total +582 across 21 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep paste in the existing browser input and guarded action owners, with native Mac tabs retaining their normal editing behavior. Do we have a high-confidence way to reproduce the issue? Yes: current main lacks a paste handler and focuses a noneditable viewport; the supplied native before/after fixture demonstrates the symptom. No runtime reproduction was executed in this review. Is this the best way to solve the issue? Yes: native text insertion preserves the remote selection and frame without page evaluation or clipboard synchronization, while reusing existing routing and guards. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against cc01fd8aaf04. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
Reuse the one-line prerequisite from #148403 so CI can validate browser paste. Preserve the single wizard recovery registration and the duplicate-detection guard. Co-authored-by: Vincent Koc <[email protected]>
|
@clawsweeper re-review The final head includes lint-only cleanup and the one-line CI prerequisite credited to #148403. Native screenshots and regression evidence remain in the PR body. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Merged via squash.
|
* fix(browser): enable paste into agent browser panels * refactor(browser): finish input ownership cleanup * fix(ci): remove duplicate test routing prerequisite Reuse the one-line prerequisite from openclaw#148403 so CI can validate browser paste. Preserve the single wizard recovery registration and the duplicate-detection guard. Co-authored-by: Vincent Koc <[email protected]> --------- Co-authored-by: Vincent Koc <[email protected]>
What Problem This Solves
Fixes paste doing nothing in Agent browser panels and Browser dashboards, including login fields in the macOS app. WebKit treated the streamed page as a noneditable canvas, so its context menu did not offer Paste.
User Impact
Users can paste plain text with ⌘V/Ctrl+V or right-click Paste into the remote field, preserving its cursor and selection. Paste waits for the remote click; failed or superseded focus attempts cannot send text to the previous field. Passwords, multiline text, Unicode, and fields inside cross-origin frames work. Native Mac tabs keep WebKit's normal editing behavior. Chrome MCP existing-session profiles show an unsupported-paste error; managed browser profiles support it.
Why This Change Was Made
An empty editable overlay lets the host deliver native paste events. The browser input owner consumes the event and sends text through the existing guarded browser action path using native text insertion. Clipboard text never enters the local textarea, does not update the remote system clipboard, and is omitted from error messages. No page-evaluation permission or new model-facing tool is needed.
Includes the one-line CI prerequisite from #148403 (thanks @vincentkoc): remove a duplicate database-worker test registration that otherwise makes current main fail preflight before tests run.
Evidence
DashboardWebViewhosting the production browser panel: native Paste reaches multiline/Unicode text and a cross-origin password field, leaves the local input empty, and enables native context-menu Paste. Synthetic screenshots below show the same form before and after./actroute against real Chromium with page evaluation disabled.