Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion webviews/src/agent-session/acpmux/styles.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 0 additions & 33 deletions webviews/test/chat-header-tab-row-surface.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { afterAll, beforeAll, expect, setDefaultTimeout, test } from "bun:test";
import fs from "node:fs";
import path from "node:path";
import { PNG } from "pngjs";
import { chromium, type Browser } from "playwright";
import { papercutPane } from "./support/papercutChat";
import { requireBrowserLane } from "./support/requireBrowserLane";
Expand Down Expand Up @@ -59,38 +58,6 @@ await requireBrowserLane("chat-header-tab-row-surface.test.ts", async () => {
}
});

test("the shipped tab-row shell leaves the native strip transparent", async () => {
const page = await browser.newPage({ viewport: { width: 240, height: 100 } });
// This is the stylesheet that build-agent-pane-web.sh inlines into the shipped agent pane.
// webviews/src/styles.css belongs to the page host and is deliberately not part of this fixture.
const shellCss = [read("agent-session/acpmux/styles.css"), read("agent-session/acpmux/header/header.css")].join(
"\n",
);
await page.setContent(`<!doctype html><html><head><style>
html, body { width: 100%; height: 100%; margin: 0; background: rgb(10, 20, 30); }
${shellCss}
</style></head><body>
<section class="acpmux-shell" data-tab-row
style="--acpmux-tab-row-height:40px;--agent-page-bg:rgb(200,10,20)">
<header class="acpmux-header" data-tab-row><div id="tools"></div></header>
</section>
</body></html>`);
const shot = PNG.sync.read(await page.screenshot());
const pixel = (x: number, y: number) => {
const offset = (y * shot.width + x) * 4;
return Array.from(shot.data.subarray(offset, offset + 4));
};
// Every pixel in the offered row, including its bottom edge, is the native strip beneath it.
expect(pixel(20, 8)).toEqual([10, 20, 30, 255]);
expect(pixel(20, 39)).toEqual([10, 20, 30, 255]);
// The page fill starts immediately after the offered row.
expect(pixel(20, 50)).toEqual([200, 10, 20, 255]);
expect(await page.locator(".acpmux-header").evaluate((node) => getComputedStyle(node, "::after").content)).toBe(
"none",
);
await page.close();
});

// Every pane header that draws these buttons: the floating chat's header and folded bar, the chat
// header's own row, and the chat header sharing the pane's tab row (chrome.tabs.rowTools, on by default).
const hosts = {
Expand Down
Loading