- Shipped
- September 7, 2026 at 1:10 AM UTC
- Author
- Kamo
- Commit
- f0aaa6d
The assistant's KB links did nothing at all. Not a wrong path and not a rights problem — the click handler was never called, because no click event was ever dispatched. The `components` map handed to <ReactMarkdown> was an object literal built inside the render, so `p`, `a`, `code` and the rest were new functions on every render. React compares element types by identity: a new function is a new type, so it unmounted the entire rendered answer and mounted a replacement, replacing every DOM node in the message. ToolWindowShell carries `onMouseDown={onFocus}` on the window container, so pressing anywhere in an AI chat window re-renders the dock and every bubble in it. The press destroyed the anchor before the release reached it, and a browser only fires `click` when press and release land on the same node. Nothing threw and nothing logged; the link was simply inert, every time, on every message. Hoists the renderers to module scope, with the link as its own component reading the router itself, so the identities never change. The same churn was also dropping the member's text selection and rebuilding every code block on each render. Verified in a real browser against a production build: with a bubble inside a real dock window, the anchor now survives a press elsewhere in the window and the KB link navigates client-side, keeping the conversation on screen.