Skip to content

Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins

test(desktop): cover paged streaming tool previews

vastsa9d874a766403
diff --git a/apps/desktop/test/tool-run-head.test.mjs b/apps/desktop/test/tool-run-head.test.mjs
index 635035e3a..6eeac1be7 100644
--- a/apps/desktop/test/tool-run-head.test.mjs
+++ b/apps/desktop/test/tool-run-head.test.mjs
@@ -73,7 +73,10 @@ test("a run row states what the command did, not what the call did", () => {
});
test("the body is the output, with no card around it", () => {
- assert.match(transcript, /<ToolDetailBlocks blocks=\{blocks\} plain=\{runHead\} \/>/);
+ assert.match(
+ transcript,
+ /<ToolDetailBlocks blocks=\{blocks\} plain=\{runHead\} streaming=\{status === "running"\} \/>/,
+ );
// No heading, no frame — but the channel keeps a name, so stderr is not told
// apart by its tint alone.
assert.match(details, /plain \? \(\s*\/\/[\s\S]*?<span className="sr-only">\{label\}<\/span>/);
diff --git a/apps/desktop/test/transcript-style.test.mjs b/apps/desktop/test/transcript-style.test.mjs
index 8e9079aab..b9c78eb54 100644
--- a/apps/desktop/test/transcript-style.test.mjs
+++ b/apps/desktop/test/transcript-style.test.mjs
@@ -60,10 +60,16 @@ test("tool rows render structured blocks instead of dumping JSON", async () => {
assert.match(transcriptSource, /if \(variant !== "topology" && open && hasDetails && disclosure\.parentVisible/);
assert.match(transcriptSource, /const blocks = variant !== "topology" && open && hasDetails \? presentation\.current\?\.blocks : null/);
assert.match(transcriptSource, /<ToolChips chips=\{chips\} \/>/);
- assert.match(transcriptSource, /<ToolDetailBlocks blocks=\{blocks\} plain=\{runHead\} \/>/);
+ assert.match(
+ transcriptSource,
+ /<ToolDetailBlocks blocks=\{blocks\} plain=\{runHead\} streaming=\{status === "running"\} \/>/,
+ );
assert.match(permissionSource, /<ToolDetailBlocks blocks=\{argBlocks\} \/>/);
// Code bodies share the transcript highlighter rather than a second cache.
- assert.match(detailsSource, /<HighlightedCode code=\{block\.text\} lang=\{block\.lang\} \/>/);
+ assert.match(
+ detailsSource,
+ /block\.highlight \? <HighlightedCode code=\{page\} lang=\{block\.lang\} \/> : page/,
+ );
// Diffs reuse the review card rails; hits and paths open in the work panel.
assert.match(detailsSource, /className="diff-hunk"/);
assert.match(detailsSource, /openTarget\(\{ kind: "file", path: rel \}\)/);