Files
Ylber Gashi 8d3020e6e5 Unify mobile data access hooks with shared packages/ui (#363)
Mobile duplicated useLiveQuery, useQuery, useMutation, and buildQueryClient
from packages/ui with the only difference being the executor mechanism
(appService.mediator vs window.colanode). This consolidates them by:

- Adding a DOM-free core-api module to packages/ui with getColanode() and
  getEventBus() helpers that access globalThis, avoiding Window/DOM types
- Updating shared hooks and buildQueryClient to use these helpers instead
  of window.colanode/window.eventBus directly
- Installing a globalThis.colanode bridge in mobile's _layout.tsx that
  delegates to appService.mediator (matching the web/desktop pattern)
- Migrating all 41 mobile files to import hooks from @colanode/ui
- Deleting 4 duplicate mobile files (3 hooks + query-client)
- Adding Metro resolver override to force react/react-native resolution
  from the mobile app's node_modules (packages/ui ships a separate
  web-only React 19.2.4 that conflicts with mobile's RN-compatible 19.1.0)

Also standardizes useQuery to use buildQueryKey instead of inline sha256.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 19:11:18 +01:00
..