Skip to content

fix(core,cli): resolve selector escaping, RFC 9309 queries, and JSX escaping - #25

Merged
Adnan9-63 merged 1 commit into
mainfrom
fix/core-differ-robots-cli-escaping
Nov 1, 2026
Merged

Adnan9-63 merged 1 commit into
mainfrom
fix/core-differ-robots-cli-escaping

Conversation

@Adnan9-63

Copy link
Copy Markdown
Member

Summary

This pull request resolves three critical bugs discovered during deep technical analysis of AgentLens:

  1. Issue fix(core): Fix CSS selector generation in differ to escape Tailwind and special character classes #13: CSS selector generation in differ.ts now safely escapes Tailwind CSS atomic utility classes (such as w-1/2, max-w-[500px], text-[14px]) using [class~="..."] and normalizes numeric IDs (e.g. [id="123-product"]), preventing DOMException: Not a valid selector errors in the Chrome Extension ghost overlay.
  2. Issue fix(core): Preserve URL query parameters in robots.txt path matching per RFC 9309 #14: scorer.ts now preserves URL search/query parameters when evaluating against robots.txt, fully conforming to RFC 9309 Section 2.2.2 requirements.
  3. Issue fix(cli): Safe JSX/TSX and Astro code generation escaping in compiler #17: The build compiler in compiler.ts now encapsulates component text inside JSX/Astro string expressions ({JSON.stringify(...)}), preventing compiler syntax errors when brand names or product specifications include curly braces ({, }) or angle brackets (<, >).

Related Issues

Verification

  • pnpm build: All 6 workspace packages built successfully
  • pnpm test: 38 / 38 unit tests passing across all packages
  • pnpm check-types: Zero TypeScript strict errors

…scaping

- fix(core): escape Tailwind classes and numeric IDs in differ buildCssSelector (Closes #13)
- fix(core): preserve URL query parameters in robots.txt matching per RFC 9309 (Closes #14)
- fix(cli): wrap text in JSX string expressions in compiler for TSX and Astro parity (Closes #17)
Copilot AI balanced review requested due to automatic review settings November 1, 2026 21:11

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@Adnan9-63
Adnan9-63 merged commit 7822da1 into main Nov 1, 2026
13 checks passed
@Adnan9-63
Adnan9-63 deleted the fix/core-differ-robots-cli-escaping branch November 1, 2026 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants