Skip to content

feat(core): wrap faceted search and compare guest queries in unstable_cache#2980

Open
jorgemoya wants to merge 5 commits intocanaryfrom
LTRAC-226/guest-cache-faceted
Open

feat(core): wrap faceted search and compare guest queries in unstable_cache#2980
jorgemoya wants to merge 5 commits intocanaryfrom
LTRAC-226/guest-cache-faceted

Conversation

@jorgemoya
Copy link
Copy Markdown
Contributor

@jorgemoya jorgemoya commented Apr 13, 2026

Linear: LTRAC-226

What/Why?

Wraps faceted search, brand, category, compare, and quick search data-fetching functions in unstable_cache for guest visitors. Faceted search results use a 300s revalidation interval; all others use the default DEFAULT_REVALIDATE_TARGET.

Functions migrated:

  • getBrandPageData (brand page)
  • getCategoryPageData (category page)
  • getSearchPageData (search page)
  • getProductSearchResults / fetchFacetedSearch (faceted search)
  • getCompareProducts (faceted compare)
  • getComparedProducts (compare page)
  • search quick search action (header)

Fifth in a series of PRs splitting #2910. Depends on #2979.

Rollout/Rollback

No feature flag. Rollback is a simple revert.

Testing

  • pnpm build passes
  • pnpm lint passes
  • Brand, category, and search pages load for guest users
  • Brand, category, and search pages load for authenticated users
  • Faceted filters work correctly
  • Compare page renders correctly
  • Quick search returns results

🤖 Generated with Claude Code

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 13, 2026

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

Project Deployment Actions Updated (UTC)
catalyst Ready Ready Preview, Comment Apr 14, 2026 2:23pm

Request Review

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 13, 2026

🦋 Changeset detected

Latest commit: e7c85c1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@bigcommerce/catalyst-core Minor
@bigcommerce/catalyst-client Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 13, 2026

Bundle Size Report

Comparing against baseline from a8dd99e (2026-04-14).

No bundle size changes detected.

@github-actions
Copy link
Copy Markdown
Contributor

Unlighthouse Performance Comparison — Vercel

Comparing PR preview deployment Unlighthouse scores vs production Unlighthouse scores.

Summary Score

Aggregate score across all categories as reported by Unlighthouse.

Prod Desktop Prod Mobile Preview Desktop Preview Mobile
Score 92 94 91 94

Category Scores

Category Prod Desktop Prod Mobile Preview Desktop Preview Mobile
Performance 76 87 70 84
Accessibility 95 91 95 95
Best Practices 100 95 95 100
SEO 88 100 100 100

Core Web Vitals

Metric Prod Desktop Prod Mobile Preview Desktop Preview Mobile
LCP 3.5 s 4.1 s 5.7 s 4.5 s
CLS 0.05 0.001 0.037 0.003
FCP 1.2 s 1.1 s 1.2 s 1.2 s
TBT 0 ms 0 ms 0 ms 40 ms
Max Potential FID 60 ms 50 ms 50 ms 90 ms
Time to Interactive 3.6 s 4.1 s 5.7 s 4.5 s

Full Unlighthouse report →

@jorgemoya jorgemoya changed the title LTRAC-226: Wrap faceted search and compare guest queries in unstable_cache LTRAC-226: feat(core): wrap faceted search and compare guest queries in unstable_cache Apr 13, 2026
@jorgemoya jorgemoya changed the title LTRAC-226: feat(core): wrap faceted search and compare guest queries in unstable_cache feat(core): wrap faceted search and compare guest queries in unstable_cache Apr 13, 2026
@jorgemoya jorgemoya marked this pull request as ready for review April 13, 2026 19:56
@jorgemoya jorgemoya requested a review from a team as a code owner April 13, 2026 19:56
@jorgemoya jorgemoya force-pushed the LTRAC-226/guest-cache-faceted branch from 62310c6 to 76e34b6 Compare April 13, 2026 19:59
@jorgemoya jorgemoya force-pushed the LTRAC-226/guest-cache-faceted branch from 152b716 to 96c2ed0 Compare April 14, 2026 14:07
@jorgemoya jorgemoya force-pushed the LTRAC-226/guest-cache-faceted branch from 96c2ed0 to 9ab2646 Compare April 14, 2026 14:10
@jorgemoya jorgemoya force-pushed the LTRAC-226/guest-cache-faceted branch from 9ab2646 to e3ea653 Compare April 14, 2026 14:17
jorgemoya and others added 5 commits April 14, 2026 09:21
…equest

Add optional locale parameter to client.fetch() for use in cached
contexts. Wrap headers() call in beforeRequest with try/catch so it
gracefully degrades inside unstable_cache.

No changes to getChannelId or beforeRequest callback signatures.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Wrap home page, header, footer, SEO canonical, reCAPTCHA, and root
layout metadata queries in unstable_cache for guest visitors.
Authenticated requests continue to bypass the cache with no-store.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Wrap product details, pricing, inventory, variant inventory, related
products, inventory settings, and reviews queries in unstable_cache
for guest visitors. Authenticated requests bypass the cache.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…_cache

Wrap brand, category, search, compare, and quick search queries in
unstable_cache for guest visitors. Faceted search uses 300s revalidation;
others use the default interval. Authenticated requests bypass the cache.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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