Skip to content

v0.2.1

Latest

Choose a tag to compare

@sinnhirl sinnhirl released this 05 Aug 08:47
db94330

Major fix: DOM query tools actually work now (R4-1)

v0.2.0 shipped a serious defect in get_node / element_to_selector: every DOM
lookup failed 100% of the time
. Root cause: CDP objectIds are bound to the
session that created them; the implementation resolved the node in one CDP
session and read DOM in a second, so the objectId was invalid and the tools
could only degrade to domState: unavailable.

Fixed in v0.2.1: resolve and read reuse the same CDP session. Verified
against a real browser:

  • get_node(uid) now returns real tagName / cssSelector / rect / visible / textContent
  • element_to_selector(uid) now returns a unique CSS selector you can feed
    straight to the official chrome-devtools-mcp click / fill
  • queryDomByBackendNodeId releases its session to avoid connection leaks

If you are on v0.2.0, upgrade: npm install -g cdt-smart-snapshot@latest


What's Changed

Bug Fixes

  • reuse CDP session for DOM lookup so objectId resolves (R4-1) — the major fix above
  • accurate errors for AX-only nodes in get_node/element_to_selector (R4-longtest)
  • get_node cssSelector placeholder + page_status format polish (R4-4 R4-5 R4-6)
  • page_search no-match message no longer claims empty index (R4-longtest)

Also improved

  • diagnosticsAttached is now a WeakSet (R4-2): closed page objects can be
    GC'd, long-running servers no longer accumulate memory
  • Single source of truth for selector generation (R4-3): the pure
    core/selector.ts functions are injected into the browser, no more drift
  • page_status console section retitled "Console messages" (includes warn
    level, R4-6)

Full Changelog: v0.2.0...v0.2.1