Commit Graph

2 Commits (e3ad653582caa9b7750dc744d07ea8af9ab924a6)

Author SHA1 Message Date
HomeOS Bootstrap 8086a9647b fix(addons): atomic Ring device creation + invalidate ingest gate cache (R15)
Codex R15 on the Ring bridge flagged two issues:
- [P1] Concurrent first-sight messages (retained info + motion on bridge
  startup) could create duplicate devices — no uniqueness on ring_id. Added a
  partial unique index on (config->>'ring_id'); resolveDevice now creates and,
  on the unique violation, re-fetches the winner (race-safe).
- [P2] The install-gate cache was never invalidated, so ingest was dropped for
  up to 15s after install and devices kept being created for up to 15s after
  uninstall. AddonService now forgets the shared cache key on install/uninstall.

+3 tests (unique-index guard, repeated-messages-reuse-device, cache
invalidation). Suite 43 green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-18 02:01:45 +02:00
HomeOS Bootstrap 52c1c5d3ac feat(addons): installable integrations framework + Ring connect UI
First half of the Ring integration (handoff §12: ring-mqtt, cloud token auth):
- Addons registry (static catalogue) + Addon model with encrypted config, so
  the Ring refresh token / credentials are never stored in plaintext.
- AddonService: install / uninstall (wipes secrets) / saveConnection (blank
  password keeps the stored one) / markStatus (from the bridge over MQTT).
- Addons page (new sidebar tab) with per-addon install, Cloud badge, live
  status pill, and a Ring connect modal capturing email/password/2FA — we
  never call Ring ourselves; creds are handed to the ring-mqtt sidecar.
- Uninstall behind a wire-elements confirm (R5). Fixed the confirm target:
  Livewire names App\Livewire\Addons\Index as "addons" (Index suffix dropped),
  and only $wire.$dispatch (not Alpine $dispatch) reaches the modal listener.
- DE/EN localization (R16); doorbell/package/cloud icons.

7 AddonTest cases (registry, install, encryption-at-rest, blank-password
keep, uninstall wipe, status guard). Suite 33 green; 12/12 tabs clean; full
install→connect→connecting→uninstall UI flow browser-verified, 0 console errors.

Backend bridge (ring-mqtt container) + Ring MQTT normalizer land next.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-18 01:47:02 +02:00