Repository navigation
feat: pre-render supported devices with Ecosystem hydration (DEVDB-484) - #764
Merged
Merged
Conversation
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
prefetchSupportedDevicesfrom@seamapi/react/server.jsand a lightweight native React entry with the App Router client boundary from@seamapi/react/ecosystem-react.js.EcosystemProviderfrom 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.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