Skip to content

fix(storefront): show tunnel catalog when SSR fetch is slow or empty#683

Closed
HananINouman wants to merge 1 commit into
mainfrom
fix/storefront-service-catalog
Closed

fix(storefront): show tunnel catalog when SSR fetch is slow or empty#683
HananINouman wants to merge 1 commit into
mainfrom
fix/storefront-service-catalog

Conversation

@HananINouman

@HananINouman HananINouman commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Use cluster-local SERVICES_URL, bind Next on 0.0.0.0 in the storefront pod, and poll /api/services.json immediately on mount so offers appear without waiting for the 10s refresh interval.

Issue: Tunnel storefront showed no services while /api/services.json had offers. Causes:

  • Unreliable SSR catalog fetch (short k8s DNS, pod-IP Host, Next bind)
  • Parser rejected legacy bare-array catalog JSON (only envelope worked)

Fix:

  • catalog.ts: SSR via public Host + in-cluster fallback; accept array or envelope; cluster.local + HOSTNAME=0.0.0.0 on pod
  • catalog-client.ts + ServicesList: hydrate from SSR, client fetch("/api/services.json") on mount + every 10s
  • tunnel.go: env vars for storefront pod
Screenshot 2026-07-01 at 5 20 26 PM

@HananINouman HananINouman force-pushed the fix/storefront-service-catalog branch 3 times, most recently from c13e5d4 to 2856019 Compare July 1, 2026 16:01
Fix server-side catalog fetch (public Host + in-cluster fallback,
cluster.local SERVICES_URL, HOSTNAME=0.0.0.0). ServicesList hydrates from
SSR then polls /api/services.json on the client every 10s for new offers.

Co-authored-by: Cursor <cursoragent@cursor.com>
@HananINouman HananINouman force-pushed the fix/storefront-service-catalog branch from 2856019 to f32fb51 Compare July 1, 2026 16:04
OisinKyne added a commit that referenced this pull request Jul 1, 2026
OisinKyne added a commit that referenced this pull request Jul 1, 2026
OisinKyne added a commit that referenced this pull request Jul 1, 2026
@OisinKyne

Copy link
Copy Markdown
Contributor

implemented this in #685

@OisinKyne OisinKyne closed this Jul 1, 2026
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