Skip to content

load devices lazily - #19

Merged
llozd merged 4 commits into
mainfrom
add-lazy-device-loading
Aug 9, 2026
Merged

load devices lazily#19
llozd merged 4 commits into
mainfrom
add-lazy-device-loading

Conversation

@llozd

@llozd llozd commented Aug 9, 2026

Copy link
Copy Markdown
Owner

The app fetched every device file at startup. That is fine for three devices and impossible for the 400 coming from the MIDI Guide dataset, so devices are now fetched one at a time, on selection.

devices/index.json entries become { file, name, manufacturer } instead of bare filenames, which is enough to build the picker without touching a device file. validate-devices.mjs checks that duplicated metadata stays in step with the device it describes.

loadShippedDevices splits into loadDeviceIndex and loadDevice. Selection is async and carries a token, so a slow fetch can't overwrite a newer selection, and the device select is keyed by filename rather than array position.

The picker is now two dependent selects: manufacturer, then model.

@llozd
llozd merged commit 8d203fd into main Aug 9, 2026
1 check passed
@llozd
llozd deleted the add-lazy-device-loading branch August 9, 2026 21:28
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