mirror of
https://github.com/multica-ai/multica.git
synced 2026-07-12 04:08:53 +02:00
Adds WSEventPayloadMap in @multica/core/types so callers get the precise payload type per event — no more `const p = msg as IssueUpdatedPayload` boilerplate at every handler. Mobile ws-client adopts the generic signature; web's untyped on() is untouched but can opt in later. useWSSubscriptions wraps the if-ws-and-wsId-then-useEffect-cleanup template every Layer-3 realtime hook used to repeat. Each of the 8 hooks sheds ~7 lines of lifecycle scaffolding and ~30 total `as Payload` casts go away; only 1 deliberate cast stays for the cross-event onTaskEvent (task:progress has no formal payload interface yet). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>