Skip to content

armgit / mso

Public Imported from GitHub
0

Browser-based graphical shell and control plane for a Linux server you own — real terminal, file manager, live metrics and BYOK AI in one mobile-first workspace. Next.js 16 · React 19 · node-pty · Tailwind v4 · shadcn/ui. Public alpha, self-hosted.

fix(macos): unify shared menu glass material

Abdurrahman Fakhrulafe100d06e7c
diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md
index 9583a2d4..f0bd5d69 100644
--- a/docs/CHANGELOG.md
+++ b/docs/CHANGELOG.md
@@ -8,6 +8,7 @@ this is the *what*, and it is what Settings → Account → About shows as “Wh
**Fixed**
+- `macos` unify shared menu glass material
- `macos` unify shared menu typography with Figma reference
- `fs` cap the complete enumeration response
- `security` revalidate durable authority and bound follow-up scan paths
diff --git a/docs/PROGRESS.md b/docs/PROGRESS.md
index 74e3ebe1..3e456cb1 100644
--- a/docs/PROGRESS.md
+++ b/docs/PROGRESS.md
@@ -1,3 +1,7 @@
+## 2026-10-08: Unify shared macOS menu glass material
+
+The Figma menu already matched MSO's 12px corners and 8px/48px outer shadow. Browser properties also showed a 0.5px Plus Lighter glass edge; native refraction is intentionally approximated with CSS. Context/submenu panels previously inherited a different blur from dropdowns, despite sharing the same macOS chrome. The macOS menu rule now owns the existing blur/saturation material and a thin highlight for all three surfaces, with readable theme backgrounds retained. Reduced glass disables both standard and WebKit filters. No global glass helper or other shell metric changed. Rendered menu checks verify the shared material in both themes alongside geometry, keyboard, contrast and shell-switch regression checks. The full gate exposed an existing enumeration fixture that resolved credential aliases in the operator home; its synthetic HOME and read roots are now isolated and restored without changing runtime deadlines, admission or coverage thresholds.
+
## 2026-10-08: Align shared macOS menu typography with the open Figma kit
Browser inspection of the user's macOS 27 kit showed SF Pro Medium 13px menu labels and shortcut symbols. MSO's menu-bar rows were Regular and its context rows inherited a larger size; all portaled macOS menus also overrode the existing Apple font stack with system-ui. The macOS menu rule now owns 13px Medium typography for all three menu surfaces, and menu-bar, context and submenu panels use the existing data-shell-id font authority. App actions, window state, pointer target sizes and other shells retain their existing contracts. The browser regression checks actual menu-bar/context typography in light, dark and after a Windows round trip, alongside the existing geometry, contrast, keyboard and touch checks. Figma MCP access was exhausted; the user explicitly authorized browser properties as the reference. SF Pro falls back through the existing platform font stack when unavailable.
diff --git a/frontend/slices/appshell/components/shells/macos/macos-shell.css b/frontend/slices/appshell/components/shells/macos/macos-shell.css
index 599e8228..ae81e5d0 100644
--- a/frontend/slices/appshell/components/shells/macos/macos-shell.css
+++ b/frontend/slices/appshell/components/shells/macos/macos-shell.css
@@ -42,7 +42,11 @@
padding: 5px;
color: #1a1a1a;
background: rgba(255, 255, 255, .75);
- box-shadow: 0 8px 48px rgba(0, 0, 0, .25);
+ border-color: rgba(255, 255, 255, .35);
+ /* CSS approximation of the kit's 0.5px Plus Lighter glass edge. */
+ box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .15), 0 8px 48px rgba(0, 0, 0, .25);
+ -webkit-backdrop-filter: blur(var(--blur)) saturate(180%);
+ backdrop-filter: blur(var(--blur)) saturate(180%);
font-size: 13px;
font-weight: 500;
}
@@ -61,7 +65,8 @@
[data-theme="dark"] .macos-menu {
color: #f5f5f5;
background: rgba(44, 44, 48, .88);
- box-shadow: 0 8px 48px rgba(0, 0, 0, .45);
+ border-color: rgba(255, 255, 255, .18);
+ box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .15), 0 8px 48px rgba(0, 0, 0, .45);
}
[data-shell="macos"] [data-window-chrome="macos"] {
background: var(--mac-window);
@@ -88,7 +93,7 @@
outline-offset: 1px;
}
.reduce-glass .macos-menubar { background: #333337; backdrop-filter: none; }
-.reduce-glass .macos-menu { background: #f5f5f5; backdrop-filter: none; }
+.reduce-glass .macos-menu { background: #f5f5f5; -webkit-backdrop-filter: none; backdrop-filter: none; }
.reduce-glass[data-theme="dark"] .macos-menu { background: #2a2a2d; }
@media (max-height: 500px) {
diff --git a/frontend/slices/appshell/design/macos/design.md b/frontend/slices/appshell/design/macos/design.md
index e0014511..b399c805 100644
--- a/frontend/slices/appshell/design/macos/design.md
+++ b/frontend/slices/appshell/design/macos/design.md
@@ -7,6 +7,7 @@ Source: [macOS 27 Examples](https://www.figma.com/design/f3ivRnEohVvr87qszwuQiw/
- Candidate A 5cdad278 supplies 34px bar geometry, solid 52px titlebar, 16px windows, 14px traffic lights inside 24px targets, and focus-dependent shadows.
- PR103 candidate B 5efbe7ea supplies the direction for semibold/heavy bar labels, 24px fine-pointer context rows and translucent menu material.
- Browser inspection of Examples/Menubar `4370:42756` confirms SF Pro Medium 13px labels and shortcut symbols. The shared `.macos-menu` rule owns size/weight for menu-bar, context and submenu rows; portaled panels use the existing `data-shell-id` font stack instead of a separate system-ui override. Platform font fallback remains intentional where SF Pro is unavailable.
+- Browser inspection of the active Glass Effect confirms a 12px radius and 0.5px Plus Lighter inner edge; its fallback shadow is 0 8px 48px at 25%. Native refraction/dispersion are approximated with the existing blur token, saturation and a thin CSS highlight. The shared macOS rule owns material for dropdown, context and submenu panels; reduced glass disables both standard and WebKit filters. Existing readable light/dark backgrounds, geometry and targets stay authoritative.
- Combined menus retain A's readable shortcut text and selection contrast. Coarse-pointer rows remain at least 44px; Windows and Dashboard metrics retain their existing values.
- Existing Radix controls, shell store, app registry and docking interactions remain authoritative.
- The Examples page has no dock specimen. Preserve existing artwork; reserve the full hover-growth pool so controls stay reachable.
diff --git a/lib/host/fs-enumeration.test.ts b/lib/host/fs-enumeration.test.ts
index cdac24f6..e652ca38 100644
--- a/lib/host/fs-enumeration.test.ts
+++ b/lib/host/fs-enumeration.test.ts
@@ -1,12 +1,14 @@
-import { afterAll, expect, it } from "vitest";
+import { afterAll, expect, it, vi } from "vitest";
import { mkdtemp, mkdir, rm, writeFile } from "node:fs/promises";
import os from "node:os";
import path from "node:path";
const root = await mkdtemp(path.join(os.tmpdir(), "mso-enumeration-"));
-process.env.OS_FS_READ_ROOTS = root;
+// Keep credential-root resolution inside the synthetic fixture, not the operator home.
+vi.stubEnv("HOME", root);
+vi.stubEnv("OS_FS_READ_ROOTS", root);
const { listDir, searchFs } = await import("./fs-enumeration");
-afterAll(async () => { delete process.env.OS_FS_READ_ROOTS; await rm(root, { recursive: true, force: true }); });
+afterAll(async () => { vi.unstubAllEnvs(); await rm(root, { recursive: true, force: true }); });
it("bounds oversized listings, sparse searches and concurrent work, releasing admission after failure", async () => {
const large = path.join(root, "large"); await mkdir(large);
diff --git a/scripts/e2e/macos-figma.mjs b/scripts/e2e/macos-figma.mjs
index a6c6ddb2..96a3c724 100644
--- a/scripts/e2e/macos-figma.mjs
+++ b/scripts/e2e/macos-figma.mjs
@@ -3,7 +3,7 @@ import { chromium, expect } from "@playwright/test";
import AxeBuilder from "@axe-core/playwright";
import { mkdir, writeFile } from "node:fs/promises";
import path from "node:path";
-import { desktopMenu, menuEvidence } from "./macos-menu-evidence.mjs";
+import { desktopMenu, menuEvidence, reducedMenuEvidence } from "./macos-menu-evidence.mjs";
import { releaseFixture } from "./release-fixture.mjs";
process.umask(0o077);
@@ -186,6 +186,7 @@ try {
await expect(page.locator(".macos-menubar")).toBeVisible();
await menuEvidence({ page, check, shot }, "returned-macos");
});
+ await reducedMenuEvidence({ browser, base: fixture.base, check });
await check("no uncaught browser errors", async () => expect(errors).toEqual([]));
} finally {
await writeFile(path.join(dir, "report.json"), JSON.stringify({ results, screenshots }, null, 2));
diff --git a/scripts/e2e/macos-menu-evidence.mjs b/scripts/e2e/macos-menu-evidence.mjs
index 245dbf04..eaa3aa03 100644
--- a/scripts/e2e/macos-menu-evidence.mjs
+++ b/scripts/e2e/macos-menu-evidence.mjs
@@ -1,8 +1,16 @@
import { expect } from "@playwright/test";
import AxeBuilder from "@axe-core/playwright";
-async function menuTypography(menu) {
+async function menuChrome(menu) {
await expect(menu).toHaveAttribute("data-shell-id", "macos");
+ const material = await menu.evaluate(el => {
+ const style = getComputedStyle(el);
+ return { mode: document.documentElement.dataset.theme, filter: style.backdropFilter, edge: style.borderColor, shadow: style.boxShadow };
+ });
+ expect(material.filter).toContain("blur(");
+ expect(material.filter).toContain("saturate(1.8)");
+ expect(material.edge).toBe(material.mode === "dark" ? "rgba(255, 255, 255, 0.18)" : "rgba(255, 255, 255, 0.35)");
+ expect(material.shadow).toContain("inset");
const rows = await menu.locator('[role^="menuitem"]').evaluateAll(items => items.map(item => {
const style = getComputedStyle(item);
return { size: style.fontSize, weight: style.fontWeight, family: style.fontFamily };
@@ -24,7 +32,7 @@ export async function menuEvidence({ page, check, shot }, theme) {
await page.mouse.click(1504, 160, { button: "right" });
const menu = page.locator('.macos-menu[role="menu"]');
await expect(menu).toBeVisible();
- await menuTypography(menu);
+ await menuChrome(menu);
await expect.poll(async () => (await menu.boundingBox()).width).toBe(244);
const box = await menu.boundingBox();
expect(box.width).toBe(244);
@@ -46,7 +54,7 @@ export async function menuEvidence({ page, check, shot }, theme) {
await page.locator(".macos-menubar").getByRole("button", { name: "View", exact: true }).click();
const menu = page.locator(".macos-menu");
await expect(menu).toBeVisible();
- await menuTypography(menu);
+ await menuChrome(menu);
expect(await menu.evaluate(el => getComputedStyle(el).borderRadius)).toBe("12px");
const axe = await new AxeBuilder({ page }).include(".macos-menu").withTags(["wcag2a", "wcag2aa", "wcag21aa"]).analyze();
await page.keyboard.press("Escape");
@@ -77,3 +85,29 @@ export async function desktopMenu(page, itemName) {
await expect(menu.getByRole("menuitem", { name: itemName, exact: true })).toBeVisible();
return menu;
}
+
+export async function reducedMenuEvidence({ browser, base, check }) {
+ await check("reduced glass disables supported macOS menu filters", async () => {
+ const context = await browser.newContext({ viewport: { width: 1512, height: 982 } });
+ try {
+ await context.addInitScript(() => {
+ localStorage.setItem("mso:onboarding:v1", "done");
+ localStorage.setItem("sv:shell", JSON.stringify({ desktop: "macos", mobile: "ios" }));
+ localStorage.setItem("mso:tweaks", JSON.stringify({ reduceGlass: true }));
+ });
+ const page = await context.newPage();
+ await page.goto(base);
+ await expect(page.locator("html")).toHaveClass(/reduce-glass/);
+ const contextMenu = await desktopMenu(page, "View as Windows");
+ const filters = el => {
+ const style = getComputedStyle(el);
+ return [style.backdropFilter, CSS.supports("-webkit-backdrop-filter", "blur(1px)")
+ ? style.getPropertyValue("-webkit-backdrop-filter") : "unsupported"];
+ };
+ expect(await contextMenu.evaluate(filters)).toEqual(["none", expect.stringMatching(/^(none|unsupported)$/)]);
+ await page.keyboard.press("Escape");
+ await page.locator(".macos-menubar").getByRole("button", { name: "View", exact: true }).click();
+ expect(await page.locator(".macos-menu").evaluate(filters)).toEqual(["none", expect.stringMatching(/^(none|unsupported)$/)]);
+ } finally { await context.close(); }
+ });
+}