Skip to content

fix(macos): title bar sidebar toggle visibility for parity capture - #4667

Closed
tyler-dane wants to merge 26 commits into
mainfrom
cursor/macos-title-bar-screencap-2ef3
Closed

tyler-dane wants to merge 26 commits into
mainfrom
cursor/macos-title-bar-screencap-2ef3

Conversation

@tyler-dane

Copy link
Copy Markdown
Contributor

Problem

macOS parity capture: XCUITest finds the sidebar toggle and asserts content-track layout, but full-window PNGs had zero dark pixels in the toggle region (flat top-right band). That indicates an app rendering/compositing issue, not capture cropping alone.

Approach

  • Drop title-bar drawingGroup and mount chrome in the main column (web header shape).
  • Mirror phosphor sidebar icon; parity-time rasterization for vector icons.
  • Add TitleBarSidebarToggle (NSButton) when SwiftUI controls did not appear in window bitmaps.
  • CI: export XCUITest toggle bounds (parity-toggle-bounds.json attachment) and probe that rectangle when validating mac-title-bar.png.

CI evidence (not green)

  • Toggle a11y bounds (example): minX=859, maxX=883, minY=14, maxY=38 at 1280pt width.
  • Same rect in xcui-window crop: 0 dark pixels after SwiftUI, SF Symbol, bordered debug chrome, and AppKit button attempts.
  • Unrelated top-band ink at x≈1200 matches open-sidebar chrome, not the toggle.

Blocker

Trailing title-bar controls do not composite into XCUITest/screencapture window PNGs while accessibility reports them on the content track. Needs macOS-local view/layer debugging (hosting view clip, layer order, or screenshot vs accessibility mismatch).

VERDICT: FAIL (macos-capture title bar validation)

Open in Web Open in Cursor 

cursoragent and others added 26 commits October 20, 2026 22:04
Drop content compositing; crop XCUITest window screenshots only. Validate traffic lights, June nav text band, and reject footer/grid crops. Group sidebar footer icons on the leading edge per web #4638.

Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
Expand title-bar HStack to the window width so the trailing sidebar
toggle matches web CalendarHeader layout. Harden mac-title-bar PNG
validation with a top-right icon cluster check and XCUITest position
assertions.

Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
Match web CalendarHeader: the toggle belongs on the main column's
trailing edge, not over the open sidebar. Retarget parity PNG validation
and XCUITest geometry to the content-track band.

Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
Prefer screencapture -l for mac-title-bar PNG attachments, draw the title
bar into a bitmap layer, and use primary text color on the sidebar toggle
so CI pixel validation sees the phosphor icon beside the content track.

Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
Split the trailing sidebar toggle into its own title-bar layer instead of
flattening the full HStack with drawingGroup, which dropped the icon in real
window captures while XCUITest still saw the button frame.

Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
Place unified chrome in the content VStack so the AppKit week grid cannot
composite over the sidebar toggle, mirror the phosphor icon, and drop window
width trailing inset math.

Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
Sidebar toggle SVG fills were missing from XCUITest/screencapture PNGs while
accessibility frames still passed. Rasterize Phosphor icons during parity
capture and mirror the sidebar glyph like web.

Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
Deferring icon rasterization to onAppear left a clear placeholder in
mac-title-bar PNGs because XCUITest snapshots the window immediately.

Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
@tyler-dane

Copy link
Copy Markdown
Contributor Author

Closing as superseded by #4668 (merged 10/21 as e9835b8), which hardens the same macOS title bar parity capture and passed strict verification. Later main commits (#4757, #4717, #4649) build on it. Closed with Tyler's OK.

@tyler-dane tyler-dane closed this Oct 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants