Skip to content

fix(developer-hub): remove price feeds from docs search index#3816

Open
aditya520 wants to merge 2 commits into
mainfrom
hydra/i-wjchrnyb/head
Open

fix(developer-hub): remove price feeds from docs search index#3816
aditya520 wants to merge 2 commits into
mainfrom
hydra/i-wjchrnyb/head

Conversation

@aditya520

@aditya520 aditya520 commented Jun 17, 2026

Copy link
Copy Markdown
Member

Parent issue: [[i-wjchrnyb]]

Summary

apps/developer-hub/src/app/api/search/route.ts was fetching ~9,262 price feeds from Hermes mainnet + Hermes beta + Lazer on every cold start and expanding them to ~36k Orama records — ~95% of the global search index. The dedicated /price-feeds/core/price-feeds/price-feed-ids and /price-feeds/pro/price-feed-ids pages already have their own in-page SearchInput (match-sorter over the same Hermes/Lazer data), and the global search entries just funneled users to those pages via ?search= query params — pure redundancy. The price-feed-core / price-feed-pro tags were consumed nowhere.

Changes

1. apps/developer-hub/src/app/api/search/route.ts (primary, scoped change)

  • Deleted getHermesFeeds(), getLazerFeeds(), toAdvancedIndex(), hermesSchema, lazerSchema.
  • indexes callback now returns only the MDX pages from source.getPages().
  • Dropped now-unused imports: z from zod, SYMBOLS_API_URL from ../../../config/pyth-pro-public.
  • Kept the AdvancedIndex type import for the static-pages cast (matches what was there before).
  • SYMBOLS_API_URL itself is intentionally left in src/config/pyth-pro-public.ts per the issue's out-of-scope list.
  • PriceFeedIdsCoreTable / PriceFeedIdsProTable untouched — they retain their in-page search and Hermes/Lazer fetches.

2. apps/developer-hub/turbo.json (rework: CI fix)

Override the inherited build outputs to add .source/** alongside .next/**. next build (via the fumadocs-mdx createMDX wrapper in next.config.js) generates apps/developer-hub/.source/server.ts etc., which src/lib/source.ts imports. The previous outputs only listed .next/** (inherited from root turbo.json), so when CI's turbo cache restored a prior developer-hub#build artifact, .source/ was missing — test:types then ran tsc and failed with Cannot find module '../../.source/server' plus the cascade of Property 'body' / 'toc' / 'full' / 'structuredData' does not exist on type 'PageData' errors that prompted the rework (see the prior run https://github.com/pyth-network/pyth-crosschain/actions/runs/27693529743/job/81910556027). Reproduced locally by deleting apps/developer-hub/.source after a build and re-running pnpm exec tsc: same errors. With .source/** in outputs, turbo now restores it from cache alongside .next/**, so dependent type-check / lint tasks resolve the generated module reliably.

(The inherited lib/** / dist/** entries were dropped from the override because developer-hub is a Next.js app and never produces those.)

Verification

  • grep -rn "price-feed-core\|price-feed-pro" apps/developer-hub/src → no matches.
  • pnpm turbo run test:types --filter=@pythnetwork/developer-hub → passes (fresh cache).
  • Cleared apps/developer-hub/.next and .source, re-ran pnpm turbo run test:types --filter=@pythnetwork/developer-hub with a populated turbo cache → cache-hit on build, .source/ restored from cache, test:types passes.
  • pnpm turbo run test:lint --filter=@pythnetwork/developer-hub → passes.
  • git merge-tree origin/main HEAD → clean (no conflicts).

Manual dev-server check could not be performed in this environment (no browser). Vercel's preview deployment for developer-hub succeeded on the prior commit, exercising the production build.

The global search index was fetching ~9,262 price feeds from Hermes
mainnet + Hermes beta + Lazer on every cold start, expanding to ~36k
Orama records — ~95% of the index by volume. The dedicated price-feed
pages already have their own in-page SearchInput, so the global hits
just funneled users to those same pages via ?search= query params.

Drop the Hermes/Lazer fetches and helpers entirely so the search index
contains only MDX pages.
@vercel

vercel Bot commented Jun 17, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
component-library Ready Ready Preview, Comment Jun 17, 2026 2:17pm
developer-hub Ready Ready Preview, Comment Jun 17, 2026 2:17pm
5 Skipped Deployments
Project Deployment Actions Updated (UTC)
api-reference Skipped Skipped Jun 17, 2026 2:17pm
entropy-explorer Skipped Skipped Jun 17, 2026 2:17pm
insights Skipped Skipped Jun 17, 2026 2:17pm
proposals Skipped Skipped Jun 17, 2026 2:17pm
staking Skipped Skipped Jun 17, 2026 2:17pm

Request Review

@vercel vercel Bot temporarily deployed to Preview – proposals June 17, 2026 13:44 Inactive
@vercel vercel Bot temporarily deployed to Preview – api-reference June 17, 2026 13:44 Inactive
@vercel vercel Bot temporarily deployed to Preview – staking June 17, 2026 13:44 Inactive
@vercel vercel Bot temporarily deployed to Preview – entropy-explorer June 17, 2026 13:44 Inactive
@vercel vercel Bot temporarily deployed to Preview – insights June 17, 2026 13:44 Inactive

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

The build task in apps/developer-hub/turbo.json inherited outputs of
".next/**" only from the root turbo.json, but `next build` (via the
fumadocs-mdx createMDX wrapper) also generates `.source/server.ts` and
related files that downstream tasks (`test:types`, `test:lint`) import
through `src/lib/source.ts`.

When CI restored a cached `build` artifact, only `.next/**` was rehydrated
and the `.source/` directory was missing, so `tsc` failed with
"Cannot find module '../../.source/server'" and the cascading "Property
'body' / 'toc' / 'full' / 'structuredData' does not exist on type
'PageData'" errors. Adding `.source/**` to the build outputs ensures the
fumadocs-generated source files are restored alongside `.next/`.
@aditya520 aditya520 requested a review from a team as a code owner June 17, 2026 14:15
@vercel vercel Bot temporarily deployed to Preview – staking June 17, 2026 14:15 Inactive
@vercel vercel Bot temporarily deployed to Preview – proposals June 17, 2026 14:15 Inactive
@vercel vercel Bot temporarily deployed to Preview – insights June 17, 2026 14:15 Inactive
@vercel vercel Bot temporarily deployed to Preview – api-reference June 17, 2026 14:15 Inactive
@vercel vercel Bot temporarily deployed to Preview – entropy-explorer June 17, 2026 14:15 Inactive
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