Skip to content
Python

macOS 26: line the top strip up with where it draws the traffic lights

Rohit C Prasad6f8b6bf5f884
diff --git a/surfaces/gui/src-tauri/src/lib.rs b/surfaces/gui/src-tauri/src/lib.rs
index e3e94552..d82ab36d 100644
--- a/surfaces/gui/src-tauri/src/lib.rs
+++ b/surfaces/gui/src-tauri/src/lib.rs
@@ -67,6 +67,19 @@ fn choose_port() -> u16 {
free_port()
}
+/// The OS version ("26.0.1" on macOS), so the page can lay out the top strip for the
+/// traffic lights of that version: macOS 26 draws them at its own position and ignores
+/// the one the shell asks for (seen 2026-09-29). Empty when unknown.
+fn os_version() -> String {
+ #[cfg(target_os = "macos")]
+ {
+ if let Ok(out) = Command::new("sw_vers").arg("-productVersion").output() {
+ return String::from_utf8_lossy(&out.stdout).trim().to_string();
+ }
+ }
+ String::new()
+}
+
fn launch_token() -> String {
format!("{}{}", Uuid::new_v4().simple(), Uuid::new_v4().simple())
}
@@ -728,8 +741,9 @@ pub fn run() {
let ws = format!("ws://127.0.0.1:{port}");
// Debug-format yields a quoted JS string literal.
let inject = format!(
- "window.__COWORKER_HTTP__={http:?};window.__COWORKER_WS__={ws:?};window.__COWORKER_API_TOKEN__={api_token:?};window.__OCW_PLATFORM__={:?};",
- std::env::consts::OS
+ "window.__COWORKER_HTTP__={http:?};window.__COWORKER_WS__={ws:?};window.__COWORKER_API_TOKEN__={api_token:?};window.__OCW_PLATFORM__={:?};window.__OCW_OS_VERSION__={:?};",
+ std::env::consts::OS,
+ os_version()
);
tauri::Builder::default()
diff --git a/surfaces/gui/src/App.tsx b/surfaces/gui/src/App.tsx
index 11053430..997dd5ce 100644
--- a/surfaces/gui/src/App.tsx
+++ b/surfaces/gui/src/App.tsx
@@ -71,7 +71,7 @@ import { itemsFromMessages } from "./itemsFromMessages";
import { addTurnUsage, emptyUsage, teamUsage, usageFromMessages } from "./usage";
import { streamMode } from "./streamGate";
import { InboxItemCard, approvalItemFromParked } from "./components/InboxItemCard";
-import { isTauri, platformOS, startWindowDrag } from "./tauri";
+import { isTauri, macosMajor, platformOS, startWindowDrag } from "./tauri";
import { Icon } from "./components/Icon";
import { Sidebar } from "./components/Sidebar";
import { ThinkingBlock, Transcript } from "./components/Transcript";
@@ -1844,6 +1844,12 @@ export function App() {
// compensations (traffic-light insets, lowered top strips) must not apply there —
// they rendered as misalignments under Windows' native bar (caught 2026-07-21).
const overlay = (desktop && platformOS() === "macos") || simOverlay;
+ // macOS 26 draws the traffic lights ~9px higher than macOS 15 does for this window, so
+ // the wordmark, the reveal button and the topbar cluster move up with them (`?overlay=26`
+ // previews it in the browser).
+ const lightsHigh =
+ overlay && (macosMajor() >= 26 || new URLSearchParams(window.location.search).get("overlay") === "26");
+ const overlayClass = overlay ? " tauri-overlay" + (lightsHigh ? " macos-26" : "") : "";
const beginWindowDrag = (event: PointerEvent) => {
if (!desktop || event.button !== 0) return;
startWindowDrag();
@@ -1870,7 +1876,7 @@ export function App() {
if (booting || !uiReady) {
return (
- <div className={"app boot-splash" + (overlay ? " tauri-overlay" : "")}>
+ <div className={"app boot-splash" + overlayClass}>
{/* overlay (not desktop): ?overlay=1 previews the splash's top-left in the browser
too — the wordmark/traffic-light alignment is exactly what it exists to tune. */}
{overlay && (
@@ -1903,7 +1909,7 @@ export function App() {
<div
className={
"app" +
- (overlay ? " tauri-overlay" : "") +
+ overlayClass +
(navCollapsed ? " nav-collapsed" : "") +
(navCollapsed && navPeek ? " nav-peek" : "")
}
diff --git a/surfaces/gui/src/styles.css b/surfaces/gui/src/styles.css
index 20b26310..9017efb3 100644
--- a/surfaces/gui/src/styles.css
+++ b/surfaces/gui/src/styles.css
@@ -2399,3 +2399,16 @@ html[data-platform="linux"] ::-webkit-scrollbar-thumb:hover { background-color:
.team-asks th { font-weight:400; text-align:left; padding:4px 0; }
.team-asks td,.team-asks thead th { text-align:right; color:var(--muted); }
@media(max-width:900px) { .team-worker-chip small,.team-task-row time { display:none; } .team-stat-cards { grid-template-columns:repeat(2,minmax(0,1fr)); } .team-section-title { flex-wrap:wrap; } .team-hover-line { max-width:calc(100vw - 140px); overflow:hidden; } }
+
+/* ---- macOS 26 top strip ------------------------------------------------------ */
+/* macOS 26 ignores the traffic-light position the shell asks for (19,24; centre y≈30) and
+ draws them at its own place: centre y≈21, 14px wide (measured on the 0.3.0 DMG, 2026-09-29).
+ The wordmark, the reveal button, the topbar cluster and the sidebar's brand row move up
+ to that midline. `?overlay=26` previews it in the browser with the lights drawn there. */
+.app.tauri-overlay.macos-26 .sidebar .brand { padding-top: 5px; }
+.app.tauri-overlay.macos-26 .nav-reveal-btn { top: 1px; }
+.app.tauri-overlay.macos-26 .main-topbar { padding-top: 0; height: 42px; }
+.boot-splash.tauri-overlay.macos-26 { padding-top: 30px; }
+.app.tauri-overlay.macos-26 .titlebar-drag { height: 42px; padding-top: 2px; }
+.app.tauri-overlay.macos-26 .sim-traffic-lights { top: 14px; }
+.app.tauri-overlay.macos-26 .sim-traffic-lights span { width: 14px; height: 14px; }
diff --git a/surfaces/gui/src/tauri.ts b/surfaces/gui/src/tauri.ts
index f79dd4ff..1d035189 100644
--- a/surfaces/gui/src/tauri.ts
+++ b/surfaces/gui/src/tauri.ts
@@ -16,6 +16,15 @@ export const platformOS = (): string => {
return /mac/i.test(navigator.userAgent) ? "macos" : /win/i.test(navigator.userAgent) ? "windows" : "linux";
};
+// macOS major version (26 for Tahoe), injected by the shell; 0 when unknown (browser dev).
+// macOS 26 places the traffic lights itself, higher than the position the shell asks for,
+// so the top strip lays out differently there (styles.css, `.macos-26`).
+export const macosMajor = (): number => {
+ const injected = (globalThis as any).__OCW_OS_VERSION__;
+ const major = typeof injected === "string" ? parseInt(injected.split(".")[0], 10) : NaN;
+ return Number.isFinite(major) ? major : 0;
+};
+
export type DictationStatus = {
recording: boolean;
model_installed: boolean;