Route conversations across multiple inboxes
Route each conversation to the highest-priority matching inbox while exposing deterministic unassigned results.Description
Requirements
Export MultiInboxRouter from src/App.tsx.
Evaluate current rules against every conversation without changing either input array.
Choose the lowest numeric priority and then rule ID when multiple rules match.
Place conversations with no matching rule in a named Unassigned inbox.
Recompute routing when rule predicates, priorities, or inbox IDs change.
Expose visible status and interactive controls with native semantics, accessible names, and keyboard operation appropriate to the workflow.
Do not mutate props, nested caller-owned values, or arrays supplied to the component.
Priority match
Urgent and Billing rules both match C1
C1 appears only in the higher-priority inbox
Evaluate current rules against every conversation without changing either input array.
No match
C2 matches no rule
C2 appears in Unassigned
Choose the lowest numeric priority and then rule ID when multiple rules match.
Constraints
Use React state and effects only where the observable component contract requires themUse injected adapters instead of accessing network, storage, timers, or browser globals directlyKeep one authoritative state transition for each user or adapter event
Hints
Hint 1
Start with the matches-routing-rules behavior and make its observable result deterministic.
Hint 2
Model deterministic-priority independently before combining it with the remaining states.
Hint 3
Verify the boundary described by updates-on-rule-change without changing caller-owned input.