mirror of
https://github.com/multica-ai/multica.git
synced 2026-07-12 20:29:10 +02:00
Three real bugs uncovered by the apps/mobile/ code review, all unprotected by parseWithFallback or by the actor/assignee polymorphism: - ActorAvatar + useActorLookup did not accept "system" actors. Inbox items with actor_type="system" (platform-triggered notifications) rendered a blank circle. Add a system glyph branch + widen the lookup signature. - AssigneeValue was narrowed to "member" | "agent", silently dropping squad assignments coming from web/desktop and preventing the user from clearing them on mobile. Widen to IssueAssigneeType and render squad assignees with a generic group glyph (no squad list query yet — picker still lists members + agents only, but Unassigned now clears squads). - Six read endpoints (getMe, listWorkspaces, listInbox, listMembers, listAgents, getIssue) returned bare fetch<T>() casts with no schema validation, violating the "API Response Compatibility" rule that installed-app architectures depend on. Add zod schemas with .loose() and enum-drift .catch() defenses, plus EMPTY_* sentinels so drift downgrades to "stale defaults render" instead of crashing the boot sequence. Also fixes the AttachmentSchema typecheck failure by adding the missing chat_session_id and chat_message_id fields (mobile schema had drifted from packages/core/types/attachment.ts). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>