Skip to content

fix(search): Skip stored SDK bias on SDK-agnostic doc pages#17974

Open
coolguyzone wants to merge 1 commit into
masterfrom
coolguyzone/fix/skip-platform-bias-on-product-docs
Open

fix(search): Skip stored SDK bias on SDK-agnostic doc pages#17974
coolguyzone wants to merge 1 commit into
masterfrom
coolguyzone/fix/skip-platform-bias-on-product-docs

Conversation

@coolguyzone
Copy link
Copy Markdown
Contributor

DESCRIBE YOUR PR

Fixes Algolia search surfacing irrelevant SDK pages above the product/concept doc the user is actually reading.

The Search component restores the user's last-used SDK from localStorage whenever the page passes no platform. On /platforms/* that's correct, but on product/concepts/CLI/guides/integrations pages — which have no SDK — the stored platform was still being attached to every query as an optionalFilters: sdk:<platform> boost.

  • Add SDK_AGNOSTIC_PATH_PREFIXES and gate the localStorage restore on it. On those paths, currentSearchPlatforms is cleared instead of restored.
  • The set mirrors PRODUCT_DOC_PREFIXES in scripts/algolia.ts, which already treats the same pages as the top-popularity non-SDK group at index time.
  • Homepage behavior is unchanged (it already passes useStoredSearchPlatforms={false}). /platforms/* behavior is unchanged.

IS YOUR CHANGE URGENT?

Help us prioritize incoming PRs by letting us know when the change needs to go live.

  • Urgent deadline (GA date, etc.):
  • Other deadline:
  • None: Not urgent, can wait up to 1 week+

SLA

  • Teamwork makes the dream work, so please add a reviewer to your PRs.
  • Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it.
    Thanks in advance for your help!

PRE-MERGE CHECKLIST

Make sure you've checked the following before merging your changes:

  • Checked Vercel preview for correctness, including links
  • PR was reviewed and approved by any necessary SMEs (subject matter experts)
  • PR was reviewed and approved by a member of the Sentry docs team

The Search component restores the user's last-used SDK from localStorage
whenever the page passes no platform. On `/platforms/*` that's correct,
but on product/concepts/cli/guides/integrations pages — which have no
SDK — the stored platform was still attached to every query as an
`optionalFilters: sdk:<platform>` boost, surfacing irrelevant SDK pages
above the product doc the user is actually reading.

Detect these SDK-agnostic prefixes and clear `currentSearchPlatforms`
instead of restoring. The set mirrors `PRODUCT_DOC_PREFIXES` in
`scripts/algolia.ts`, which already treats the same pages as the
top-popularity non-SDK group in the index ranking. Behavior on the
homepage (`useStoredSearchPlatforms={false}`) and on `/platforms/*`
pages is unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 1, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
develop-docs Ready Ready Preview, Comment Jun 1, 2026 9:34pm
sentry-docs Ready Ready Preview, Comment Jun 1, 2026 9:34pm

Request Review

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.

1 participant