feat(desktop): full screen over the whole display, the strip beside the camera included

On a MacBook with a camera housing (the notch), macOS's full screen ends the
window below the housing and paints the strip beside it black. No setting
changes that, so the Mac app gets a second kind of full screen, off by default:
View > Full Screen Uses the Area Beside the Camera.

The app (packages/desktop/src/whole_screen.rs):
- The window loses its title bar, the Dock and the menu bar auto-hide, and the
  window gets the display's whole frame, which reaches behind the housing.
- An override of toggleFullScreen: on tao's window class decides per request,
  so the green button, the menu item, its shortcut and the launch into full
  screen all follow the option. It only applies on a display with a housing.
- performClose: asks the delegate while the window has no close button.
- Changes into and out of macOS's own full screen are tracked from AppKit's
  notifications: while one is under way the window is not restyled and its
  frame is not saved. The Dock and menu-bar options are reconciled, so what a
  native Space in front kept from being set or taken off is done afterwards.
- Info.plist: NSPrefersDisplaySafeAreaCompatibilityMode = false.

The page (src/web/public/host-cutout.js, styles.css):
- A page is drawn behind the housing only after it said it copes
  (CodemanHost.cutoutReady); the app answers with where the housing is, and
  the toolbar's box starts left of it and pads its content past it, so the
  tabs end before the housing and the toolbar begins after it.
- Until then the web view stays below the housing with a black strip above it,
  which is what full screen looked like before: an older server, the connect
  page and a raw file are unchanged.
- With the tabs grouped by state, by case or as a ledger in the header strip
  the page says no: ending every row at the housing costs more height than the
  strip gives.

Not yet seen on a MacBook with a housing: the AppKit path was type-checked,
unit-tested where it is pure and reviewed, on a Mac mini without one.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
Codeman maintainer committed 2026-11-24 10:36:56 +01:00
1 parent 5548c17c4a
commit d5ddf2e250
19 files changed
+2493 -36

No files matched your search

+40 -2
View File
@@ -2321,9 +2321,13 @@ html[data-tab-orientation='vertical'].tab-rail-compact
/* Everything below applies only where the tabs share the header with the toolbar, i.e. where the handle is
visible to undo it: not in the sidebar layout, the vertical rail or a solo window, and not on a phone. */
/* A width the user chose: the toolbar keeps it and wraps onto a second line when its content is wider. */
/* A width the user chose: the toolbar keeps it and wraps onto a second line when its content is wider.
Not while the toolbar is laid out around a camera housing (html.host-cutout, further down), which decides
where it starts. */
@media (min-width: 769px) {
html[data-header-right-width]:not([data-tab-orientation='vertical']):not([data-session-list='sidebar'])
html[data-header-right-width]:not(.host-cutout):not([data-tab-orientation='vertical']):not(
[data-session-list='sidebar']
)
body:not(.solo-mode)
.header-right {
flex: 0 0 var(--header-right-width);
@@ -2413,6 +2417,40 @@ body.solo-mode .header-divider {
}
}
/* A camera housing over the header row (host-cutout.js). Codeman Desktop can take a MacBook's whole display,
and the page's top edge is then the display's, with the housing (the notch) covering a piece of this row.
The app says where it is: --host-cutout-left, -width and -height, in pixels from the viewport's top-left
corner. The toolbar's box then starts just left of the housing and runs to the header's right edge
(0.75rem is the header's own padding), and its padding puts the first control just right of the housing.
That one box keeps the whole row clear: the tabs, or a solo window's title, end where it begins, and the
L-shaped strip sizes its corner from it (`_syncTabStripCorner()`), so a wrapped strip's first rows stop
short of the housing too. A toolbar wider than the room beside the housing wraps onto a second line, below
it. Every layout has this box (strip, sidebar, rail, solo window), so the rule has no exceptions. */
@media (min-width: 769px) {
html.host-cutout {
--host-cutout-gap: 8px;
}
html.host-cutout .header > .header-right {
box-sizing: border-box;
flex: 0 0 auto;
width: calc(100vw - 0.75rem - var(--host-cutout-left) + var(--host-cutout-gap));
padding-left: calc(var(--host-cutout-width) + 2 * var(--host-cutout-gap));
/* The divider line would sit against the housing. */
border-left-color: transparent;
flex-wrap: wrap;
justify-content: flex-end;
align-content: center;
row-gap: 0.25rem;
min-height: var(--header-height);
}
/* The box's left edge is the housing's, not a width to drag. */
html.host-cutout .header-divider {
display: none;
}
}
/* The opt-in host readings (GPU, VRAM, MHz) start hidden and are shown by panels-ui.js once the host
reports them; a plain `display` on .stat-item would override the attribute, and the Tiles style sets its own
(a grid) at a higher specificity, so the selector carries the style attribute to outrank it. */