Repository navigation
Conversation
…ce selector errors
…okup, and selector errors
domfahey
force-pushed
the
fix/browser-inspect-and-snapshot
branch
from
November 25, 2026 03:57
ef0a680 to
7a52305
Compare
…t non-JSON numbers - default snapshot names slug the percent-decoded path, so `/search results/` gives snapshot-search-results.png instead of snapshot-search-20results.png - resolve_url lowercases the scheme of a full URL (`HTTPS://…` → `https://…`) - --js/--assert return NaN, ±Infinity, -0 and BigInts as strings instead of failing with "did not return a JSON value" - --count reports an invalid selector as `browser query failed`, like the other selector operations - document that --mobile cannot be combined with --width/--height/--scale Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
|
Hi! This is the first of a few small PRs; I'll send them one at a time. What it does: fixes Worth a look: Note: the workflow runs are waiting for maintainer approval because this comes from a fork. Could you approve them? Locally, Queued behind it: #114 (search parsing and validation) and #116 (tests and coverage). |
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.
Fixes edge cases in
inspectandsnapshot. 7 files: about 470 lines of source, about 200 lines of tests.Behaviour changes
inspect --js/--assert--assert "throw true"passed); objects came back emptynullcome back as JSON; NaN/Infinity/BigInt as strings ("NaN")inspect --text svgdiv[)browser query failed, the same from every optionsnapshot buying/HTTPS://…//a b/snapshot-buying.png,snapshot-a-b.png; scheme normalized to lowercase--mobile --scale 2--scalesilently ignored--helpand the guide)PATHEXTmatches are tried firstWhere to look
decode_eval_resultinsrc/commands/inspect.rs: how a JS result becomes JSON or an error.resolve_url/default_outinsrc/commands/snapshot.rs.tests/inspect.rsandtests/snapshot.rsdrive a real Chrome when one is installed and skip otherwise.percent-encodingis now a direct dependency; it was already inCargo.lockthroughurl.Checklist
cargo fmt,cargo clippy --all-targets -- -D warningsandcargo testpassdocs/GUIDE.mdand--help