KamoCRM

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

Fixkamo-internal
Shipped
26 ஆகஸ்ட், 2026 அன்று 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?

All of it arrives in your workspace on its own. Start on the free plan and read this page again in a month.

Start Free ForeverView Pricing