Repository navigation
Per-route selector in the route string: '/pricing @section.cta' - #91
Merged
Merged
Conversation
A route string's side may end in whitespace + @selector; a pair takes one per side. The required whitespace keeps /@user, /npm/@scope/pkg and ?e=a@b plain paths. A selector in the route beats --selector, which still replaces a config route object's selector. Fixes #26 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Oct 29, 2026
Merged
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.
What
A route string can carry its own selector: whitespace, then
@, after the path. This adds no new flag.Why
#26: you can now compare several components, plus whole pages, in one run without a config file. The first command above does the issue's four runs in one.
Syntax
::/) runs first. Then each side splits at its first\s+@, so a selector may contain@,::,>>or spaces, e.g.'/c @[href="mailto:[email protected]"]'./@userstays a path. Raw whitespace can't appear in a URL path or query, so every route that works today keeps its meaning:/@me,/npm/@scope/pkg,[email protected]and/@u@host. Sitemap and probe paths come fromURL, which percent-encodes whitespace, so they can't hit the separator either.'/a::/b @.x'givesgive a selector on both sides or neither.'/a @'giveshas an empty selector.Precedence
A selector written in the route beats
--selector/--left/right-selector, which beat a config route object'sselector. The second half is unchanged. Config strings get the syntax for free, and since a string with@is new syntax, this precedence breaks nothing that exists.GitHub Action limitation
The Action's
routesinput splits on whitespace, so it can't carry this syntax.docs/github-action.mdnow says per-route selectors go in the config. I left the optionalaction.ymlguard (reject a token starting with@) out. Add it if someone hits this.How tested
tests/unit/cli-args.test.ts:--selector/@meand[email protected]stay plain, and a selector with@is kept wholesrc/config.tschange and pass with it.typecheck,lint,format:check,npm test(340) andnpm run test:visual(347) all pass, after rebasing on 0.10.0.Docs: README,
docs/scoping.md,docs/github-action.md,skills/renderdiff/{SKILL,reference}.md, and--help.Fixes #26
🤖 Generated with Claude Code