Skip to content

feat(libs-data-access): load devices from certified devices json - #264

Merged
gurezo merged 3 commits into
mainfrom
feat/issue-255-certified-device-repository
Sep 12, 2026
Merged

gurezo merged 3 commits into
mainfrom
feat/issue-255-certified-device-repository

Conversation

@gurezo

@gurezo gurezo commented Sep 12, 2026

Copy link
Copy Markdown
Owner

PR タイトルは Conventional Commits に準拠してください (例: feat(web): add device list component)。
利用可能な scope は CONTRIBUTING.md と commitlint.config.js を参照してください。

Summary

Dashboard の Device Repository が、ローカルの apps/web/public/devices.json ではなく chirimen-certified-devices の generated/devices.json を runtime で取得するようにしました。取得結果は #254 の Adapter で既存 UI Model へ変換し、上位層は Certified JSON の構造に依存しません。

Type of change

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Chore (build/test/ci)
  • Breaking change

Related issues

What changed?

  • Certified Devices JSON の取得 URL と timeout を InjectionToken として定義した
  • JsonDeviceRepository が raw.githubusercontent.com から JSON を取得し、version 検証後に Adapter へ渡すようにした
  • HTTP error / timeout / malformed JSON / 未対応 version では空配列を返さず error にする
  • devices: [] は成功として空配列を返す
  • 自動 retry はせず、同一タブ内のキャッシュは既存の shareReplay を維持する
  • 上記の取得・変換・失敗ケースの unit test を追加した

API / Compatibility

  • Public API changes (export / function signature / behavior)
    • Details: CERTIFIED_DEVICES_JSON_URL / DEFAULT_CERTIFIED_DEVICES_JSON_URL / CERTIFIED_DEVICES_FETCH_TIMEOUT_MS を export。provideDeviceRepository() の戻り値を Provider から Provider[] に変更。取得失敗時は空配列ではなく Observable error になる
  • This change is backward compatible
  • This change introduces a breaking change

How to test

  1. pnpm nx test libs-data-access
  2. pnpm nx serve web で一覧を開き、GitHub 上の Certified Devices JSON からデバイスが表示されることを確認する
  3. /devices/ADS1015 など Certified 側の id で詳細が表示され、loading が止まっていることを確認する

Environment (if relevant)

  • Browser: Chromium (Cursor IDE browser)
  • OS: macOS
  • Node version: (local nx test / serve)
  • pnpm version: workspace default

Checklist

  • I ran tests locally (if available)
  • I updated docs/README if needed
  • I considered error handling where relevant

Made with Cursor

gurezo and others added 3 commits September 12, 2026 14:28
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@gurezo
gurezo merged commit 699adbd into main Sep 12, 2026
5 checks passed
@gurezo
gurezo deleted the feat/issue-255-certified-device-repository branch September 12, 2026 05:36
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.

[Feature]: Device Repository の参照元を Certified Devices へ変更する

1 participant