Bug Fixes
1. Cross-tab message bleeding (queued messages)
When a queued message from chat A started processing while the user was viewing chat B, the streaming output appeared in chat B.
Root cause: The WS message router used generatingTabId as a fallback when d.tabId was absent, which could point to a background tab. Since the server always sends tabId with streaming messages, the fallback was unnecessary and harmful.
Fix: Removed generatingTabId fallback from the main routing logic, session_started, and session_title handlers. Messages now route strictly by their d.tabId or activeTabId.
2. Input state leaking between tabs
Typed text, attached files/screenshots, and reply-to quotes all leaked from one tab to another when switching or creating a new tab.
Root cause: _attachments[] and replyTo were global singletons — never saved per-tab in tabState, never cleared on switch.
Fix:
switchTab()now saves/restores_attachmentsandreplyToper-tabnewTab()clears attachments and reply-to after saving the previous tab's state- Added
_restoreAttachments()to rebuild UI chips from saved data
Full Changelog: v5.9.1...v5.9.2