The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
fix(composer): correct token count display in ComposerTokenStats tests
Steven Enamakela01c696f558a
diff --git a/app/src/components/chat/ComposerTokenStats.test.tsx b/app/src/components/chat/ComposerTokenStats.test.tsxindex e21c9c71fc..e130e456de 100644--- a/app/src/components/chat/ComposerTokenStats.test.tsx+++ b/app/src/components/chat/ComposerTokenStats.test.tsx@@ -95,12 +95,15 @@ describe('<ComposerTokenStats />', () => {fireEvent.click(screen.getByRole('button'));expect(screen.getByTestId('composer-token-breakdown')).toBeInTheDocument();- // Radix's dismissable layer listens for `pointerdown`, not `mousedown` (the- // hand-rolled listener this used to have), and defers attaching that- // listener by one macrotask (`setTimeout(…, 0)`) so the same pointerdown- // that opened the popover can't immediately close it again.+ // Radix's dismissable layer treats an outside interaction as pointerdown+ // *followed by* a click (not a bare `mousedown`, the hand-rolled listener+ // this used to have) and defers attaching its listener by one macrotask+ // (`setTimeout(…, 0)`) so the same pointerdown that opened the popover+ // can't immediately close it again — see the same pattern documented in+ // ui/ModalShell.test.tsx.await new Promise(resolve => setTimeout(resolve, 0));fireEvent.pointerDown(document.body);+ fireEvent.click(document.body);expect(screen.queryByTestId('composer-token-breakdown')).not.toBeInTheDocument();});