You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(cli): verfix show --dom <selector> — query the saved failure-time DOM snapshot #57
Every failed run saves a full DOM snapshot (<executionId>.html in .verfix/runs/, written by workers/src/artifacts/collector.ts), but the only way to interrogate it is to open the file and grep. Agents debugging a failure end up script-grepping raw HTML to answer simple questions like "does this selector match anything in the failure-time DOM?" or "what dialogs were open?".
Proposal
Add --dom to verfix show:
verfix show <id> --dom '<css selector>' [--output json|pretty]
Queries the saved DOM snapshot with the given selector and prints matches: tag, key attributes (id, class, role, aria-*, data-testid), text content (truncated), and match count.
--dom with no selector could print a compact outline (landmarks, dialogs, headings) as a starting point.
JSON output for agents, pretty for humans — same convention as the existing --console/--network flags on show (cli/src/index.ts).
Notes
This queries the static saved snapshot, so visibility/computed-style questions are out of scope (those belong to failure-time facts collection — see tracking issue). Scope here is structural queries only.
Needs an HTML parser in the CLI. Prefer something already in the dependency tree if possible; otherwise a small, well-maintained one (e.g. node-html-parser). Playwright is an engine dependency, not a CLI one — don't pull it into the CLI for this.
Good first issue: self-contained, no engine changes, clear input/output.
Acceptance criteria
verfix show <id> --dom 'button' lists matches from the saved snapshot with attributes and truncated text
Zero-match case prints a clear message (and [] in JSON mode)
Missing-snapshot case handled gracefully (same UX as --console when a log is missing)
Activity
feat(cli): add show --dom to query the saved DOM snapshot (#57) (#79)