Repository navigation
fix: Load SupportedDevices from Ecosystem device model summaries - #746
Merged
Merged
Conversation
SupportedDevices now reads GET /v1/device_models/summaries/list (seamapi/ecosystem#69, DEVDB-437): the same models, filters and caller rules as device_models/list in a slim shape without commerce data. With brotli, the Yale list goes from 384 kB to 214 kB on the wire (5.5 MB to 2.5 MB of JSON) and Schlage from 88 kB to 54 kB. The component's attributes are unchanged. useEcosystemDeviceModels still returns the full device model shape. The fake Ecosystem API serves the summaries route, validates an embed key when one is sent, defaults manufacturer to a manufacturer key's own and returns manufacturer_context from embed/resolve, like Ecosystem now does. Tests serve the fake in-process instead of on a local port, which could collide with the fake Devicedb server's port. Refs DEVDB-445, DEVDB-437 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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/<seam-supported-devices>now loads Ecosystem's slimGET /v1/device_models/summaries/list(seamapi/ecosystem#69, DEVDB-437) instead ofdevice_models/list. The summaries return the same models, filters and caller rules, including the manufacturer-key default, but without marketplace and commerce listings. The component's attribute API is unchanged.Refs DEVDB-445, DEVDB-437
Payload (production,
?manufacturer=…&limit=500)device_models/list(before)device_models/summaries/list(after)device_models/list(before)device_models/summaries/list(after)That's about 44% less on the wire for Yale and 39% less for Schlage, and 54–57% less JSON to parse. Most of what's left in the summaries is variant images and their renditions.
Changes
useEcosystemDeviceModelSummaries. It follows pagination likeuseEcosystemDeviceModelsand is not exported.useEcosystemDeviceModelsstill returns the fullDeviceModelshape.public-types(origin/main 055335c):DeviceModelSummary,DeviceModelSummaryVariant,DeviceImage,DeviceImageFormat,CapabilitySummaryandDeviceModelSummariesListResponse.EmbedResolution.manufacturer_contextis now documented as shipped (DEVDB-439).v1/device_models/summaries/list, includinginclude=commerce.manufactureron the device model routes and/compatibility.embed/resolvereturnsmanufacturer_context.include_forbiddenis ignored for public callers.device_models/summaries/listand neverdevice_models/list.EADDRINUSEfailures flaky. That also happens onmaintoday.Checks run locally
npm run lint,npm run typecheck,npm test(65 tests, 3 runs in a row),npm run buildandnpm run sizeall pass.ecosystem.jsis 208.5 kB raw / 65.8 kB gzip, unchanged.Storybook's Ecosystem/SupportedDevices stories call
embed/resolve,device_models/summaries/listandmanufacturers/listwith no console errors. The component's helpers were also run against the real Yale summaries response: 169 models, images and capabilities resolve.🤖 Generated with Claude Code