test(tui): wait for connection before tool event (#36958)

Co-authored-by: Aiden Cline <rekram1-node@users.noreply.github.com>
This commit is contained in:
opencode-agent[bot] 2026-07-14 18:38:00 -05:00 committed by GitHub
parent d88faeb6da
commit fca3bca19d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -764,8 +764,10 @@ test("classifies live tool rows independently of their call ID", async () => {
if (url.pathname === `/api/session/${sessionID}/message`) return json({ data: [], cursor: {} })
}, events)
let rows!: ReturnType<typeof createSessionRows>
let client!: ReturnType<typeof useClient>
function Probe() {
client = useClient()
rows = createSessionRows(() => sessionID)
return <box />
}
@ -783,6 +785,7 @@ test("classifies live tool rows independently of their call ID", async () => {
))
try {
await wait(() => client.connection.status() === "connected")
emitEvent(events, {
id: "evt_tool_started",
created: 1,