Repository navigation
feat(cli): verfix show --dom — query the saved DOM snapshot - #79
Merged
Merged
Conversation
Lets agents ask structural questions about a run's saved DOM snapshot (tag, key attributes, truncated text, match count) via a CSS selector instead of grepping raw HTML; omitting the selector prints a compact outline of landmarks, dialogs, and headings. Uses node-html-parser (new CLI dependency) rather than pulling a headless browser into the CLI.
# Conflicts: # cli/src/index.ts
Closed
7 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #57.
Answers "what was actually in the failure-time DOM?" without grepping raw HTML:
verfix show <id> --dom '<css selector>'queries the run's saved snapshot and prints matches (tag, key attributes: id/class/role/data-testid/aria-*, truncated text, match count).--domwith no selector prints a compact outline: landmarks, dialogs, headings.dom_matches: []in JSON / clear pretty message; missing snapshot ⇒ sameartifact_not_foundUX as--console; invalid selector ⇒invalid_selector, exit 2.queryDomSnapshot()incli/src/local-runner.tsusingnode-html-parser(new CLI dependency — deliberately small; no headless browser pulled into the CLI). Static-snapshot queries only; visibility/computed-style questions belong to failure-time facts (feat(workers): report cause-agnostic failure-time facts (page state, prior anomalies) in failure JSON #55).run'sdetail_commandsgains an additivedomentry.Verified: typechecks clean, cli build + full test suite green (incl. local-run e2e),
json-purity.shgreen, manual e2e against the testbed covering match/outline/zero-match/invalid-selector/missing-snapshot paths.