Skip to content

Own browser service M1c: actions, input, keyboard, paste, screenshots, waits (#113) - #125

Merged
SSFSKIM merged 22 commits into
mainfrom
feat/own-browser-service-m1c
Oct 14, 2026
Merged

SSFSKIM merged 22 commits into
mainfrom
feat/own-browser-service-m1c

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Oct 14, 2026

Copy link
Copy Markdown
Owner

M1c of the own browser service (#113, child 1 of #114): pointer and locator actions, coordinate and DOM-CUA input, the keyboard, typing by paste with Markdown rendering, the clipboard store, the cursor, screenshots and page waits. Spec: docs/doperpowers/specs/2026-10-13-own-browser-service-design.md (Plan of Work M1c; execution rulings in its Decision Log and Surprises dated 2026-10-13 and 2026-10-14). The default stays vendor.

What changed

  • actions.mjs: every playwright_locator_* action (click, dblclick, fill, press, press_sequentially with its 5 s cap, select_option, set_checked, wait_for; download_media's locator half, completed by M2), the vendor's actionability checks and sentences; dialog_open and spent budgets end an action before any Input event; each fill selects and pastes in one queued clipboard operation checked against its field.
  • input.mjs, keyboard.mjs, cursor.mjs: cua_* coordinate input and dom_cua_* node-id input; one deadline per click covers the cursor, the Input dispatch and the load wait; nested-frame points mapped once.
  • paste.mjs, clipboard.mjs: typing by paste into the focused frame (cross-origin frames included), the virtual clipboard's store and queue with budgets through the queue; rejections never echo page-supplied text, so typed values (including substituted secrets) cannot surface in errors.
  • vendor/markdown-it/ (14.1.1, MIT) through scripts/extract-markdown-it.mjs from an exact-pinned devDependency, configured as the vendor's; cua_type rich text renders through it.
  • screenshot.mjs (screencast then capture, JPEG 80 at CSS scale, clip, full page) and waits.mjs (URL, load state incl. networkidle, timeout).
  • The model-facing API text under cua: evaluate runs in the page's main world, budgets default 3 s up to 120 s, the no-replay note.
  • Parity corpus: a case for every M1c inventory row through the real client (rich text, 56 K-character typing, queued shortcuts, concurrent fills, an overlaid click, tall screenshot modes, OOPIF typing, zero-budget waits); download_media's row moves to M2; expected differences for the lifted slow-budget, the concurrent fill, OOPIF typing and zero-budget waits, each with its reason.

Validation Evidence

  • At 8347f1c (re-run by the executor session): HOME=/tmp/cua-scratch-home npm test → # pass 1515, # fail 0, # skipped 6; npm run test:mods → 32 pass; claude plugin validate . → ✔ Validation passed with warnings (the known warning).
  • Live on the mini (profile ssfs), docs/evidence/2026-10-13-own-browser-service-parity/m1c-diff.txt:
    • unchanged M1c cases vs vendor-m1c-1 → 0 unexpected differences (13 cases, 29 cells, 1 expected)
    • vs vendor-m1c-2 → 0 unexpected differences (15 cases, 32 cells, 1 expected)
    • concurrent fill vs vendor-m1c-3 → 0 unexpected differences (1 cases, 1 cells, 1 expected)
    • departures (input/oopif-type, waits/zero-budget) → 0 unexpected differences (2 cases, 3 cells, 3 expected)
    • M1a/M1b regression at the M1c head vs vendor-m1b-2 → 0 unexpected differences (20 cases, 70 cells, 7 expected)
    • Acceptance 1 on cua: nytimes.com opens and the Opinion link navigates to /section/opinion; the vendor refuses createBrowserTab with its site-safety sentence. Acceptance 2: #late clicked at ~8.5 s within timeoutMs: 15000 on cua; the vendor fails at 3 s with "Playwright selector deadline exceeded".
    • Long paste (55,999 characters): 517 ms cua vs 1,168 ms vendor per cell.
  • Reviews: two task reviews (sol) clean after fix waves; whole-branch doperpowers:reviewer-high: three P1 and four P2 (the same-document hit-test P1 withdrawn on vendor parity, pinned by actions/overlay), then one P2 in a zero-budget queued shortcut; all fixed; final verdict "correct", no material findings.

Residue

  • none

…UA input, keys, typing by paste and the virtual clipboard's store

actions.mjs ports Pf's action half (click, dblclick, fill, press, pressSequentially with its 5 s cap, selectOption,
setChecked, waitFor, downloadMedia's locator half); input.mjs ports Bf and the cua_*/dom_cua_* commands; keyboard.mjs
the vendor's keyboard and US layout; paste.mjs Vi, el and Ku with the clipboard shortcuts; clipboard.mjs Jf's store
(the page bridge is M2's); cursor.mjs qf. Registered in COMMAND_HANDLERS; unit tests over the fake Chrome and
recording controllers.
…nned devDependency; markdown-it for cua_type
…dgets end the obstruction check; the click's deadline bounds the cursor and the load wait; pastes and shortcuts carry their caller's deadline through the queue; page errors never echo the typed text
…focusing resolves within the shortcut's deadline, so nothing of a queued shortcut runs after it
…s rich text through vendored markdown-it 14.1.1; cua's evaluate and budget text; the M1c corpus (rich text, long typing, queued shortcuts, screenshot modes, networkidle; download_media to M2)
…k in its cell, so a slow case setup cannot reveal #late before the click
…1: 0 unexpected differences; cua-m1c-m1ab against vendor-m1b-2: 0 unexpected), acceptance 1 (nytimes) and acceptance 2
… only for Chrome's no-node answers; fill selects and pastes in one queued operation, the paste checked against its field; cua_type pastes into the focused frame; DOM-CUA points map once within a target; zero budgets dispatch within 3 s; zero-budget load-state and networkidle waits observe once; corpus: tall screenshot modes, concurrent fills, an overlaid click
…es and asserts each service's outcome (cua: each in its own field; the vendor's race: both pastes in the field focused last), an expected difference
…xes (vendor-m1c-2, vendor-m1c-3, cua-m1c-2: 0 unexpected differences; the concurrent-fill race is the vendor's, an expected difference)
…rity on hit testing, concurrent fills as an expected improvement)
… case and an expected difference; screenshot latency to watch
…tures in cua's favour (typing into a focused cross-site frame; a zero-budget load state or networkidle that already holds), each with an expected difference
…ses within its own attempt budget (one attempt, never a fresh 3 s); live diff of the departures in cua's favour (input/oopif-type, waits/zero-budget: 0 unexpected, 3 expected)
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-14T08:41:00.462451Z aa0eb94 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant