Skip to content

fix(parity): draw popover windows into macos parity captures - #4717

Merged
tyler-dane merged 5 commits into
mainfrom
fix/parity-capture-popovers
Oct 22, 2026
Merged

tyler-dane merged 5 commits into
mainfrom
fix/parity-capture-popovers

Conversation

@tyler-dane

Copy link
Copy Markdown
Contributor

Refs #4331

What and why

In the parity compare (run 39704640345), the macOS event-form-date-picker and event-form-time-picker captures showed the form with a closed field, while web showed the open calendar and time list. The capture tests do open them: the date test waits for compass-event-form-date-picker, and the time field draws its open-state accent border. But both are SwiftUI popovers, which AppKit puts in separate windows. ParityViewSnapshotExporter rendered only window.contentView with cacheDisplay, so the popovers never reached the PNG.

This PR makes the exporter draw each visible popover window over the main render after the content view, at its offset from the main window's content rect. It finds them through the window's childWindows plus any app window whose class name contains "Popover", and draws each one once. Captures with no popover open are unchanged. It also adds a changelog line to docs/features/desktop-web-parity-checklist.md.

Verify

VERDICT: PASS from bun run verify --strict (type-check, lint, knip). bun cli contracts:swift --check and bun cli desktop:export --check pass.

Not run locally: this cloud session has no Swift toolchain or Xcode, so the build and the capture only run in macOS CI. The parity-screenshots label is added separately, and the evidence is the date and time picker compare images from this PR's run.


Generated by Claude Code

The event-form-date-picker and event-form-time-picker surfaces open
SwiftUI popovers, which are separate windows. The exporter rendered only
the main window's content view, so both captures showed a closed field
while web showed the open picker. Draw each visible popover window over
the render at its on-screen offset.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GKHjv2HDx1DFAnG4cfSxcr
@tyler-dane
tyler-dane marked this pull request as ready for review October 22, 2026 02:46
@tyler-dane tyler-dane added the agent-automerge Agent-loop finished; merge-guard may squash-merge label Oct 22, 2026 — with Claude
@tyler-dane
tyler-dane enabled auto-merge October 22, 2026 02:47
@tyler-dane tyler-dane added the parity-screenshots Run the web vs macOS parity screenshot workflow on this PR label Oct 22, 2026 — with Claude
The welcome modal's buttons pair a title with a keycap chip and had no
explicit label, so accessibility read "Get started for free, Enter".
The onboarding parity capture added in #4707 clicks buttons["Get started
for free"] and fails on every run since. Label each welcome button with
its title; the keycap is a visual hint.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GKHjv2HDx1DFAnG4cfSxcr
(cherry picked from commit 5d42363)
… panel

With the welcome buttons named by title, buttons["Next"] also matched the
grid's week "Next" button behind the modal, so the click failed with
multiple matches. Query the buttons inside compass-native-welcome-modal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GKHjv2HDx1DFAnG4cfSxcr
(cherry picked from commit 77e87f4)

Copy link
Copy Markdown
Contributor Author

macos-capture failed in NativeParityCaptureTests.testExportParitySurface_onboardingWelcome, at the welcome step #4707 added. That step fails on any branch that runs the capture, not because of this PR. There are two causes: the welcome buttons were named "Get started for free, Enter" (title plus keycap), and once that was fixed, buttons["Next"] also matched the grid's week "Next" button behind the modal. Both fixes are in #4720 (title-only button labels, plus the test querying inside compass-native-welcome-modal). I've ported both commits here so the capture and compose steps can finish with this PR's date and time picker compare.


Generated by Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GKHjv2HDx1DFAnG4cfSxcr
(cherry picked from commit b031ea7)
The onboarding capture exports onboarding-welcome-account-choice, but the
name was not a ParityCaptureSurface, so the debug URL never parsed and the
export timed out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GKHjv2HDx1DFAnG4cfSxcr
(cherry picked from commit 07b3cce)
@tyler-dane
tyler-dane added this pull request to the merge queue Oct 22, 2026
Merged via the queue into main with commit cda9fba Oct 22, 2026
26 checks passed
@tyler-dane
tyler-dane deleted the fix/parity-capture-popovers branch October 22, 2026 06:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-automerge Agent-loop finished; merge-guard may squash-merge parity-screenshots Run the web vs macOS parity screenshot workflow on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants