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(css): un-break every border-color utility, and make Android's Back visible

Rahman1d5ca7caf218
diff --git a/app/globals.css b/app/globals.css
index 343a68e9..da8a7b1c 100644
--- a/app/globals.css
+++ b/app/globals.css
@@ -197,7 +197,17 @@
--radius-xl: calc(var(--radius) + 4px);
}
-* { box-sizing: border-box; border-color: var(--color-border); }
+/* MUST stay inside @layer base. Unlayered CSS beats EVERY layered rule in the
+ cascade, and Tailwind 4 emits all utilities into layers — so while this lived
+ outside a layer it silently overrode every `border-<color>` utility in the app.
+ Measured before the fix: `border-red-500`, `border-primary` and
+ `border-foreground/70` all computed to rgba(0,0,0,0.1), identical to no class
+ at all — 64 usages across 48 files, including 15 `border-primary` selection
+ states, 10 `border-destructive/*` danger states and 6 `border-ring`. Same trap
+ applies to `box-border`/`box-content`, hence box-sizing moves in here too. */
+@layer base {
+ * { box-sizing: border-box; border-color: var(--color-border); }
+}
/* Global :focus-visible fallback — component primitives (Button etc.) own
their own rings; this catches native <a>/<input>, custom tabIndex divs and
anything else without a bespoke focus style. WCAG 2.4.7 (Focus Visible). */
diff --git a/docs/PROGRESS.md b/docs/PROGRESS.md
index 2bc0b808..7677ea94 100644
--- a/docs/PROGRESS.md
+++ b/docs/PROGRESS.md
@@ -8,6 +8,40 @@ Running log of what shipped each phase. Newest at top.
> Read those phases as history. **This file is the source of truth for what exists** —
> `ARCHITECTURE.md` is no longer maintained and carries a stale-warning banner.
+## 2026-08-04 — every `border-<color>` utility in the app was dead, and that is why Android had no visible Back (DONE)
+
+Started from a user report — "stuck in the Android shell, there is no back button, and
+the mobile back affordance is hidden generally". Both turned out to share one root cause
+that had nothing to do with the shells.
+
+**`app/globals.css` overrode every border-colour utility in the codebase.** The line
+`* { box-sizing: border-box; border-color: var(--color-border); }` sat **outside any
+`@layer`**, and unlayered CSS beats every layered rule in the cascade. Tailwind 4 emits
+all utilities into layers, so that single `*` selector silently won against all of them.
+Measured in the live page before the fix — `border-red-500`, `border-primary` and
+`border-foreground/70` all computed to `rgba(0,0,0,0.1)`, byte-identical to an element
+with no class at all. **64 usages across 48 files**, including 15 `border-primary`
+selection states, 10 `border-destructive/*` danger states and 6 `border-ring`. Wrapping
+the rule in `@layer base` fixes all of them at once; `box-sizing` moved with it because
+`box-border`/`box-content` were subject to the same trap. After: `border-primary` →
+`rgb(31,109,240)`. A visible side effect on the desktop shell: the CPU meter bar in the
+Today widget now renders — it had been drawing its fill in the default 10% grey.
+
+**The Android NavBar was transparent, so Back/Home/Recents were invisible.** The row
+carried `text-foreground` with no background of its own, and the Android wallpaper is
+dark — dark-on-dark. It now carries `bg-background/80 backdrop-blur-xl border-t`, which
+restores the token contract (background and foreground are a legible pair by
+construction, whatever the theme). Home/Recents switched from `border-foreground/70` to
+`border-current` so an outline always follows its own button's colour; the back chevron
+went `size-5` → `size-6`. Measured after: scrim `oklab(0.968…/0.8)`, icon `rgb(28,28,31)`
+— roughly 15:1. The 48×48 targets were already correct; nothing was ever missing, it was
+unreadable.
+
+On standardising the two mobile shells: iOS exits an app with a labelled blue **"Done"**
+top-right, Android with the bottom NavBar back. Those are the correct platform metaphors
+and were deliberately kept — the actual defect was that one of the two could not be seen.
+Both are now visible, labelled, and ≥44 px.
+
## 2026-08-03 (UX) — a real browser pass, a demo instance back, and I broke prod proving it (DONE)
First pass that opened the product in a browser instead of reading the code. Also the
diff --git a/frontend/slices/appshell/components/shells/android/android-parts.tsx b/frontend/slices/appshell/components/shells/android/android-parts.tsx
index b4134b7f..beeb1802 100644
--- a/frontend/slices/appshell/components/shells/android/android-parts.tsx
+++ b/frontend/slices/appshell/components/shells/android/android-parts.tsx
@@ -17,20 +17,31 @@ import type { AppDescriptor, WindowState } from "../../../lib/types";
// total every overlay pads for. `inactive` = covered by the app layer's copy.
export function NavBar({ inactive = false, onBack, onHome, onRecents }: { inactive?: boolean; onBack: () => void; onHome: () => void; onRecents: () => void }) {
return (
+ // The row MUST carry its own surface. It used to be fully transparent, which
+ // left `text-foreground` (dark, from the light theme) floating directly on the
+ // wallpaper — and the Android wallpaper is dark, so Back/Home/Recents were
+ // invisible. Pairing bg-background with text-foreground restores the token
+ // contract: whatever the theme, the two are a legible pair by construction.
+ // This is why the shell felt like it had "no back button".
<div
- className="flex shrink-0 items-center justify-around"
+ className="flex shrink-0 items-center justify-around border-t border-border/60 bg-background/80 text-foreground backdrop-blur-xl"
style={{ height: "calc(var(--android-nav) + var(--sai-bottom))", paddingBottom: "var(--sai-bottom)" }}
inert={inactive}
aria-hidden={inactive}
>
<Button type="button" variant="ghost" onClick={onBack} aria-label="Back" className="h-auto p-0 font-normal hover:bg-transparent grid size-12 place-items-center">
- <ChevronLeft className="size-5" />
+ <ChevronLeft className="size-6" />
</Button>
+ {/* border-current, not border-foreground/70: these two are drawn as outlines,
+ so they must follow the button's own colour rather than a token that can
+ drift from it. (border-foreground/70 was also silently dead until the
+ @layer base fix in globals.css — every border-<color> utility was being
+ overridden by an unlayered `*` rule.) */}
<Button type="button" variant="ghost" onClick={onHome} aria-label="Home" className="h-auto p-0 font-normal hover:bg-transparent grid size-12 place-items-center">
- <span className="size-4 rounded-full border-2 border-foreground/70" />
+ <span className="size-4 rounded-full border-2 border-current opacity-80" />
</Button>
<Button type="button" variant="ghost" onClick={onRecents} aria-label="Recents" className="h-auto p-0 font-normal hover:bg-transparent grid size-12 place-items-center">
- <span className="size-3.5 rounded-[3px] border-2 border-foreground/70" />
+ <span className="size-3.5 rounded-[3px] border-2 border-current opacity-80" />
</Button>
</div>
);