Skip to content

feat: pre-render supported devices with Ecosystem hydration (DEVDB-484) - #764

Merged
sybohy merged 2 commits into
mainfrom
feat/devdb484-server-rendering
Oct 31, 2026
Merged

sybohy merged 2 commits into
mainfrom
feat/devdb484-server-rendering

Conversation

@sybohy

@sybohy sybohy commented Oct 31, 2026

Copy link
Copy Markdown
Member

SupportedDevices currently fetches after the initial render, so a Next.js page serves a loading state instead of catalog HTML. Add a server loader that supplies the existing renderer with device, manufacturer, provider, requirement, and accessory data before rendering. The resulting page contains readable device content without JavaScript; hydration enables the same search, checkbox filters, and galleries.

  • Export prefetchSupportedDevices from @seamapi/react/server.js and a lightweight native React entry with the App Router client boundary from @seamapi/react/ecosystem-react.js.
  • Hydrate EcosystemProvider from serialized state, isolate fallback caches per render, validate the configured page origin with the embed key, remove excluded records before serialization, and throw on failed/incomplete reads.
  • Share query definitions between server and browser. Document static CSS loading, configurable Next.js revalidation, and the distinction between inline React rendering and the current Mintlify iframe.
  • Include a runnable Next.js App Router example and extend the fake API with provider metadata.

Validation: 106 tests passed in a serial run (the first parallel run hit an existing fake-server port collision); typecheck, full lint/Stylelint, build, package installation, and bundle budget passed. Installed the tarball in Next.js 16.4.3 / React 19.3.1 and ran a production build: the route is statically pre-rendered with hourly revalidation. Raw HTML assertions and an actual JavaScript-disabled Chromium visit confirm model names, numbers, capability tables, and provider requirements are HTML elements; native disclosures work. Hydrated Chromium checks passed search, two visibly checked capability selections, galleries, and no overflow at 1280/390/320px, with no console or hydration errors. Inspected desktop/mobile screenshots. Server tests also verify accessory links, exclusions, origin forwarding, isolation, and pagination failure.

No DeviceDB source data or manufacturer-guide provider filters change. The alternate-provider UX recommendation is tracked separately in DEVDB-485.

DEVDB-484

@sybohy
sybohy merged commit 5cfae56 into main Oct 31, 2026
13 checks passed
@sybohy
sybohy deleted the feat/devdb484-server-rendering branch October 31, 2026 17:45

This branch was successfully deployed

1 active deployment
Preview — 2db4a605 Deployed Oct 31, 2026 by vercel[bot]
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