Skip to content

fix(xiaohongshu): accept overlapping duplicate filter options - #2446

Open
wuyak wants to merge 1 commit into
jackwener:mainfrom
wuyak:codex/official-v1.8.8
Open

fix(xiaohongshu): accept overlapping duplicate filter options#2446
wuyak wants to merge 1 commit into
jackwener:mainfrom
wuyak:codex/official-v1.8.8

Conversation

@wuyak

@wuyak wuyak commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Description

Xiaohongshu can render two overlapping DOM elements for one visible search filter option. OpenCLI currently treats any duplicate text match as ambiguous, so a search can stop with ambiguous_option even when both elements represent the same rendered option.

This change accepts multiple same-text matches only when every match has the same bounding box and active state. Matches at different positions or sizes, or with different active states, continue to fail closed with ambiguous_option.

The regression fixture reproduces the observed default 排序依据/综合 state with two overlapping active elements and verifies that no unnecessary filter click is issued. The existing distinct-position case continues to cover the genuinely ambiguous path.

Related issue: Fixes #2445

Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • 🌐 New site adapter
  • 📝 Documentation
  • ♻️ Refactor
  • 🔧 CI / build / tooling

Checklist

  • I ran the checks relevant to this PR
  • I updated tests or docs if needed
  • I included output or screenshots when useful

Documentation (if adding/modifying an adapter)

Not applicable: this fixes existing adapter behavior without changing commands, arguments, documentation surfaces, or failure types.

Screenshots / Output

npx vitest run --project adapter clis/xiaohongshu/search.test.js
Test Files  1 passed (1)
Tests       65 passed (65)

npm test
Test Files  631 passed (631)
Tests       7317 passed | 1 skipped (7318)

npm run typecheck
tsc --noEmit

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.

[Bug]: Xiaohongshu search fails with ambiguous_option on duplicated overlapping filter options

1 participant