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(responsive): harden mobile and landscape layouts

Rahmaned6eb5954023
diff --git a/app/globals.css b/app/globals.css
index ce22ac64..54bbdd5d 100644
--- a/app/globals.css
+++ b/app/globals.css
@@ -524,10 +524,11 @@ body {
the jump moves (maximize/un-maximize/snap) animate. */
.win-geo { transition: left var(--shell-dur) var(--shell-ease), top var(--shell-dur) var(--shell-ease), width var(--shell-dur) var(--shell-ease), height var(--shell-dur) var(--shell-ease); }
-@keyframes appOpen { from { transform: translateY(14px) scale(0.985); } to { transform: none; } }
-/* Dismiss-to-home: the app zooms down a touch + fades, revealing the home
- behind it (real-iOS close). Finalized on animationend in mobile-shell. */
-@keyframes appClose { from { transform: none; opacity: 1; } to { transform: translateY(10px) scale(0.96); opacity: 0; } }
+/* Mobile app transitions intentionally do NOT scale/zoom the whole UI. On phones
+ a full-surface scale makes text and controls visibly breathe; a short spatial
+ translate keeps orientation/navigation feedback without changing perceived UI size. */
+@keyframes mobileAppOpen { from { transform: translateY(10px); } to { transform: none; } }
+@keyframes mobileAppClose { from { transform: none; opacity: 1; } to { transform: translateY(8px); opacity: 0; } }
/* Live-wallpaper blob drift (transform-only — compositor-friendly). */
@keyframes wpFloatA { 0%, 100% { transform: translate(-10%, -6%) scale(1); } 50% { transform: translate(12%, 8%) scale(1.18); } }
@keyframes wpFloatB { 0%, 100% { transform: translate(8%, 10%) scale(1.1); } 50% { transform: translate(-10%, -8%) scale(0.92); } }
diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md
index 134e86ca..f89aaef4 100644
--- a/docs/CHANGELOG.md
+++ b/docs/CHANGELOG.md
@@ -8,6 +8,7 @@ this is the *what*, and it is what Settings → About shows as “What's new”.
**Fixed**
+- `responsive` harden mobile and landscape layouts
- `git` isolate push-gate test repositories
- `settings` improve MCP UI and activity scrolling
diff --git a/frontend/slices/appshell/components/mobile-notifications.tsx b/frontend/slices/appshell/components/mobile-notifications.tsx
index aa39c25a..3862bee0 100644
--- a/frontend/slices/appshell/components/mobile-notifications.tsx
+++ b/frontend/slices/appshell/components/mobile-notifications.tsx
@@ -40,7 +40,7 @@ export function MobileNotifications({ open, onClose }: { open: boolean; onClose:
if (!open) return null;
return (
- <div className="glass absolute inset-0 z-[40] flex flex-col [animation:appOpen_var(--shell-dur)_var(--shell-ease)]" style={{ background: "var(--glass-nc)" }}>
+ <div className="glass absolute inset-0 z-[40] flex flex-col [animation:mobileAppOpen_var(--shell-dur)_var(--shell-ease)]" style={{ background: "var(--glass-nc)" }}>
<header className="flex items-center px-5 pb-2 pt-10 text-white">
<h2 className="text-[22px] font-bold">Notifications</h2>
{items.length > 0 && (
diff --git a/frontend/slices/appshell/components/mobile-shell.tsx b/frontend/slices/appshell/components/mobile-shell.tsx
index 93c3cf04..645f5c76 100644
--- a/frontend/slices/appshell/components/mobile-shell.tsx
+++ b/frontend/slices/appshell/components/mobile-shell.tsx
@@ -30,7 +30,7 @@ export function MobileShell() {
const [cc, setCc] = useState(false);
const [nc, setNc] = useState(false); // notification center (pull down, left half)
const [appScrolled, setAppScrolled] = useState(false); // iOS nav-bar frost-on-scroll
- const [closing, setClosing] = useState(false); // playing the dismiss-to-home zoom
+ const [closing, setClosing] = useState(false); // playing the dismiss-to-home slide
const [actionsOpen, setActionsOpen] = useState(false); // in-app "•••" action drawer
// Dock = manifest-pinned apps (AppDescriptor.pinned — the generic shell never
@@ -91,7 +91,7 @@ export function MobileShell() {
};
const goHome = () => {
setSwitcher(false);
- // Zoom the app down to the home (real-iOS dismiss) when it's actually
+ // Slide the app down to the home when it's actually
// front-most and we're not coming from the switcher; the app layer's
// onAnimationEnd finalises (minimise + show home). Otherwise go straight home.
if (topId && !home && !switcher) {
@@ -100,7 +100,7 @@ export function MobileShell() {
}
setHome(true);
};
- // Called by the app layer once the dismiss zoom finishes.
+ // Called by the app layer once the dismiss transition finishes.
const finishClose = () => {
if (topId) minimizeWindow(topId);
setClosing(false);
@@ -163,7 +163,7 @@ export function MobileShell() {
<div className="absolute inset-0 z-[10] flex flex-col">
{/* Home is inert while an app covers it (a11y: its grid, pager pages and
home-indicator otherwise stay in tab/AT order under the opaque app
- layer). It stays visually mounted for the appOpen zoom. */}
+ layer). It stays visually mounted behind the app transition. */}
<MobileHome
apps={apps}
dockApps={dockApps}
@@ -180,11 +180,11 @@ export function MobileShell() {
<div
className={cn(
"absolute inset-0 z-[10] flex flex-col [transform-origin:center_bottom]",
- closing && "pointer-events-none", // lock interaction during the dismiss zoom
+ closing && "pointer-events-none", // lock interaction during the dismiss transition
)}
style={{
background: "var(--surface)",
- animation: `${closing ? "appClose" : "appOpen"} var(--shell-dur-slow) var(--shell-ease)`,
+ animation: `${closing ? "mobileAppClose" : "mobileAppOpen"} var(--shell-dur-slow) var(--shell-ease)`,
}}
// Finalise the dismiss only when the APP layer's OWN close animation
// ends (guard against a child animation bubbling up).
@@ -249,7 +249,7 @@ export function MobileShell() {
floor still applies, so nothing regresses where the sum used to be right. */}
<main
onScrollCapture={(e) => setAppScrolled((e.target as HTMLElement).scrollTop > 4)}
- className="relative min-h-0 flex-1 overflow-auto [container-type:inline-size]"
+ className="relative min-h-0 flex-1 overflow-x-hidden overflow-y-auto [container-type:inline-size]"
style={{ "--sai-bottom": "max(env(safe-area-inset-bottom, 0px), 34px)" } as React.CSSProperties}
>
<WindowContent app={top.app} payload={top.payload} />
diff --git a/frontend/slices/appshell/components/shells/android/android-notifications.tsx b/frontend/slices/appshell/components/shells/android/android-notifications.tsx
index 24390566..dd4a8476 100644
--- a/frontend/slices/appshell/components/shells/android/android-notifications.tsx
+++ b/frontend/slices/appshell/components/shells/android/android-notifications.tsx
@@ -45,7 +45,7 @@ export function AndroidNotifications({ open, onClose }: { open: boolean; onClose
// It had no animation at all before; the black wash appeared in one frame.
<div className="absolute inset-0 z-[45] flex flex-col bg-black/40 animate-in fade-in duration-[var(--m3-dur-effects)] ease-[var(--m3-effects)]" onClick={onClose}>
{/* The shade is pulled DOWN from the top edge, but it was animating with
- `appOpen`, which travels 14px UPWARD from below — the panel arrived moving
+ the old app-open transition, which traveled UPWARD from below — the panel arrived moving
against the gesture that summoned it. It now slides down from -100% (its
own height, above the viewport) on the M3 SPATIAL SLOW spring (k=200,
ζ=0.8, ~511ms): a full-width surface, so the slow tier.
diff --git a/frontend/slices/appshell/components/shells/android/android-parts.tsx b/frontend/slices/appshell/components/shells/android/android-parts.tsx
index 9688d61a..e029bcd0 100644
--- a/frontend/slices/appshell/components/shells/android/android-parts.tsx
+++ b/frontend/slices/appshell/components/shells/android/android-parts.tsx
@@ -163,13 +163,13 @@ export function AppDrawer({ apps, onLaunch, onClose }: { apps: AppDescriptor[];
return (
// Spatial SLOW (k=200, ζ=0.8, ~511ms): M3 picks the speed tier from the SIZE of
// the moving element, and this is a full-screen surface. Only the model changed
- // here — a 300ms cubic-bezier for the sampled spring — because appOpen's 14px
- // UPWARD travel was already the right direction: the drawer is opened from the
+ // here — a sampled spring on mobileAppOpen's small UPWARD travel, which is
+ // already the right direction: the drawer is opened from the
// "All apps" target at the BOTTOM of the home surface, so it should arrive
// rising from where the finger was. (That target is drawn as a grabber but is a
// plain tap — there is no swipe-up gesture in this shell, only usePullDown for
// the shade and useSwipeUpClose for Recents cards.)
- <div className="absolute inset-0 z-[30] flex flex-col bg-background/95 backdrop-blur-xl [animation:appOpen_var(--m3-dur-spatial-slow)_var(--m3-spatial)]">
+ <div className="absolute inset-0 z-[30] flex flex-col bg-background/95 backdrop-blur-xl [animation:mobileAppOpen_var(--m3-dur-spatial-slow)_var(--m3-spatial)]">
{/* Visually a thin pull handle, but a ≥36px hit area (same treatment as
the iOS home indicator) so it's actually closable by thumb. */}
<Button
diff --git a/frontend/slices/appshell/components/shells/android/android-shell.tsx b/frontend/slices/appshell/components/shells/android/android-shell.tsx
index 4ecc328f..687f9cd2 100644
--- a/frontend/slices/appshell/components/shells/android/android-shell.tsx
+++ b/frontend/slices/appshell/components/shells/android/android-shell.tsx
@@ -13,7 +13,7 @@
import { Button } from "@/components/ui/button";
import { useCallback, useMemo, useRef, useState, type CSSProperties } from "react";
import { useUrlHome } from "../../../hooks/use-url-home";
-import { Search, ArrowLeft, MoreHorizontal, Sparkles } from "lucide-react";
+import { Search, MoreHorizontal, Sparkles } from "lucide-react";
import { useApps } from "../../../lib/registry";
import { usePullDown } from "../../../hooks/use-pull-down";
import { useWindowOrder, useFocused, useWindow } from "../../../hooks/use-shell";
@@ -178,16 +178,16 @@ function AndroidShell() {
{/* Fullscreen app. Open = M3 SPATIAL SLOW (k=200, ζ=0.8, ~511ms). The speed
tier is chosen by the SIZE of the thing that moves, not by how far it
moves: this is the largest surface in the shell, so "slow" is right even
- though appOpen only travels 14px. Most of the perceived movement is over
+ though mobileAppOpen only travels 10px. Most of the perceived movement is over
by ~40% of that; the tail is the settle, which is exactly the part a
cubic-bezier cannot express. Transform-only on purpose — no opacity,
because pairing an effects fade with a spatial slide inside ONE animation
would force a single easing on both families. */}
{showApp && activeApp && top && (
- <div className="absolute inset-0 z-[20] flex flex-col bg-background [animation:appOpen_var(--m3-dur-spatial-slow)_var(--m3-spatial)] [transform-origin:center_bottom]">
- {/* M3 top app bar: flat surface (bg-card, hairline divider), leading
- ArrowLeft up-affordance, Title Large regular weight — not a colored
- brand header. The per-app color still reads on the icon + recents. */}
+ <div className="absolute inset-0 z-[20] flex flex-col bg-background [animation:mobileAppOpen_var(--m3-dur-spatial-slow)_var(--m3-spatial)] [transform-origin:center_bottom]">
+ {/* M3 top app bar: flat surface (bg-card, hairline divider), Title Large
+ regular weight — not a colored brand header. System Back stays in
+ the navigation row below, so this bar does not duplicate it. The per-app color still reads on the icon + recents. */}
<header
className="flex shrink-0 items-center gap-3 border-b border-border bg-card px-3 text-foreground"
style={{ height: "calc(3rem + var(--sai-top, 0px))", paddingTop: "var(--sai-top, 0px)" }}
@@ -196,8 +196,11 @@ function AndroidShell() {
small elements, so "fast" (k=800, ζ=0.6, ~322ms, 9.3% overshoot).
The overshoot is what makes a press feel like a physical button
releasing rather than a scale tween returning. */}
- <Button type="button" variant="ghost" onClick={goHome} aria-label="Back" className={`-ml-2 h-auto p-0 font-normal hover:bg-transparent grid size-12 place-items-center active:scale-90 ${M3_PRESS}`}><ArrowLeft className="size-5" /></Button>
- <span className="flex-1 truncate text-[19px] font-normal">{activeApp.title}</span>
+ {/* The system navigation bar below already owns Android Back. A second
+ shell-level Back here performed the exact same goHome action and
+ doubled the affordance in every app. Internal app navigation (for
+ example Settings detail → Settings list) renders its own Back. */}
+ <span className="flex-1 truncate pl-1 text-[19px] font-normal">{activeApp.title}</span>
{appActions.length > 0 && (
<>
<Button type="button" variant="ghost" aria-label="Ask Alfa" onClick={toggleInspector} className={`h-auto p-0 font-normal hover:bg-transparent grid size-12 place-items-center active:scale-90 ${M3_PRESS}`}><Sparkles className="size-5" /></Button>
@@ -205,7 +208,7 @@ function AndroidShell() {
</>
)}
</header>
- <main className="relative min-h-0 flex-1 overflow-auto [container-type:inline-size]">
+ <main className="relative min-h-0 flex-1 overflow-x-hidden overflow-y-auto [container-type:inline-size]">
<WindowContent app={top.app} payload={top.payload} />
</main>
<NavBar onBack={goHome} onHome={goHome} onRecents={() => setRecents(true)} />
diff --git a/frontend/slices/appshell/features/notifications/components/dynamic-island.tsx b/frontend/slices/appshell/features/notifications/components/dynamic-island.tsx
index 20960f57..736a2b71 100644
--- a/frontend/slices/appshell/features/notifications/components/dynamic-island.tsx
+++ b/frontend/slices/appshell/features/notifications/components/dynamic-island.tsx
@@ -29,7 +29,7 @@ export function DynamicIsland() {
disabled={!a.appId}
onClick={() => a.appId && openAppById(a.appId)}
className="glass h-auto hover:bg-black/85 pointer-events-auto flex max-w-[80%] items-center gap-2.5 rounded-full bg-black/85 px-3.5 py-2 text-white shadow-xl disabled:cursor-default"
- style={{ animation: "appOpen var(--shell-dur) var(--shell-ease)" }}
+ style={{ animation: "mobileAppOpen var(--shell-dur) var(--shell-ease)" }}
>
<span className="grid size-5 shrink-0 place-items-center">
{tone === "done" ? (
diff --git a/frontend/slices/appshell/primitives/app-frame.tsx b/frontend/slices/appshell/primitives/app-frame.tsx
index 25e03c53..150c5120 100644
--- a/frontend/slices/appshell/primitives/app-frame.tsx
+++ b/frontend/slices/appshell/primitives/app-frame.tsx
@@ -35,7 +35,7 @@ export function AppFrame({
)}
<div
className={cn(
- "min-h-0 flex-1 overflow-auto",
+ "min-h-0 flex-1 overflow-x-hidden overflow-y-auto",
safeArea && "[padding-bottom:var(--sai-bottom)]",
bodyClassName,
)}
diff --git a/frontend/slices/appshell/responsive/responsive-provider.test.ts b/frontend/slices/appshell/responsive/responsive-provider.test.ts
index 0469c762..bc402114 100644
--- a/frontend/slices/appshell/responsive/responsive-provider.test.ts
+++ b/frontend/slices/appshell/responsive/responsive-provider.test.ts
@@ -1,5 +1,5 @@
import { describe, it, expect } from "vitest";
-import { sameGeometry } from "./responsive-provider";
+import { sameGeometry, shouldUseMobileSurface } from "./responsive-provider";
import type { Responsive } from "./use-responsive";
const base: Responsive = {
@@ -39,3 +39,29 @@ describe("sameGeometry", () => {
expect(sameGeometry(base, { ...base, ...patch })).toBe(false);
});
});
+
+
+describe("shouldUseMobileSurface", () => {
+ it("uses mobile for portrait phones and desktop for the same phone rotated landscape", () => {
+ expect(shouldUseMobileSurface("phone", 390, 844, true)).toBe(true);
+ expect(shouldUseMobileSurface("phone", 844, 390, true)).toBe(false);
+ });
+
+ it("keeps the explicit Phone preview framed on a wide desktop viewport", () => {
+ expect(shouldUseMobileSurface("phone", 1280, 800, false)).toBe(true);
+ });
+
+ it("keeps auto phone-width portrait mobile but makes phone-width landscape desktop", () => {
+ expect(shouldUseMobileSurface("auto", 390, 844, true)).toBe(true);
+ expect(shouldUseMobileSurface("auto", 667, 375, true)).toBe(false);
+ });
+
+ it("still treats a coarse portrait tablet below 1024px as mobile", () => {
+ expect(shouldUseMobileSurface("auto", 820, 1180, true)).toBe(true);
+ expect(shouldUseMobileSurface("auto", 820, 1180, false)).toBe(false);
+ });
+
+ it("desktop override always stays desktop", () => {
+ expect(shouldUseMobileSurface("desktop", 390, 844, true)).toBe(false);
+ });
+});
diff --git a/frontend/slices/appshell/responsive/responsive-provider.tsx b/frontend/slices/appshell/responsive/responsive-provider.tsx
index 48bac8b9..a49a9ac0 100644
--- a/frontend/slices/appshell/responsive/responsive-provider.tsx
+++ b/frontend/slices/appshell/responsive/responsive-provider.tsx
@@ -12,6 +12,20 @@ import {
export const MOBILE_W = 768; // phone-width cutoff — THE breakpoint (useIsMobile fallback imports it)
const TABLET_W = 1024; // touch-portrait tablets below this read as mobile
+/** Whole-shell surface policy. Phones are mobile only in portrait; landscape is
+ * deliberately the desktop surface so a rotated phone gets the denser desktop
+ * workspace instead of a stretched phone shell. A forced phone preview follows
+ * the same rule — the override selects the portrait persona, not orientation. */
+export function shouldUseMobileSurface(device: DeviceMode, vw: number, vh: number, coarse: boolean): boolean {
+ const portrait = vh >= vw;
+ if (device === "desktop") return false;
+ // Keep the explicit Phone preview usable on a wide desktop: it renders inside
+ // PhoneFrame. On an actual phone-width landscape viewport, switch to desktop.
+ if (device === "phone") return portrait || vw >= TABLET_W;
+ if (!portrait) return false;
+ return vw < MOBILE_W || (coarse && vw < TABLET_W);
+}
+
function bucket(vw: number): Pane {
if (vw < 480) return "xs";
if (vw < MOBILE_W) return "sm";
@@ -90,8 +104,7 @@ export function ResponsiveProvider({
const vh = window.innerHeight;
const coarse = window.matchMedia?.("(pointer: coarse)").matches ?? false;
const portrait = vh >= vw;
- const auto = vw < MOBILE_W || (coarse && portrait && vw < TABLET_W);
- const isMobile = device === "phone" ? true : device === "desktop" ? false : auto;
+ const isMobile = shouldUseMobileSurface(device, vw, vh, coarse);
const next: Responsive = {
formFactor: isMobile ? "mobile" : "desktop",
isMobile,
diff --git a/frontend/slices/appshell/responsive/use-is-mobile.ts b/frontend/slices/appshell/responsive/use-is-mobile.ts
index 1a781d96..9a815d99 100644
--- a/frontend/slices/appshell/responsive/use-is-mobile.ts
+++ b/frontend/slices/appshell/responsive/use-is-mobile.ts
@@ -2,7 +2,7 @@
import * as React from "react";
import { ResponsiveContext } from "./use-responsive";
-import { MOBILE_W as MOBILE_BREAKPOINT } from "./responsive-provider";
+import { shouldUseMobileSurface } from "./responsive-provider";
// True when the viewport is phone-sized. Inside the shell this reads the single
// <ResponsiveProvider> source of truth; outside it (rare — a standalone preview,
@@ -15,11 +15,17 @@ export function useIsMobile(): boolean {
React.useEffect(() => {
if (ctx) return; // provider drives it; no standalone listener needed
- const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
- const onChange = () => setFallback(window.innerWidth < MOBILE_BREAKPOINT);
+ const onChange = () => {
+ const coarse = window.matchMedia?.("(pointer: coarse)").matches ?? false;
+ setFallback(shouldUseMobileSurface("auto", window.innerWidth, window.innerHeight, coarse));
+ };
onChange();
- mql.addEventListener("change", onChange);
- return () => mql.removeEventListener("change", onChange);
+ window.addEventListener("resize", onChange);
+ window.addEventListener("orientationchange", onChange);
+ return () => {
+ window.removeEventListener("resize", onChange);
+ window.removeEventListener("orientationchange", onChange);
+ };
}, [ctx]);
return ctx ? ctx.isMobile : fallback;
diff --git a/frontend/slices/reel-editor/components/menu-bar.tsx b/frontend/slices/reel-editor/components/menu-bar.tsx
index 4ef10b89..5026defe 100644
--- a/frontend/slices/reel-editor/components/menu-bar.tsx
+++ b/frontend/slices/reel-editor/components/menu-bar.tsx
@@ -72,7 +72,7 @@ export function MenuBar(p: MenuBarProps) {
const shortcuts = "Space play · S split · ⌘Z undo · ⌘⇧Z redo · ⌘D duplicate · ⌫ delete";
return (
- <header className="flex items-center gap-1 border-b border-border bg-card px-2 py-1">
+ <header className="flex min-w-0 items-center gap-1 overflow-x-auto border-b border-border bg-card px-2 py-1 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden">
<FilePicker ref={imgRef} accept="image/*" onFiles={onFiles("image")} />
<FilePicker ref={vidRef} accept="video/*" onFiles={onFiles("video")} />
<FilePicker ref={audRef} accept="audio/*" onFiles={onFiles("audio")} />
diff --git a/scripts/e2e/shell.mjs b/scripts/e2e/shell.mjs
index b2081bdc..bd6df434 100644
--- a/scripts/e2e/shell.mjs
+++ b/scripts/e2e/shell.mjs
@@ -77,13 +77,13 @@ const IGNORE = [
/openverse|unsplash/i,
];
-async function session(browser, { width, height, label }) {
+async function session(browser, { width, height, label, touch = width < 768, expectedSurface = width < 768 ? "mobile" : "desktop" }) {
console.log(`\n▶ ${label} (${width}×${height})`);
const ctx = await browser.newContext({
viewport: { width, height },
deviceScaleFactor: 2,
- hasTouch: width < 768,
- isMobile: width < 768,
+ hasTouch: touch,
+ isMobile: touch,
});
const errors = [];
ctx.on("console", (m) => {
@@ -140,8 +140,8 @@ async function session(browser, { width, height, label }) {
check(me?.authenticated === true, `really signed in (authenticated=${me?.authenticated})`);
if (!me?.authenticated) fail("everything below this line is testing MOCK data — fix auth first");
check(
- width < 768 ? ["ios", "android"].includes(shell) : ["macos", "windows", "dashboard"].includes(shell),
- `${shell} is the right shell for this viewport`,
+ expectedSurface === "mobile" ? ["ios", "android"].includes(shell) : ["macos", "windows", "dashboard"].includes(shell),
+ `${shell} is the right ${expectedSurface} shell for this viewport`,
);
// ── no horizontal overflow. A shell that scrolls sideways is broken on a phone
@@ -160,7 +160,11 @@ async function session(browser, { width, height, label }) {
// pointer, and the iOS home paginates so half the grid is off-screen. A launcher
// that cannot be clicked is a real finding, but it is a DIFFERENT test from "does
// this app render", and conflating them made both unreliable.
- for (const slug of ["files", "monitor", "settings", "code", "terminal"]) {
+ const nativeSlugs = [
+ "files", "browser", "code", "terminal", "claude", "studio", "reel", "viewer",
+ "store", "create", "monitor", "assistant", "links", "docs", "settings",
+ ];
+ for (const slug of nativeSlugs) {
await page.goto(`${BASE}/${slug}`, { waitUntil: "domcontentloaded" });
await page.waitForTimeout(1200);
// Desktop puts the app in a [data-window]; iOS/Android render it full-screen in
@@ -191,13 +195,26 @@ async function session(browser, { width, height, label }) {
check(realErrors.length === 0, `zero console errors${realErrors.length ? ` — first: ${realErrors[0].slice(0, 160)}` : ""}`);
for (const e of realErrors.slice(0, 5)) console.log(` · ${e.slice(0, 200)}`);
+ // Managed-app routes are cross-origin embeds in production. On a loopback E2E
+ // origin their own frame-ancestors/session policy correctly rejects the iframe,
+ // so exercise host routing/rendering here without treating that origin mismatch
+ // as an MSO host-network failure. Their own runtime has separate managed-app tests.
+ for (const slug of ["hermes", "openclaw"]) {
+ await page.goto(`${BASE}/${slug}`, { waitUntil: "domcontentloaded" });
+ await page.waitForTimeout(1200);
+ check(page.url().endsWith(`/${slug}`), `/${slug} managed-app deep-link kept the URL`);
+ if (width >= 768) check((await page.locator("[data-window]").count()) > 0, `/${slug} managed-app opened a window`);
+ check((await page.locator(".animate-spin").count()) === 0, `/${slug} managed-app host rendered without a stuck spinner`);
+ }
+
await ctx.close();
}
const browser = await chromium.launch({ headless: HEADLESS });
try {
await session(browser, { width: 1280, height: 800, label: "desktop" });
- await session(browser, { width: 390, height: 844, label: "mobile" });
+ await session(browser, { width: 390, height: 844, label: "mobile portrait" });
+ await session(browser, { width: 844, height: 390, label: "phone landscape → desktop", touch: true, expectedSurface: "desktop" });
} finally {
await browser.close();
}