fix(workspace): keep the macOS header clear of the lights when zoomed out (#1815)

* fix(workspace): keep the macOS header clear of the lights when zoomed out

App zoom scales CSS pixels but not the native traffic lights. At zoom
-3/-4 the header column starts near 29 window pixels, so Back and the
playlist switcher slid under the lights, and the 27px header band let
the lights overlap the context panel below.

A shell-level TrafficLightsClearanceDirective now publishes the lights'
clearance in CSS pixels (84 x 48 window pixels, from the page zoom
factor) on macOS. The header band grows to the vertical clearance (the
rail starts its first link at the same band, replacing the rail's own
zoom listener), and the header's leading padding grows to the
horizontal clearance less the rail column. Both equal the default
layout at 100 %; Windows/Linux and the phone layout are unchanged. The
native position is shared with the main process as
MACOS_TRAFFIC_LIGHTS_POSITION.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(workspace): pass the header clearance poll labels as options

Equivalent to the string form, which Playwright 1.62 also accepts, but
explicit in every version (Greptile review).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(workspace): check the header switcher before history exists

Since the header's history fallback, a list reached by navigation
leads with Back. The macOS check now takes the switcher on the first
page, which has nothing to go back to, and Back on a detail page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: 4gray <fourgray@proton.me>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
authored and GitHub committed 2026-10-06 19:15:58 +02:00
1 parent 5f21e240e9
commit 5e5b483dca
17 files changed
+519 -131

No files matched your search

+1
View File
@@ -9,6 +9,7 @@ export * from './lib/embedded-mpv-session.interface';
export * from './lib/embedded-mpv-support-watch.util';
export * from './lib/subtitle-style.util';
export * from './lib/zoom-level.util';
export * from './lib/macos-traffic-lights';
export * from './lib/electron-api.interface';
export * from './lib/epg-channel-metadata.model';
export * from './lib/epg-channel-with-programs.interface';
@@ -0,0 +1,7 @@
/**
* Where macOS draws the native window buttons (close, minimize, zoom), in
* window points from the window's top-left corner. The main process places
* them (`trafficLightPosition`); the workspace shell keeps its controls clear
* of them at every app zoom, which scales CSS pixels but not the buttons.
*/
export const MACOS_TRAFFIC_LIGHTS_POSITION = { x: 16, y: 20 } as const;