Visual cursor overlay for input automation on headed Chrome

Aperta
#2,401 5 commenti 0 reazioni 2 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@mathiasbynens ci sta già lavorando.

Dal 20/10/2026.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
typescript
Ambito
cli, devtools, tooling

Direzione di ricerca

Inizia esaminando il PR #2400 chiuso, inclusi i relativi test e la documentazione generata, quindi segui gli input tools click, dblClick, click_at e drag e l’esistente CLI flag parsing. Conferma come devono comportarsi --visual-cursor e --visual-cursor-duration, inclusi la navigazione, il degrado silenzioso e il percorso predefinito. Il lavoro è completato quando l’animazione opt-in funziona per questi tools senza modificare il comportamento dell’input né aggiungere latenza quando è disabilitata.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

confirmed feature p3
Is your feature request related to a problem? Please describe.

When an agent drives a real (headed) Chrome instance through chrome-devtools-mcp, mouse input is injected at the CDP level, so the OS cursor never moves. A human watching the browser cannot tell where the agent is clicking, which makes supervised sessions and live demos hard to follow.

Other agent harnesses (computer-use style tools) solve this by showing a visible cursor during automation, and it has become a commonly expected UX when agents operate a real browser.

Describe the solution you'd like

An opt-in --visual-cursor flag. When enabled, mouse-based input tools (click, dblClick, click_at, drag) animate a ghost cursor on the page before acting: the cursor smoothly slides to the target point and shows an expanding ripple at the click location. Animation duration is configurable via --visual-cursor-duration <ms> (default 800).

A working implementation exists in PR #2400 (closed pending this discussion): the cursor is injected via Page.addScriptToEvaluateOnNewDocument so it survives navigations, everything degrades silently so real input is never affected, and with the flag off (default) there is zero behavior or latency change.

I understand the concern about injecting scripts into inspected pages and am happy to rework the approach based on maintainer feedback - e.g. rendering the cursor inside an isolated world (Page.createIsolatedWorld) so page scripts cannot observe or interfere with it, or any other mechanism the team prefers.

Describe alternatives you've considered
  1. OS-level input automation that moves the real system cursor (computer-use style): heavyweight, platform-specific, requires extra OS permissions.
  2. Screencast recording: after-the-fact, not live.
  3. Agent-side page injection via evaluate: what many agents do today, but every harness reimplements it and it runs in the page's main world.
  4. Do nothing: humans keep guessing where the agent is clicking.
Additional context

Related: PR #2400 (initial implementation with tests and generated docs, closed with a request to file this issue first). This need came up while supervising an agent driving a real user Chrome via --autoConnect.

Lingua principale
TypeScript
Stelle
59.8k
Fork
4.8k
Merge medio
2g 10h
PR unite (30g)
162

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ChromeDevTools/chrome-devtools-mcp

Tutte le issue di ChromeDevTools/chrome-devtools-mcp

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.