ci: add a macOS desktop e2e lane - #3137
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan includes up to 3 reviews per rolling hour; 1 remains after this review. 📝 WalkthroughSummaryThis PR adds a macOS 15 desktop E2E lane. It uses the existing shard configuration and preserves the Linux The PR extends the existing E2E path. It does not create a separate fixture or test framework. The solution is coherent and small. The new macOS lane is required for platform coverage. The scrolling helper and updated hit-testing diagnostics address macOS-specific window restoration and virtualized transcript timing. No deletion is evident without reducing regression coverage. Some test diagnostics could be simplified later if they prove unnecessary after the macOS lane stabilizes. Validation
Review-relevant risks
WalkthroughThe pull request adds a macOS desktop E2E lane, broadens isolated-display handling to macOS, tightens CI checkout permissions, reserves prompt-rail space for overlay scrollbars, and improves prompt-rail and slash-command E2E synchronization. ChangesmacOS E2E and CI display support
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: 🔵 Low · up to The PR adds macOS desktop end-to-end coverage, but a revised relay lifecycle timeout may allow regressions in the 10ms fallback deadline to pass undetected. The change is otherwise mergeable with explicit owner awareness and follow-up on that test guard. Sequence Diagram(s)sequenceDiagram
participant CI as GitHub Actions
participant Playwright
participant Electron
CI->>Playwright: Run desktop E2E tests on macOS 15
Playwright->>Electron: Launch visible fixture windows
Electron-->>Playwright: Render prompt rail and composer
Playwright-->>CI: Report E2E results
CI->>CI: Run alignment audit
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: ff3a97dc-ecaf-49cf-b569-3206d4d82ba6
📒 Files selected for processing (5)
.github/workflows/ci.ymlapps/desktop/e2e/fixtures.tsapps/desktop/e2e/playwright.config.tsscripts/fixture-env.mjsscripts/fixture-window.mjs
Included review availability: Your plan includes up to 3 reviews per rolling hour; 1 remains after this review.
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
apps/desktop/src/renderer/styles/chat-header.css (1)
159-162: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winDo not rely on
scrollbar-gutter: stablefor overlay scrollbars.The CSS Overflow specification defines
stablefor classic scrollbars. Overlay scrollbars do not create a gutter. (w3.org) This declaration therefore cannot provide the stated macOS guarantee. Verify that.maka-chat-layoutis the actual[data-chat-scroll-container="true"]element. If it is not, the rule is inert. Sinceprompt-rail.cssalready applies an explicit 48px offset, remove this rule unless classic-scrollbar stability on this exact scroll box is a separate requirement.Sources: Path instructions, MCP tools
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 868001b8-cc67-4d25-966d-f8d405bec20b
📒 Files selected for processing (3)
apps/desktop/e2e/prompt-rail.spec.tsapps/desktop/src/renderer/styles/chat-header.cssapps/desktop/src/renderer/styles/prompt-rail.css
Included review availability: Your plan includes up to 3 reviews per rolling hour; 0 remain after this review.
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 561c6bc7-ce31-4fff-8cd6-e688c98d6d12
📒 Files selected for processing (3)
apps/desktop/e2e/prompt-rail.spec.tsapps/desktop/e2e/slash-command-menu.spec.tspackages/eval/harbor/test_relay_lifecycle.py
🚧 Files skipped from review as they are similar to previous changes (1)
- apps/desktop/e2e/prompt-rail.spec.ts
Included review availability: Your plan includes up to 3 reviews per rolling hour; 2 remain after this review.
There was a problem hiding this comment.
Pull request overview
This PR extends the desktop end-to-end CI surface to include macOS runners so platform-specific renderer/compositor behaviors (overlay scrollbars, App Nap throttling, post-scroll hit-testing) can fail PRs before merge, while preserving the existing Linux e2e job name to keep required checks stable.
Changes:
- Add a new
e2e_macosGitHub Actions job (macos-15) alongside the existing Linux xvfbe2elane. - Generalize “CI display must be visible” detection from Linux-only (
isCiLinuxDisplay) to cross-platform (isCiIsolatedDisplay), and update fixture launch behavior accordingly. - Harden prompt-rail styling and e2e tests against macOS-specific hit-testing/scrolling/titlebar overlay behaviors; reduce a slash-command menu flake by ensuring composer focus before typing.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| scripts/fixture-window.mjs | Switches to isCiIsolatedDisplay() to decide when the fixture window must be visible on CI. |
| scripts/fixture-env.mjs | Adds cross-platform CI-display detection and fixes CI flag parsing (CI=false no longer treated as truthy). |
| apps/desktop/src/renderer/styles/prompt-rail.css | Moves prompt-rail away from macOS overlay scrollbar hit regions to prevent dead-band clicks. |
| apps/desktop/e2e/slash-command-menu.spec.ts | Stabilizes slash-command triggering by refocusing the composer before typing /. |
| apps/desktop/e2e/prompt-rail.spec.ts | Improves macOS-visible-window robustness for scroll mounting and hit-testing assertions. |
| apps/desktop/e2e/playwright.config.ts | Updates documentation comment to reflect macOS CI compositor behavior. |
| apps/desktop/e2e/fixtures.ts | Uses isCiIsolatedDisplay() so macOS CI runs with a visible Electron window when needed. |
| .github/workflows/ci.yml | Adds e2e_macos lane and hardens checkout by disabling persisted credentials; sets minimal contents: read permissions. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
e7cfa3e to
5843859
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.
Suppressed comments (1)
apps/desktop/src/renderer/styles/prompt-rail.css:53
- The comment says “GitHub's macos-15 image uses Always”, but the new macOS CI lane explicitly sets
AppleShowScrollBarstoWhenScrolling. This inconsistency makes it unclear which scrollbar mode the 48px offset is primarily targeting (and can mislead future debugging if CI behavior changes).
sailed through CI green. The overlay dead band is 14px when the bar
appears only while scrolling, and ~16px when the system shows scroll
bars Always — GitHub's macos-15 image uses Always, and a visible
Electron window can stack a native overlay on the webview's own bar.
Rest the rail at `space-8 + space-4` (48px), clear of that stack, and
Astro-Han
left a comment
There was a problem hiding this comment.
Adding a dedicated macOS lane is the right way to validate an OS-specific compositor/overlay problem, and the fixture isolation is thoughtfully scoped. One test seam still defeats that goal: the critical jump assertions bypass the native pointer path, while the test itself records that the first tick is hidden by the titlebar.
The first-principles split is simpler: prove user reachability with one real pointer interaction on a visible tick and assert its destination; test jump/auto-follow state transitions separately at the logic boundary. That removes the synthetic-click exception and makes each test responsible for exactly one claim.
Review performed with Codex reviewer agents and DeepSeek V4 Flash as advisory tools; I verified this finding against the latest head and live CI state.
中文评论
增加独立 macOS lane 是验证特定系统 compositor/overlay 问题的正确方向,fixture 隔离也很克制。但关键跳转断言绕过了原生 pointer path,而测试本身又明确记录首个 tick 被 titlebar 覆盖,因此当前测试不能证明真实用户交互可达。
更符合第一性原理的最小方案是:用一次真实 pointer 交互点击可见 tick 并断言落点,单独在逻辑边界验证 jump/auto-follow 状态变化。这样可以删掉 synthetic click 例外,每个测试只证明一个事实。
本次审查使用了 Codex reviewer agents 与 DeepSeek V4 Flash 作为辅助工具;我已依据最新 head 和实时 CI 状态复核该问题。
|
/agentic_review |
Code Review by Qodo
1. macOS failure is nonblocking
|
|
This PR also changes the visible prompt-rail position on macOS to avoid overlay scrollbar and titlebar hit regions. Could you please add a screenshot of the resulting prompt rail in the Desktop UI, ideally with the macOS overlay scrollbar visible? A before/after comparison is welcome, but one clearly annotated result is sufficient. Thanks! Posted by Codex on behalf of Astro-Han. |
bc64b35 to
cebe9c5
Compare
|
Rebased onto current Here is the requested macOS result with the native overlay scrollbar visible at the far right. The prompt rail is inset from that hit region and its first-to-last tick column stays below the titlebar clearance: The rebased implementation restores normal Playwright pointer clicks for the first tick and verifies the complete painted rail column instead of trimming the titlebar-covered prefix. Local validation on the new head: prompt-rail E2E 7/7, the previously failing titlebar workbar scenario 1/1, Desktop build and typecheck, CI contract tests 29/29, helper tests 61/61, lint, format, ASF headers, and diff checks. The new CI run is currently |
cebe9c5 to
217df6e
Compare
|
@Astro-Han Fixed the two failures from the current macOS run in
Local macOS verification:
The updated-head workflow is awaiting creation/approval; please approve it when GitHub exposes the run. |

Summary
Desktop e2e only ran on Linux xvfb, so macOS overlay-scrollbar hit testing and App Nap compositor throttling could not fail a PR. This adds a
macos-15sibling of the existinge2ejob.The Linux job name is unchanged so the required check stays intact. Isolated CI displays (xvfb and GitHub macOS runners) show the fixture window; local machines stay hidden.
Fixes #2342
Test plan
isCiIsolatedDisplaycovers Linux CI, macOS CI, and local Darwin