Skip to content

fix(smart-dom-reader): keep generated CSS selectors unique - #284

Open
0809android wants to merge 1 commit into
WebMCP-org:mainfrom
0809android:agent/fix-smart-dom-selectors
Open

fix(smart-dom-reader): keep generated CSS selectors unique#284
0809android wants to merge 1 commit into
WebMCP-org:mainfrom
0809android:agent/fix-smart-dom-selectors

Conversation

@0809android

Copy link
Copy Markdown

Summary

data-cy, data-test, and data-test-id were emitted as data-testid. Repeated name values could select another element.

Preserve the source attribute and require the chosen CSS selector to match only its element in the same DOM root.

Testing

  • pnpm --filter @mcp-b/smart-dom-reader test:local — 15 passed
  • pnpm --filter @mcp-b/smart-dom-reader typecheck
  • pnpm --filter @mcp-b/smart-dom-reader check

@0809android
0809android marked this pull request as ready for review August 10, 2026 15:14
@0809android
0809android requested a review from a team as a code owner August 10, 2026 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants