From 7580ffb1c0dac9ab5c70b9f59b6f4cf6833026bc Mon Sep 17 00:00:00 2001 From: Kit Langton Date: Mon, 19 Oct 2026 21:49:40 -0700 Subject: [PATCH] test(app): drop the traffic-light pixel test (#57279) --- packages/app/e2e/regression/tabs.spec.ts | 28 -------- .../app/e2e/utils/macos-window.fixture.tsx | 65 ------------------- packages/app/e2e/utils/macos-window.html | 18 ----- packages/app/vite.config.ts | 1 - 4 files changed, 112 deletions(-) delete mode 100644 packages/app/e2e/utils/macos-window.fixture.tsx delete mode 100644 packages/app/e2e/utils/macos-window.html diff --git a/packages/app/e2e/regression/tabs.spec.ts b/packages/app/e2e/regression/tabs.spec.ts index 830506b563b..4fb78986592 100644 --- a/packages/app/e2e/regression/tabs.spec.ts +++ b/packages/app/e2e/regression/tabs.spec.ts @@ -445,34 +445,6 @@ for (const [screen, href] of [ }) } -// macOS 26 traffic lights end 74px from the window edge. The collapsed toggle starts 16px past them, as the horizontal -// titlebar's first control does, and a fullscreen window has no traffic lights to clear. -for (const [window, fullscreen, start] of [ - ["windowed", false, 90], - ["fullscreen", true, 18], -] as const) { - test(`collapsed sidebar toggle clears the macOS traffic lights (${window})`, async ({ page }) => { - await mockWorkspace(page, { - name: "Tabs", - sessions: [a], - seed: { settings: { appearance: { tabLayout: "vertical", sidebarOpen: false } }, tabs: [a.id] }, - }) - await page.goto( - `/e2e/utils/macos-window.html?${new URLSearchParams({ server: SERVER, route: sessionHref(a.id), fullscreen: String(fullscreen) })}`, - ) - await expectSessionTitle(page, a.title) - - const toggle = await page.locator("main").getByRole("button", { name: "Toggle sidebar", exact: true }).boundingBox() - const project = await page.locator('[data-session-title] [data-slot="session-project-trigger"]').boundingBox() - - if (!toggle || !project) throw new Error("collapsed sidebar header has no bounding boxes") - expect(toggle.x).toBe(start) - // The header's contents follow the toggle on its center line. - expect(project.x).toBe(start + 32) - expect(project.y + project.height / 2).toBe(toggle.y + toggle.height / 2) - }) -} - test("vertical tab gaps hover and select the nearest row", async ({ page }) => { await mockWorkspace(page, { name: "Tabs", diff --git a/packages/app/e2e/utils/macos-window.fixture.tsx b/packages/app/e2e/utils/macos-window.fixture.tsx deleted file mode 100644 index e96f4c04aa4..00000000000 --- a/packages/app/e2e/utils/macos-window.fixture.tsx +++ /dev/null @@ -1,65 +0,0 @@ -import { MemoryRouter, createMemoryHistory } from "@solidjs/router" -import { render } from "solid-js/web" -import type { Bridge } from "@opencode/gui-extensions/sdk/bridge" -import { AppBaseProviders, AppInterface } from "../../src/app" -import { PlatformProvider, type Platform } from "../../src/runtime/platform/platform" - -// The app in a macOS desktop window at `route`, so its layout leaves room for the native traffic lights. A fullscreen -// window has none. -export function mount(input: { server: string; route: string; fullscreen: boolean }) { - const root = document.getElementById("root") - - if (!root) throw new Error("Missing fixture root") - const history = createMemoryHistory() - history.set({ value: input.route }) - render(() => { - const unused = async () => { - throw new Error("Unexpected fixture action") - } - - // No main-process extensions run in this fixture. - const bridge: Bridge = { - packaged: false, - call: unused, - subscribe: async () => ({ available: false }), - on: () => () => undefined, - embed: () => undefined, - capture: async () => undefined, - runMenubarItem: () => undefined, - configure: () => undefined, - manager: { - list: async () => [], - enable: async () => undefined, - disable: async () => undefined, - reload: async () => undefined, - install: async () => undefined, - remove: async () => undefined, - source: async () => "", - asset: () => "", - }, - } - - const platform: Platform = { - platform: "desktop", - os: "macos", - windowID: "macos-window-test", - windowFullscreen: () => input.fullscreen, - openExternal: () => undefined, - openDirectoryPickerDialog: async () => null, - notify: async () => undefined, - restart: unused, - extensions: bridge, - } - - return ( - - - } - /> - - - ) - }, root) -} diff --git a/packages/app/e2e/utils/macos-window.html b/packages/app/e2e/utils/macos-window.html deleted file mode 100644 index 62b53e494f3..00000000000 --- a/packages/app/e2e/utils/macos-window.html +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - -
- - - diff --git a/packages/app/vite.config.ts b/packages/app/vite.config.ts index de39bd9aea4..87b1ce7a66b 100644 --- a/packages/app/vite.config.ts +++ b/packages/app/vite.config.ts @@ -43,7 +43,6 @@ export default defineConfig({ "e2e/utils/settings-wsl.html", "e2e/utils/app-direction.html", "e2e/utils/windows-menu.html", - "e2e/utils/macos-window.html", ], }, }