Skip to content

fix: Load SupportedDevices from Ecosystem device model summaries - #746

Merged
sybohy merged 1 commit into
mainfrom
sy/devdb-445-device-model-summaries
Oct 17, 2026
Merged

sybohy merged 1 commit into
mainfrom
sy/devdb-445-device-model-summaries

Conversation

@sybohy

@sybohy sybohy commented Oct 17, 2026

Copy link
Copy Markdown
Member

SupportedDevices / <seam-supported-devices> now loads Ecosystem's slim GET /v1/device_models/summaries/list (seamapi/ecosystem#69, DEVDB-437) instead of device_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)

Manufacturer Endpoint Models JSON brotli on the wire gzip
yale device_models/list (before) 169 5,508,728 B (5.5 MB) 383,666 B (384 kB) 547,096 B
yale device_models/summaries/list (after) 169 2,544,613 B (2.5 MB) 213,679 B (214 kB) 236,144 B
schlage device_models/list (before) 17 1,205,025 B (1.2 MB) 88,131 B (88 kB) 112,681 B
schlage device_models/summaries/list (after) 17 520,744 B (521 kB) 53,594 B (54 kB) 67,602 B

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

  • New internal hook useEcosystemDeviceModelSummaries. It follows pagination like useEcosystemDeviceModels and is not exported.
  • The exported useEcosystemDeviceModels still returns the full DeviceModel shape.
  • New types copied from Ecosystem public-types (origin/main 055335c): DeviceModelSummary, DeviceModelSummaryVariant, DeviceImage, DeviceImageFormat, CapabilitySummary and DeviceModelSummariesListResponse. EmbedResolution.manufacturer_context is now documented as shipped (DEVDB-439).
  • The SupportedDevices helpers now take the summary shape.
  • Fake Ecosystem API changes, to match what Ecosystem does now:
    • Adds v1/device_models/summaries/list, including include=commerce.
    • Validates an embed key on the optional-auth reads when one is sent.
    • A manufacturer key defaults manufacturer on the device model routes and /compatibility.
    • embed/resolve returns manufacturer_context.
    • include_forbidden is ignored for public callers.
  • Tests:
    • A new test asserts SupportedDevices requests device_models/summaries/list and never device_models/list.
    • The fake Ecosystem now runs in-process through a fetch stub instead of a local HTTP server. On a busy machine the server's OS-assigned port could take the port the fake Devicedb server had just reserved, which made EADDRINUSE failures flaky. That also happens on main today.

Checks run locally

npm run lint, npm run typecheck, npm test (65 tests, 3 runs in a row), npm run build and npm run size all pass. ecosystem.js is 208.5 kB raw / 65.8 kB gzip, unchanged.

Storybook's Ecosystem/SupportedDevices stories call embed/resolve, device_models/summaries/list and manufacturers/list with 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

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>
@sybohy
sybohy requested review from dawnho and razor-x as code owners October 17, 2026 11:05
@sybohy
sybohy merged commit 152c3ed into main Oct 17, 2026
13 checks passed
@sybohy
sybohy deleted the sy/devdb-445-device-model-summaries branch October 17, 2026 11:09

This branch was successfully deployed

1 active deployment
Preview — 4c53d7ed Deployed Oct 17, 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