Skip to content

Commit e0c5e00

Browse files
committed
Align stale chrome and adapter tests with current product behavior
Fleet board chrome and stall bang blink are intentionally off; transcript Task rows and working chrome own that status. The duplicate grok-responses unit test still expected summary auto after the adapter moved to detailed.
1 parent b495554 commit e0c5e00

4 files changed

Lines changed: 30 additions & 40 deletions

File tree

src/tui/product-host.test.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ describe("mountProductHost", () => {
302302
expect(host.shell.streamLog).toEqual([])
303303
})
304304

305-
test("the agents panel's elapsed clock advances on the sticky poll tick, without another chrome push", async () => {
305+
test("setChrome with running agents does not paint an agents panel clock", async () => {
306306
const now = Date.now()
307307
const { host, renderOnce, captureCharFrame } = await mountHeadless({
308308
chrome: {
@@ -320,14 +320,15 @@ describe("mountProductHost", () => {
320320
})
321321
try {
322322
await renderOnce()
323-
expect(captureCharFrame()).toContain("0:59")
323+
// Fleet board chrome is off — sticky poll must not resurrect an agents
324+
// panel clock from injected chrome state.
325+
expect(captureCharFrame()).not.toContain("0:59")
326+
expect(captureCharFrame()).not.toContain("map callers")
324327

325-
// No further chrome push or event — only wall-clock time passing.
326-
// Only the 200ms sticky poll can be responsible for the clock moving.
327328
await new Promise((r) => setTimeout(r, 1_100))
328329
await renderOnce()
329-
expect(captureCharFrame()).not.toContain("0:59")
330-
expect(captureCharFrame()).toMatch(/1:0\d/)
330+
expect(captureCharFrame()).not.toMatch(/1:0\d/)
331+
expect(captureCharFrame()).not.toContain("map callers")
331332
} finally {
332333
host.dispose()
333334
}

src/tui/ramp-paint.test.ts

Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,7 @@
99
import { describe, expect, test } from "bun:test"
1010

1111
import { withTestRenderer } from "./harness"
12-
import {
13-
RAMP_CYCLE_MS,
14-
STALL_BLINK_BURST_MS,
15-
STALL_BLINK_CYCLE_MS,
16-
} from "./ramp"
12+
import { RAMP_CYCLE_MS } from "./ramp"
1713
import { attachSessionBridge, createRecordingPort } from "./runtime-bridge"
1814
import { createAppShell } from "./shell"
1915
import { UI } from "./theme"
@@ -231,7 +227,7 @@ describe("turn ramp paint", () => {
231227
)
232228
})
233229

234-
test("a stalled turn blinks a bang into the border, then settles to a static one", async () => {
230+
test("silence past the stall notice still paints working, not a bang", async () => {
235231
await withTestRenderer(
236232
async (h) => {
237233
const shell = createAppShell(h.renderer, {
@@ -249,26 +245,20 @@ describe("turn ramp paint", () => {
249245
await h.renderOnce()
250246
expect(slotGlyph(h.captureCharFrame())).toMatch(DENSITY)
251247

248+
// Past the notice threshold the watchdog may flash, but operator
249+
// chrome keeps the working ramp — recovery is silent under the hood.
252250
advance(1_500)
253251
await h.renderOnce()
254-
// Scoped to the slot: a bang anywhere else in the frame is not this.
255-
const blinking = new Set<string>()
256-
for (let i = 0; i < 4; i++) {
257-
blinking.add(slotGlyph(h.captureCharFrame()))
258-
advance(STALL_BLINK_CYCLE_MS / 2)
259-
await h.renderOnce()
260-
}
261-
expect(blinking.has("!")).toBe(true)
262-
expect(blinking.size).toBeGreaterThan(1)
252+
expect(statusRow(h.captureCharFrame())).toContain("working")
253+
expect(slotGlyph(h.captureCharFrame())).toMatch(DENSITY)
254+
expect(slotGlyph(h.captureCharFrame())).not.toBe("!")
263255

264-
// Past the burst the alarm stops strobing but still reads as one.
265-
advance(STALL_BLINK_BURST_MS * 2)
266-
await h.renderOnce()
267-
const settled = statusRow(h.captureCharFrame())
268-
expect(slotGlyph(settled)).toBe("!")
269-
advance(STALL_BLINK_CYCLE_MS / 2)
256+
// The slot keeps moving: still a live working pulse, not a settled bang.
257+
const first = slotGlyph(h.captureCharFrame())
258+
advance(RAMP_CYCLE_MS / 4)
270259
await h.renderOnce()
271-
expect(statusRow(h.captureCharFrame())).toBe(settled)
260+
expect(slotGlyph(h.captureCharFrame())).not.toBe(first)
261+
expect(slotGlyph(h.captureCharFrame())).toMatch(DENSITY)
272262
} finally {
273263
bridge.dispose()
274264
}

src/tui/runtime-channels.test.ts

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,8 @@ describe("permission.grant channel", () => {
197197
})
198198
})
199199

200-
describe("agents chrome (store-driven tool state)", () => {
201-
test("the live tool name reaches the agents chrome zone", async () => {
200+
describe("agents chrome (zone off — transcript Task rows own live lanes)", () => {
201+
test("setChrome with running agents does not paint an agents zone", async () => {
202202
const { host, frame, cleanup } = await mountHeadless({
203203
chrome: {
204204
agents: [
@@ -213,20 +213,19 @@ describe("agents chrome (store-driven tool state)", () => {
213213
},
214214
})
215215
try {
216-
// The board right-aligns each lane's tail into a column, so the tool
217-
// name is on the row but no longer adjacent to the description.
216+
// Fleet board chrome is off: live lane status rides transcript Task rows,
217+
// not a dedicated agents zone. Injecting agents into chrome must not paint
218+
// them into the frame or the transcript.
218219
const painted = await frame()
219-
expect(painted).toContain("map callers")
220-
expect(painted).toContain("grep")
221-
// Progress is chrome, never a transcript row: one line per worker tool
222-
// call would bury the turn it is a detail of.
220+
expect(painted).not.toContain("map callers")
221+
expect(painted).not.toContain("grep")
223222
expect(host.shell.streamLog).toEqual([])
224223
} finally {
225224
cleanup()
226225
}
227226
})
228227

229-
test("a later chrome push keeps the live tool name", async () => {
228+
test("a later chrome push still leaves the agents zone empty", async () => {
230229
const { host, frame, cleanup } = await mountHeadless()
231230
try {
232231
host.setChrome({
@@ -241,8 +240,8 @@ describe("agents chrome (store-driven tool state)", () => {
241240
],
242241
})
243242
const painted = await frame()
244-
expect(painted).toContain("map callers")
245-
expect(painted).toContain("grep")
243+
expect(painted).not.toContain("map callers")
244+
expect(painted).not.toContain("grep")
246245
} finally {
247246
cleanup()
248247
}

tests/unit/grok-responses-adapter.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ describe("grok-responses buildRequest", () => {
4242
expect(body["stream"]).toBe(true);
4343
expect(body["store"]).toBe(false);
4444
expect(body["include"]).toEqual(["reasoning.encrypted_content"]);
45-
expect(body["reasoning"]).toEqual({ summary: "auto" });
45+
expect(body["reasoning"]).toEqual({ summary: "detailed" });
4646
// No `instructions` field — the system prompt rides as a system input message.
4747
expect(body["instructions"]).toBeUndefined();
4848
const input = body["input"] as Array<Record<string, unknown>>;

0 commit comments

Comments
 (0)