- useStore(): wrap dispatch actions in useMemo so the reference is stable
across renders, preventing infinite effect loops in EventRouter
- Sidebar: subscribe to terminalStateByThreadId data instead of the
getTerminalState function reference so terminal indicators re-render
- reduceThreadTerminalState: return original state (not normalized copy)
for no-op actions so the reference equality guard in applyTerminalAction
can short-circuit unnecessary store updates
Co-authored-by: Julius Marminge <[email protected]>