diff --git a/packages/cli/test/acp/service-usage.test.ts b/packages/cli/test/acp/service-usage.test.ts index be6e4aee3e1..2e104c27d4d 100644 --- a/packages/cli/test/acp/service-usage.test.ts +++ b/packages/cli/test/acp/service-usage.test.ts @@ -12,13 +12,7 @@ describe("acp service prompt routing and usage", () => { return Response.json({ data: makeSession("ses_routes") }) } if (request.method === "POST" && request.path === "/api/session/ses_routes/command") { - const id = requestID(request) - completeTurn(context, "ses_routes", { - id: `evt_${id}`, - type: "session.inbox.delivered", - data: { sessionID: "ses_routes", inboxID: id }, - }) - return Response.json({ data: {} }) + return new Response(null, { status: 204 }) } if (request.method === "POST" && request.path === "/api/session/ses_routes/skill") { const id = requestID(request) @@ -65,9 +59,8 @@ describe("acp service prompt routing and usage", () => { const skill = fixture.requests.find((request) => request.path === "/api/session/ses_routes/skill") const compact = fixture.requests.find((request) => request.path === "/api/session/ses_routes/compact") expect(command?.body).toMatchObject({ - id: expect.any(String), command: "review", - arguments: "now", + text: "now", files: [], delivery: "steer", }) diff --git a/packages/tui/test/component/session-tabs-mouse.test.tsx b/packages/tui/test/component/session-tabs-mouse.test.tsx index 45cece235c2..9ce33f905a7 100644 --- a/packages/tui/test/component/session-tabs-mouse.test.tsx +++ b/packages/tui/test/component/session-tabs-mouse.test.tsx @@ -201,7 +201,7 @@ test("reflows held tabs when the pointer leaves the strip", async () => { await app.mockMouse.moveTo(0, 1) await app.mockMouse.moveTo(20, 0) - await app.waitForFrame((frame) => Array.from(frame.split("\n")[0] ?? "")[20] === "✕") + await app.waitForFrame((frame) => Array.from(frame.split("\n")[0] ?? "")[20] === "✕", { maxPasses: 100 }) expect(Array.from(app.captureCharFrame().split("\n")[0] ?? "")[22]).not.toBe("✕") } finally { app.renderer.destroy() diff --git a/packages/tui/test/context/session-tabs.test.tsx b/packages/tui/test/context/session-tabs.test.tsx index 7541a06aa51..5d9481eedb5 100644 --- a/packages/tui/test/context/session-tabs.test.tsx +++ b/packages/tui/test/context/session-tabs.test.tsx @@ -263,7 +263,11 @@ test("stores session tabs for the current working directory by default", async ( try { const file = path.join(setup.state, "test", "tui", "tabs.json") - await wait(() => Bun.file(file).size > 0) + await wait(async () => { + if (!(await Bun.file(file).exists())) return false + const stored = await Bun.file(file).json() + return stored.cwd[directory]?.tabs.some((tab: { sessionID: string }) => tab.sessionID === "first") + }) const stored = await Bun.file(file).json() expect(stored.global).toEqual({ tabs: [], unread: {} }) expect(Object.keys(stored.cwd)).toEqual([directory])