GeezerVison is showing github.com — chore(desktop): preserve appearance during CDP diagnostics (#59681) · abn/opencode@b431db8
File tree
Expand file treeCollapse file tree
Open diff view settings
packages/app/e2e/performance/devex
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: AGENTS.md +6Lines changed: 6 additions & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
|
10 | 10 | - The script discovers the server with `opencode service status`, injects its private local credential from `opencode service get password`, and uses the `dev` TUI storage channel so tabs and other client-local state match the installed client. |
11 | 11 | - Prefer `dev:live` over plain `bun run dev` for this workflow. An implicit managed-service connection may replace the live server when the worktree client version differs; explicit `--server` warns and continues without replacing it. |
12 | 12 |
|
| 13 | +## Live Desktop Diagnostics |
| 14 | + |
| 15 | +- When attaching Playwright to a running desktop app, use `chromium.connectOverCDP(endpoint, { noDefaults: true })`. |
| 16 | +- Without `noDefaults`, Playwright applies light-mode media emulation during attachment. An app following the system theme then flashes light until the connection closes. The option also preserves the existing focus and other media preferences. |
| 17 | +- Do not emulate a color scheme or reduced-motion preference on the user's live window unless explicitly requested; use an isolated test context for those scenarios. |
| 18 | + |
13 | 19 | ## TUI Stories |
14 | 20 |
|
15 | 21 | - When a user asks for a TUI story, add a fixture-driven story under `packages/tui/src/feature-plugins/system/storybook` and register it in `index.tsx`. |
|
Collapse file
Copy file name to clipboardExpand all lines: packages/app/e2e/performance/devex/desktop-startup.ts +2-1Lines changed: 2 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -239,7 +239,8 @@ function startDesktop(profile: Awaited<ReturnType<typeof createColdProfile>>) { |
239 | 239 | }), |
240 | 240 | ]) |
241 | 241 |
|
242 | | - browser = await chromium.connectOverCDP(url, { timeout: 120_000 }) |
| 242 | + // Observe the native appearance and focus instead of applying Playwright's media defaults. |
| 243 | + browser = await chromium.connectOverCDP(url, { timeout: 120_000, noDefaults: true }) |
243 | 244 | const context = browser.contexts()[0] |
244 | 245 |
|
245 | 246 | if (!context) throw new Error("Electron did not expose a browser context") |
|