Patch a self-created session's guid back onto the window's props

Fixkamo-internal
Shipped
August 26, 2026 at 9:30 AM UTC
Author
kamo
Commit
5824dc2

When opened without a sessionGuid (launcher / nav / command palette), AiChatTool POSTs a new session and calls setSessionGuid(guid) but never told the tool-windows store, so the window's props stayed `{}` forever. conversationKeyForWindow **************** reads props.sessionGuid for 'ai-chat' and got null: the window never highlighted as the active row in the switcher column, its `ai:` unread key was unaddressable, and — the sharper defect — clicking that same session's row in the column could never dedup onto this window (ai-chat's maxInstances is Infinity), opening a second window on the same conversation instead. Mirrors ChatTool.tsx's own tool:patchProps effect for its self-resolved session exactly: fire once sessionGuid is set, keyed off [sessionGuid, windowId]. TDD: the added test renders with no sessionGuid, lets the POST resolve, and asserts a tool:patchProps event fires carrying the created guid. It failed against the pre-fix code (0 calls) before the fix landed.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing