Skip to content

Feature: live event subscription (console / DOM mutation / IPC) for streaming UX validation #46

@kunchenguid

Description

@kunchenguid

Problem

axi today is purely pull-based: snapshot, eval, console — all return the current state at the moment of the call. For UIs whose interesting behavior happens during an interaction (streaming text rendering, transient toasts, animation states, IPC messages), pull-polling is the wrong shape.

Concrete case: I added typewriter-style streaming to a kid chat where deltas arrive over 1-3 seconds. To validate "does the streaming bubble actually render mid-response?", I need to observe state while the response is in flight. Polling via eval every ~600ms misses the window entirely (see also: #42 about first-eval being 7s, which is even worse).

Suggested API

A watch family of subcommands that streams events over stdout as JSONL until killed:

chrome-devtools-axi watch console            # streams console messages live
chrome-devtools-axi watch mutation '.hb-chat-streaming'  # streams DOM mutations on a selector
chrome-devtools-axi watch network            # streams network requests/responses

Even just "console live" would unlock the streaming validation use case: you console.log from the page when an event of interest fires, run chrome-devtools-axi watch console in the background, and grep for the marker. Cheap to implement (CDP Runtime.consoleAPICalled), high leverage.

Why it matters

The agent ergonomics story for steady-state DOM ("is the button there?") is great. The story for transient state ("did the streaming bubble appear and then settle correctly?") is essentially missing — agents have no way to reliably observe sub-second UI behavior. Push-mode events would close that gap.

Environment

  • chrome-devtools-axi 0.1.18

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions