Skip to content

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

fix(ci): align background cancellation checks with current Host logic

Seraph-x0243c1b07ffb
diff --git a/apps/desktop/test/background-tasks.test.mjs b/apps/desktop/test/background-tasks.test.mjs
index 9ed9f75fd..e47d40392 100644
--- a/apps/desktop/test/background-tasks.test.mjs
+++ b/apps/desktop/test/background-tasks.test.mjs
@@ -78,7 +78,7 @@ test("a background Bash call returns a backgroundTaskId and never a blocking std
test("turn cancellation and timeout cannot reach a background task: it never registers a bash cancellation", () => {
assert.match(
rpcSources.replace(/\r/g, ""),
- /cancellation_receiver = if remote_workspace\.is_some\(\)[\s\S]*?&& !p\.run_in_background\)/,
+ /if remote_workspace\.is_none\(\) && p\.tool_name == "Bash" && p\.run_in_background \{\s*None\s*\} else \{[\s\S]*?register_bash_cancellation\(/,
);
assert.match(rpcSources.replace(/\r/g, ""), /"Bash" \| "GenerateImages"/);
});
diff --git a/scripts/e2e/transcript-long-history.tsx b/scripts/e2e/transcript-long-history.tsx
index 6523802eb..16a260556 100644
--- a/scripts/e2e/transcript-long-history.tsx
+++ b/scripts/e2e/transcript-long-history.tsx
@@ -276,8 +276,15 @@ export async function transcriptLongHistoryProbe() {
scroller.dispatchEvent(new Event("scroll", { bubbles: true }));
await settled();
const readingTop = scroller.scrollTop;
+ const readingHeight = scroller.scrollHeight;
await stream(largest, " reader-stays");
- assert(Math.abs(scroller.scrollTop - readingTop) < 2, "stream stole the reader's scroll position");
+ assert(Math.abs(scroller.scrollTop - readingTop) < 2,
+ `stream stole the reader's scroll position: ${JSON.stringify({
+ before: { top: readingTop, height: readingHeight },
+ after: { top: scroller.scrollTop, height: scroller.scrollHeight },
+ viewport: scroller.clientHeight,
+ reducedMotion: window.matchMedia("(prefers-reduced-motion: reduce)").matches,
+ })}`);
// Terminal re-key must replace exactly the provisional row, survive cache
// reselection and expose fresh copy text through the real turn toolbar.