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.
TypeScript browser-shellcontrol-planefile-managerhomelabmobile-firstnextjsptyreactself-hostedserver-managementshadcn-uisysadmintailwindcssterminaltypescriptvpsweb-desktopweb-terminal
fix(mcp): render one bounded inline Page preview
Rahman4763adea3693
diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.mdindex 0acf1992..2b32099a 100644--- a/docs/ARCHITECTURE.md+++ b/docs/ARCHITECTURE.md@@ -123,14 +123,14 @@ MSO exposes exactly two user-visible MCP App classes instead:- `render_mso_block` binds `ui://mso/block-v2.html` for compact validation, action buttons, andCRUD input-output. A button returns a user-approved follow-up message; it does not execute amutation inside the widget, so ordinary scope, approval, audit, and workflow rules still apply.-- `render_mso_page` binds `ui://mso/page-v3.html` for native `/`, `/monitor`, `/project`, `/diff`,+- `render_mso_page` binds the canonical `ui://mso/page-v10.html` resource for native `/`, `/monitor`, `/project`, `/diff`,`/browser`, and `/apps/<reviewed-id>` views. Native Page views call the same bounded MSO tools.`workflow_start` is orchestration-only and headless: it still owns workflow isolation, skill/recipelookup, collision detection, tracing, evidence, and learning, but no longer binds a UI resource.`project_get`, `project_diff`, and `vps_status` likewise remain pure data tools. The previous`render_mso_surface` and `workflow_status` actions are app-only compatibility shims for cached-widgets; Block/Page v1 plus the previous workflow/surface resource URIs remain readable aliases but are not advertised.+widgets; prior Block/Page URIs plus the previous workflow/surface resource URIs remain readable aliases but are not advertised. Page tools use the standard MCP Apps `ui.resourceUri` binding only; the legacy ChatGPT `openai/outputTemplate` alias is intentionally absent so one tool result maps to one Page mount.Reviewed Page apps may use a nested iframe only when their exact HTTPS origin exists in thecode-owned Page catalog and the MCP resource CSP `frameDomains`; anti-frame apps stay on thediff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.mdindex 2456b24b..535f53c0 100644--- a/docs/CHANGELOG.md+++ b/docs/CHANGELOG.md@@ -18,6 +18,7 @@ this is the *what*, and it is what Settings → About shows as “What's new”.**Fixed**+- `mcp` render one bounded inline Page preview- preserve home-relative stores and prove tunnel rollback completion- `security` verify exact branch dispositions and narrow message origins- `security` retain artifact-lock compatibility and require fresh scan evidencediff --git a/docs/CHATGPT-PLUGIN.md b/docs/CHATGPT-PLUGIN.mdindex 90f02268..43458af4 100644--- a/docs/CHATGPT-PLUGIN.md+++ b/docs/CHATGPT-PLUGIN.md@@ -58,6 +58,10 @@ Project-owned MCP names and Convex's own dynamic schemas still load on demand thChatGPT presentation is explicit rather than attached to every operation. `workflow_start` is headless. `render_mso_block` opens the compact validation/action/CRUD component and accepts only bounded fields, checks, outputs, and follow-up actions; a button cannot execute a mutation inside the widget. `render_mso_page` opens native MSO views or a code-reviewed development/preview/production app. It accepts only MSO-style routes and server-owned app ids, never arbitrary HTML or an external URL. `mso_surface_apps_list` exposes the reviewed Page catalog. Direct nested frames are exact-origin allowlisted in the Page CSP, while anti-frame applications remain remote-browser candidates. User-installed runtime HTML apps do not inherit this trust automatically. `render_mso_surface` and `workflow_status` remain app-only compatibility shims for cached clients.+`render_mso_page` and `integration_setup_open` bind Page through the standard MCP Apps `ui.resourceUri` field only. Do not mirror `openai/outputTemplate` onto Page tools: the current ChatGPT host already supports the standard binding, and dual Page bindings can mount the same UI twice. Page v10 therefore uses one modern binding and keeps earlier Page URIs only as non-advertised read aliases.++Reviewed app previews enter in **inline** mode. The widget derives an inline height cap of 48% from the host-provided `maxHeight`, so an ordinary chat preview stays below half of the available host area and scrolls internally when needed. Fullscreen and PiP remain explicit user actions and are not constrained by the inline cap.+### Structured-result contractAfter the Fresh 3 rescan exposed `Output schema recommended` on non-UI actions, the ChatGPT profile now advertises an output schema on **all current ChatGPT transport actions** without duplicating dozens of provider/project result definitions. Tools with stable UI-critical shapes keep their explicit typed schemas. Every other ChatGPT action uses one exact outer `{ result: ... }` contract and returns the already-bounded JSON value inside `structuredContent.result`; its text `content` is a short acknowledgement so the same payload is not duplicated in the conversation transcript. Full/generic MCP clients keep the historical text-only contract unless a tool explicitly declares structured output. `screen_capture` keeps the image in MCP content and exposes only safe dimensions/URLs/expiry metadata in the structured envelope—never base64 image bytes.diff --git a/docs/MCP.md b/docs/MCP.mdindex 888b3dd4..8616e56f 100644--- a/docs/MCP.md+++ b/docs/MCP.md@@ -706,7 +706,7 @@ MSO Integrations uses the existing Page at `/integrations`. The write-scoped`integration_setup_open` tool opens a secure form without accepting secret values.See [Native Integrations](INTEGRATIONS.md) for browser/CLI entrypoints, scope,expiry, direct HTTPS submission, and verification limits. The friendly browser-entrypoint is `/integrations`; Page v5 retains previous resource aliases.+entrypoint is `/integrations`; Page v10 retains previous resource aliases. Page-bound tools advertise only the standard MCP Apps `ui.resourceUri`; the legacy `openai/outputTemplate` Page alias is intentionally omitted to prevent duplicate host mounts. Inline Page previews are capped at 48% of the host-reported maximum height, while fullscreen/PiP require explicit user action.## Session artifact evidencediff --git a/docs/PROGRESS.md b/docs/PROGRESS.mdindex 5a30cc31..07273d44 100644--- a/docs/PROGRESS.md+++ b/docs/PROGRESS.md@@ -1,3 +1,9 @@+## 2026-09-06 — One bounded MCP Page preview per tool result++A real ChatGPT screenshot showed Play Together twice inside one MSO Page result and an inline preview consuming more than the requested share of the conversation. The Page descriptor was publishing both the standard MCP Apps `ui.resourceUri` and the legacy ChatGPT `openai/outputTemplate` for the same Page resource while the reviewed app catalog still defaulted Play Together to `fullscreen`. Page v10 removes the legacy Page binding from `render_mso_page` and `integration_setup_open`, defaults reviewed apps to `inline`, and keeps older Page URIs as read-only cache aliases.++Inline height now derives from the host-provided `maxHeight` and is capped at 48%, with the Page body owning overflow instead of forcing 360–480 px iframe minimums. Fullscreen and PiP remain explicit controls and keep their prior full-host sizing. Browser coverage proves one reviewed child frame per Page document, one load for unchanged results, inline mode under half of an 800 px host fixture, explicit fullscreen/PiP capability advertisement, source/origin readiness checks, timeout/retry, and Google-auth external-link safeguards. MCP server 1.12.1 / toolset 2026.09.06.1 records the metadata contract change.+## 2026-09-05 — Reconcile new connection-model findings before final publication## 2026-09-05 — Hostinger Mail API as a first-class connection capabilitydiff --git a/docs/generated/MCP-CATALOG.md b/docs/generated/MCP-CATALOG.mdindex 03123f4b..44ac25bf 100644--- a/docs/generated/MCP-CATALOG.md+++ b/docs/generated/MCP-CATALOG.md@@ -4,13 +4,13 @@## Full MSO catalog-<!-- mcp-toolset: server=1.12.0 version=2026.09.05.10 tools=95 read=46 write=29 exec=20 -->+<!-- mcp-toolset: server=1.12.1 version=2026.09.06.1 tools=95 read=46 write=29 exec=20 -->| Fact | Current source value ||---|---:|-| MCP server | `1.12.0` |-| Toolset | `2026.09.05.10` |-| Toolset changed at | `2026-09-05T16:12:00Z` |+| MCP server | `1.12.1` |+| Toolset | `2026.09.06.1` |+| Toolset changed at | `2026-09-05T17:09:52Z` || Transport tools | **97** || Model/operator tools | **95** || Read | **46** |@@ -129,7 +129,7 @@## ChatGPT static profile-<!-- mcp-chatgpt-profile: server=1.12.0 version=2026.09.05.10 tools=71 read=37 write=21 exec=13 app-only=2 total=73 -->+<!-- mcp-chatgpt-profile: server=1.12.1 version=2026.09.06.1 tools=71 read=37 write=21 exec=13 app-only=2 total=73 -->The ChatGPT profile is a fail-closed static projection defined by `CHATGPT_TOOL_NAMES`. OAuth scope is still enforced independently; project-owned MCP tool names remain dynamic data behind the generic project bridge.diff --git a/lib/mcp/integration-setup.test.ts b/lib/mcp/integration-setup.test.tsindex 7fd7eeed..41161c3a 100644--- a/lib/mcp/integration-setup.test.ts+++ b/lib/mcp/integration-setup.test.ts@@ -20,7 +20,8 @@ describe("MCP integration setup privacy", () => {it("requires write scope, accepts no credential parameters, and uses the existing Page", () => {const tool = SURFACE_TOOLS.find(t => t.name === "integration_setup_open")!;expect(tool.scope).toBe("write"); expect(Object.keys(tool.inputSchema.properties)).toEqual(["user", "connection", "provider", "method"]);- expect(tool.meta?.["openai/outputTemplate"]).toMatch(/^ui:\/\/mso\/page/);+ expect((tool.meta?.ui as { resourceUri?: string }).resourceUri).toMatch(/^ui:\/\/mso\/page-v10\.html$/);+ expect(tool.meta?.["openai/outputTemplate"]).toBeUndefined();expect(resolveSurfaceRoute("/integrations").kind).toBe("integrations");expect(() => new Function(MSO_SURFACE_SCRIPT)).not.toThrow();expect(MSO_SURFACE_SCRIPT).toContain('"ui/initialize"');diff --git a/lib/mcp/surface-catalog.test.ts b/lib/mcp/surface-catalog.test.tsindex 7a37f4ba..c442b06e 100644--- a/lib/mcp/surface-catalog.test.ts+++ b/lib/mcp/surface-catalog.test.ts@@ -14,6 +14,7 @@ describe("MSO Page trusted app catalog", () => {origin: "https://game.rahmanef.com",startPath: "/embed",renderer: "iframe",+ presentation: "inline",environment: "production",});expect(JSON.stringify(apps)).not.toContain("sandbox");diff --git a/lib/mcp/surface-catalog.ts b/lib/mcp/surface-catalog.tsindex cc37e327..57369711 100644--- a/lib/mcp/surface-catalog.ts+++ b/lib/mcp/surface-catalog.ts@@ -29,7 +29,7 @@ export const SURFACE_APPS: readonly SurfaceApp[] = [startPath: "/embed",externalAuthPath: "/?auth=google",renderer: "iframe",- presentation: "fullscreen",+ presentation: "inline",environment: "production",sandbox: "allow-scripts allow-same-origin allow-forms allow-pointer-lock",},diff --git a/lib/mcp/tools-surface.test.ts b/lib/mcp/tools-surface.test.tsindex 02048393..7a8804cf 100644--- a/lib/mcp/tools-surface.test.ts+++ b/lib/mcp/tools-surface.test.ts@@ -30,12 +30,15 @@ describe("MSO Page MCP tools", () => {expect(result.app).toMatchObject({id: "play-together",renderer: "iframe",+ presentation: "inline",origin: "https://game.rahmanef.com",startPath: "/embed",environment: "production",url: "https://game.rahmanef.com/embed",});expect(result.app).not.toHaveProperty("sandbox");+ expect((render.meta?.ui as { resourceUri?: string }).resourceUri).toMatch(/^ui:\/\/mso\/page-v10\.html$/);+ expect(render.meta?.["openai/outputTemplate"]).toBeUndefined();});it("keeps scanner-facing Page metadata scoped to Play Together", () => {@@ -50,6 +53,14 @@ describe("MSO Page MCP tools", () => {expect(result).toMatchObject({ route: "/project", kind: "project", project: "mso", openPath: "/files" });});+ it("uses only the standard resource binding for Page tools", () => {+ for (const name of ["render_mso_page", "integration_setup_open"] as const) {+ const value = tool(name);+ expect((value.meta?.ui as { resourceUri?: string }).resourceUri).toMatch(/^ui:\/\/mso\/page-v10\.html$/);+ expect(value.meta?.["openai/outputTemplate"]).toBeUndefined();+ }+ });+it("retains an app-only compatibility alias without another UI resource binding", async () => {const legacy = tool("render_mso_surface");expect(legacy.meta).toMatchObject({ ui: { visibility: ["app"] }, "openai/widgetAccessible": true });diff --git a/lib/mcp/tools-surface.ts b/lib/mcp/tools-surface.tsindex 7d4fca63..4a9fa61e 100644--- a/lib/mcp/tools-surface.ts+++ b/lib/mcp/tools-surface.ts@@ -64,7 +64,6 @@ export const SURFACE_TOOLS: McpTool[] = [outputSchema: PAGE_OUTPUT,meta: {ui: { resourceUri: MSO_PAGE_URI, visibility: ["model", "app"] },- "openai/outputTemplate": MSO_PAGE_URI,"openai/widgetAccessible": true,"openai/toolInvocation/invoking": "Opening secure integration setup…","openai/toolInvocation/invoked": "Secure setup form opened",@@ -97,7 +96,6 @@ export const SURFACE_TOOLS: McpTool[] = [outputSchema: PAGE_OUTPUT,meta: {ui: { resourceUri: MSO_PAGE_URI, visibility: ["model", "app"] },- "openai/outputTemplate": MSO_PAGE_URI,"openai/toolInvocation/invoking": "Opening MSO Page…","openai/toolInvocation/invoked": "MSO Page opened","openai/widgetAccessible": true,diff --git a/lib/mcp/toolset.ts b/lib/mcp/toolset.tsindex 0a3fa059..e806af4f 100644--- a/lib/mcp/toolset.ts+++ b/lib/mcp/toolset.ts@@ -3,9 +3,9 @@ import type { Scope } from "./scope";import type { McpTool } from "./tool-kit";import { toolDescriptor, type McpToolProfile } from "./tool-contract";-export const MCP_SERVER_VERSION = "1.12.0";-export const MCP_TOOLSET_VERSION = "2026.09.05.10";-export const MCP_TOOLSET_CHANGED_AT = "2026-09-05T16:12:00Z";+export const MCP_SERVER_VERSION = "1.12.1";+export const MCP_TOOLSET_VERSION = "2026.09.06.1";+export const MCP_TOOLSET_CHANGED_AT = "2026-09-05T17:09:52Z";export type McpToolsetInfo = {serverVersion: string;diff --git a/lib/mcp/ui-page-lifecycle.test.ts b/lib/mcp/ui-page-lifecycle.test.tsindex cf73a8d9..f0cb8b27 100644--- a/lib/mcp/ui-page-lifecycle.test.ts+++ b/lib/mcp/ui-page-lifecycle.test.ts@@ -1,12 +1,13 @@import { inlineScripts } from "../../scripts/test-support/inline-scripts";import { describe, expect, it } from "vitest";-import { LEGACY_PAGE_V2_URI, LEGACY_PAGE_V3_URI, MSO_PAGE_URI, listUiResources, readUiResource } from "./ui-resources";+import { LEGACY_PAGE_V2_URI, LEGACY_PAGE_V3_URI, LEGACY_PAGE_V9_URI, MSO_PAGE_URI, listUiResources, readUiResource } from "./ui-resources";describe("MCP Page lifecycle and cached resource migration", () => {it("serves current bytes to cached v2 clients without advertising a third UI", () => {const page = readUiResource(MSO_PAGE_URI);expect(readUiResource(LEGACY_PAGE_V2_URI)).toMatchObject({ uri: LEGACY_PAGE_V2_URI, text: page?.text });expect(readUiResource(LEGACY_PAGE_V3_URI)).toMatchObject({ uri: LEGACY_PAGE_V3_URI, text: page?.text });+ expect(readUiResource(LEGACY_PAGE_V9_URI)).toMatchObject({ uri: LEGACY_PAGE_V9_URI, text: page?.text });expect(listUiResources()).toHaveLength(2);expect(listUiResources().some((resource) => resource.uri === LEGACY_PAGE_V2_URI)).toBe(false);});@@ -24,6 +25,12 @@ describe("MCP Page lifecycle and cached resource migration", () => {'data.type!=="play-together:embed-ready"||data.schemaVersion!==1','if(key===lastOutputKey){','setTimeout(unavailable,12000)',+ 'hostMax*.48',+ 'availableDisplayModes:["inline","fullscreen","pip"]',]) expect(script).toContain(marker);+ expect(html).toContain('html[data-display-mode="inline"] .surface');+ expect(html).toContain('max-height:var(--inline-max-h)');+ expect(html).toContain('html[data-display-mode="fullscreen"] .surface{height:100vh;height:100dvh');+ expect(html).not.toContain('presentation:"fullscreen"');});});diff --git a/lib/mcp/ui-resources.test.ts b/lib/mcp/ui-resources.test.tsindex a7ea8fc2..81982431 100644--- a/lib/mcp/ui-resources.test.ts+++ b/lib/mcp/ui-resources.test.ts@@ -56,9 +56,16 @@ describe("MCP Apps Block and Page contract", () => {expect(page?.outputSchema).toBeDefined();expect(page?._meta).toMatchObject({ui: { resourceUri: MSO_PAGE_URI, visibility: ["model", "app"] },- "openai/outputTemplate": MSO_PAGE_URI,"openai/widgetAccessible": true,});+ expect(page?._meta?.["openai/outputTemplate"]).toBeUndefined();++ const setup = tools.find((tool) => tool.name === "integration_setup_open");+ expect(setup?._meta).toMatchObject({+ ui: { resourceUri: MSO_PAGE_URI, visibility: ["model", "app"] },+ "openai/widgetAccessible": true,+ });+ expect(setup?._meta?.["openai/outputTemplate"]).toBeUndefined();const legacy = tools.find((tool) => tool.name === "render_mso_surface");expect(legacy?._meta).toMatchObject({ ui: { visibility: ["app"] }, "openai/widgetAccessible": true });@@ -150,7 +157,7 @@ describe("MCP Apps Block and Page contract", () => {frameDomains: ["https://game.rahmanef.com"],});expect(content._meta["openai/widgetCSP"]).toEqual({ connect_domains: [MSO_ORIGIN], frame_domains: ["https://game.rahmanef.com"], redirect_domains: [MSO_ORIGIN, "https://game.rahmanef.com"] });- expect(MSO_PAGE_URI).toContain("page-v9.html");+ expect(MSO_PAGE_URI).toContain("page-v10.html");});it("returns only redacted structured workflow state and keeps status polling out of workflow memory", async () => {diff --git a/lib/mcp/ui-resources.ts b/lib/mcp/ui-resources.tsindex 63b7c3d6..845732ca 100644--- a/lib/mcp/ui-resources.ts+++ b/lib/mcp/ui-resources.ts@@ -8,6 +8,7 @@ export const MCP_APP_MIME_TYPE = "text/html;profile=mcp-app";// across the UI-contract migration. They are intentionally not advertised by// resources/list: the public product contract has exactly Block and Page.export const LEGACY_BLOCK_V1_URI = "ui://mso/block-v1.html";+export const LEGACY_PAGE_V9_URI = "ui://mso/page-v9.html";export const LEGACY_PAGE_V8_URI = "ui://mso/page-v8.html";export const LEGACY_PAGE_V7_URI = "ui://mso/page-v7.html";export const LEGACY_PAGE_V6_URI = "ui://mso/page-v6.html";@@ -30,6 +31,7 @@ export type McpUiResource = {const RESOURCES: readonly McpUiResource[] = [MSO_BLOCK_RESOURCE, MSO_PAGE_RESOURCE];const LEGACY_ALIASES = new Map<string, McpUiResource>([+ [LEGACY_PAGE_V9_URI, MSO_PAGE_RESOURCE],[LEGACY_PAGE_V8_URI, MSO_PAGE_RESOURCE],[LEGACY_PAGE_V7_URI, MSO_PAGE_RESOURCE],[LEGACY_PAGE_V6_URI, MSO_PAGE_RESOURCE],diff --git a/lib/mcp/ui-surface-script.ts b/lib/mcp/ui-surface-script.tsindex 186b79b0..9aceaeb1 100644--- a/lib/mcp/ui-surface-script.ts+++ b/lib/mcp/ui-surface-script.ts@@ -55,7 +55,7 @@ function openPath(path){setMsoTarget(validRoute(path)?path:"/assistant/mcp")}function applyHostGlobals(){const api=hostConnected?{...(window.openai||{}),...hostContext}:{...hostContext,...(window.openai||{})};applyHostTheme();- const max=Number(api.maxHeight);document.documentElement.style.setProperty("--host-max-h",Number.isFinite(max)&&max>180?Math.floor(max)+"px":"680px");+ const max=Number(api.maxHeight),hostMax=Number.isFinite(max)&&max>180?Math.floor(max):680;document.documentElement.style.setProperty("--host-max-h",hostMax+"px");document.documentElement.style.setProperty("--inline-max-h",Math.max(1,Math.floor(hostMax*.48))+"px");const safe=api.safeArea||{};for(const [key,value] of [["top",safe.top],["right",safe.right],["bottom",safe.bottom],["left",safe.left]]){const n=Number(value);document.documentElement.style.setProperty("--safe-"+key,Number.isFinite(n)?Math.max(0,n)+"px":"0px")}const mode=["inline","fullscreen","pip"].includes(api.displayMode)?api.displayMode:"inline";document.documentElement.dataset.displayMode=mode;diff --git a/lib/mcp/ui-surface-style.ts b/lib/mcp/ui-surface-style.tsindex 248c597f..a21026fe 100644--- a/lib/mcp/ui-surface-style.ts+++ b/lib/mcp/ui-surface-style.ts@@ -2,10 +2,15 @@ import { MSO_WIDGET_TOKENS } from "./ui-widget-tokens";export const MSO_SURFACE_STYLE = String.raw`${MSO_WIDGET_TOKENS}-:root{font-family:var(--font-body);--line:var(--sep);--muted:var(--text-dim);--soft:var(--field);--accent:var(--os-accent);--safe-top:0px;--safe-right:0px;--safe-bottom:0px;--safe-left:0px;--host-max-h:680px}*{box-sizing:border-box}html,body{margin:0;min-width:0;background:transparent;color:var(--text)}body{padding:8px;font-family:var(--font-body)}.surface{display:flex;min-height:260px;max-height:var(--host-max-h);overflow:hidden;flex-direction:column;border:1px solid var(--sep-strong);border-radius:18px;background:var(--surface);box-shadow:var(--shadow-pop)}.bar{display:flex;min-height:48px;align-items:center;gap:8px;padding:8px 10px;border-bottom:1px solid var(--sep);padding-left:max(10px,var(--safe-left));padding-right:max(10px,var(--safe-right))}.brand{display:grid;place-items:center;width:30px;height:30px;flex:0 0 30px;border-radius:9px;background:var(--text);color:var(--surface);font-family:var(--font-display);font-size:12px;font-weight:850}.heading{min-width:0;flex:1}.heading strong{display:block;font-family:var(--font-display);font-size:12px;line-height:1.2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.heading span{display:block;margin-top:2px;font-size:9px;color:var(--text-dim);font-family:var(--font-mono);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tools{display:flex;align-items:center;gap:5px;flex-wrap:wrap;justify-content:flex-end}button,.button{appearance:none;border:1px solid var(--sep-strong);background:var(--field);color:var(--text);border-radius:9px;padding:6px 8px;min-height:30px;font:inherit;font-size:10px;font-weight:650;cursor:pointer;text-decoration:none}button:hover,.button:hover{background:var(--hover-strong)}button:focus-visible,.button:focus-visible{outline:2px solid var(--os-accent);outline-offset:2px}.primary{border-color:var(--text);background:var(--text);color:var(--surface)}.primary:hover{background:var(--text);box-shadow:0 8px 22px color-mix(in srgb,var(--text) 15%,transparent)}.open-direct{font-size:9px;color:inherit}.open-feedback{display:none}.body{min-height:0;flex:1;overflow:auto;padding:12px;padding-bottom:max(12px,var(--safe-bottom));scrollbar-gutter:stable}.home{display:grid;gap:12px}.hero{padding:14px;border:1px solid var(--sep-strong);border-radius:15px;background:linear-gradient(135deg,color-mix(in srgb,var(--os-accent) 9%,var(--surface)),var(--surface))}.hero h2{margin:0;font-family:var(--font-display);font-size:17px}.hero p{max-width:680px;margin:5px 0 0;font-size:11px;line-height:1.5;color:var(--text-dim)}.section-title{margin:2px 0 7px;font-family:var(--font-mono);font-size:10px;text-transform:uppercase;letter-spacing:.08em;color:var(--text-dim)}.grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.card{min-width:0;text-align:left;padding:11px;border:1px solid var(--sep-strong);border-radius:13px;background:var(--field)}.card:hover{background:var(--hover)}.card strong{display:block;font-family:var(--font-display);font-size:11px}.card span{display:block;margin-top:4px;font-size:9px;line-height:1.4;color:var(--text-dim)}.tag{display:inline-flex!important;width:auto!important;margin-top:8px!important;padding:2px 6px;border-radius:999px;border:1px solid var(--sep-strong);font-family:var(--font-mono);font-size:8px!important;text-transform:uppercase;letter-spacing:.06em}.stage{display:flex;min-height:330px;height:100%;flex-direction:column}.stage-head{display:flex;align-items:center;gap:8px;margin-bottom:8px}.back{flex:0 0 auto}.stage-title{min-width:0;flex:1}.stage-title strong{display:block;font-family:var(--font-display);font-size:12px}.stage-title span{display:block;margin-top:2px;font-size:9px;color:var(--text-dim)}.frame-wrap{position:relative;min-height:280px;flex:1;overflow:hidden;border:1px solid var(--sep-strong);border-radius:13px;background:var(--inset)}.frame-wrap iframe{display:block;width:100%;height:100%;min-height:360px;border:0;background:#fff}.notice{display:grid;min-height:280px;place-items:center;border:1px solid var(--sep-strong);border-radius:13px;background:var(--field);padding:24px;text-align:center}.notice>div{max-width:520px}.notice h3{margin:0;font-family:var(--font-display);font-size:14px}.notice p{margin:7px 0 0;color:var(--text-dim);font-size:10px;line-height:1.5}.notice .row{justify-content:center;margin-top:12px}.metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.metric{padding:12px;border:1px solid var(--sep-strong);border-radius:12px;background:var(--field)}.metric span{display:block;font-family:var(--font-mono);font-size:8px;text-transform:uppercase;letter-spacing:.08em;color:var(--text-dim)}.metric strong{display:block;margin-top:4px;font-family:var(--font-display);font-size:13px}.list{margin-top:8px;border:1px solid var(--sep-strong);border-radius:12px;overflow:hidden}.line{display:flex;align-items:center;gap:10px;min-height:34px;padding:7px 9px;border-top:1px solid var(--sep);font-size:10px}.line:first-child{border-top:0}.line span{color:var(--text-dim)}.line strong{margin-left:auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mono{font-family:var(--font-mono)}.loading{display:grid;min-height:240px;place-items:center;color:var(--text-dim);font-size:11px}.error{color:var(--destructive-text)}.mode-badge{padding:3px 6px;border-radius:999px;background:var(--field);font-family:var(--font-mono);font-size:8px;color:var(--text-dim)}+:root{font-family:var(--font-body);--line:var(--sep);--muted:var(--text-dim);--soft:var(--field);--accent:var(--os-accent);--safe-top:0px;--safe-right:0px;--safe-bottom:0px;--safe-left:0px;--host-max-h:680px;--inline-max-h:326px}*{box-sizing:border-box}html,body{margin:0;min-width:0;background:transparent;color:var(--text)}body{padding:8px;font-family:var(--font-body)}.surface{display:flex;min-height:260px;max-height:var(--host-max-h);overflow:hidden;flex-direction:column;border:1px solid var(--sep-strong);border-radius:18px;background:var(--surface);box-shadow:var(--shadow-pop)}.bar{display:flex;min-height:48px;align-items:center;gap:8px;padding:8px 10px;border-bottom:1px solid var(--sep);padding-left:max(10px,var(--safe-left));padding-right:max(10px,var(--safe-right))}.brand{display:grid;place-items:center;width:30px;height:30px;flex:0 0 30px;border-radius:9px;background:var(--text);color:var(--surface);font-family:var(--font-display);font-size:12px;font-weight:850}.heading{min-width:0;flex:1}.heading strong{display:block;font-family:var(--font-display);font-size:12px;line-height:1.2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.heading span{display:block;margin-top:2px;font-size:9px;color:var(--text-dim);font-family:var(--font-mono);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tools{display:flex;align-items:center;gap:5px;flex-wrap:wrap;justify-content:flex-end}button,.button{appearance:none;border:1px solid var(--sep-strong);background:var(--field);color:var(--text);border-radius:9px;padding:6px 8px;min-height:30px;font:inherit;font-size:10px;font-weight:650;cursor:pointer;text-decoration:none}button:hover,.button:hover{background:var(--hover-strong)}button:focus-visible,.button:focus-visible{outline:2px solid var(--os-accent);outline-offset:2px}.primary{border-color:var(--text);background:var(--text);color:var(--surface)}.primary:hover{background:var(--text);box-shadow:0 8px 22px color-mix(in srgb,var(--text) 15%,transparent)}.open-direct{font-size:9px;color:inherit}.open-feedback{display:none}.body{min-height:0;flex:1;overflow:auto;padding:12px;padding-bottom:max(12px,var(--safe-bottom));scrollbar-gutter:stable}.home{display:grid;gap:12px}.hero{padding:14px;border:1px solid var(--sep-strong);border-radius:15px;background:linear-gradient(135deg,color-mix(in srgb,var(--os-accent) 9%,var(--surface)),var(--surface))}.hero h2{margin:0;font-family:var(--font-display);font-size:17px}.hero p{max-width:680px;margin:5px 0 0;font-size:11px;line-height:1.5;color:var(--text-dim)}.section-title{margin:2px 0 7px;font-family:var(--font-mono);font-size:10px;text-transform:uppercase;letter-spacing:.08em;color:var(--text-dim)}.grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.card{min-width:0;text-align:left;padding:11px;border:1px solid var(--sep-strong);border-radius:13px;background:var(--field)}.card:hover{background:var(--hover)}.card strong{display:block;font-family:var(--font-display);font-size:11px}.card span{display:block;margin-top:4px;font-size:9px;line-height:1.4;color:var(--text-dim)}.tag{display:inline-flex!important;width:auto!important;margin-top:8px!important;padding:2px 6px;border-radius:999px;border:1px solid var(--sep-strong);font-family:var(--font-mono);font-size:8px!important;text-transform:uppercase;letter-spacing:.06em}.stage{display:flex;min-height:330px;height:100%;flex-direction:column}.stage-head{display:flex;align-items:center;gap:8px;margin-bottom:8px}.back{flex:0 0 auto}.stage-title{min-width:0;flex:1}.stage-title strong{display:block;font-family:var(--font-display);font-size:12px}.stage-title span{display:block;margin-top:2px;font-size:9px;color:var(--text-dim)}.frame-wrap{position:relative;min-height:280px;flex:1;overflow:hidden;border:1px solid var(--sep-strong);border-radius:13px;background:var(--inset)}.frame-wrap iframe{display:block;width:100%;height:100%;min-height:360px;border:0;background:#fff}.notice{display:grid;min-height:280px;place-items:center;border:1px solid var(--sep-strong);border-radius:13px;background:var(--field);padding:24px;text-align:center}.notice>div{max-width:520px}.notice h3{margin:0;font-family:var(--font-display);font-size:14px}.notice p{margin:7px 0 0;color:var(--text-dim);font-size:10px;line-height:1.5}.notice .row{justify-content:center;margin-top:12px}.metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.metric{padding:12px;border:1px solid var(--sep-strong);border-radius:12px;background:var(--field)}.metric span{display:block;font-family:var(--font-mono);font-size:8px;text-transform:uppercase;letter-spacing:.08em;color:var(--text-dim)}.metric strong{display:block;margin-top:4px;font-family:var(--font-display);font-size:13px}.list{margin-top:8px;border:1px solid var(--sep-strong);border-radius:12px;overflow:hidden}.line{display:flex;align-items:center;gap:10px;min-height:34px;padding:7px 9px;border-top:1px solid var(--sep);font-size:10px}.line:first-child{border-top:0}.line span{color:var(--text-dim)}.line strong{margin-left:auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mono{font-family:var(--font-mono)}.loading{display:grid;min-height:240px;place-items:center;color:var(--text-dim);font-size:11px}.error{color:var(--destructive-text)}.mode-badge{padding:3px 6px;border-radius:999px;background:var(--field);font-family:var(--font-mono);font-size:8px;color:var(--text-dim)}.frame-status{display:flex;gap:8px;align-items:center;flex-wrap:wrap;padding:6px 2px 10px;font-size:10px;color:var(--text-dim)}.frame-status span{flex:1;min-width:120px}.frame-status button{min-height:34px}.stage>div:last-child{min-height:0;display:flex;flex-direction:column;flex:1}.frame-wrap[data-state="unavailable"]{border-color:var(--destructive-text)}-@media(max-width:660px){body{padding:5px}.surface{max-height:var(--host-max-h);border-radius:14px}.bar{align-items:flex-start;min-height:46px}.tools{max-width:50%}.tools button,.tools .button{padding:5px 7px}.grid{grid-template-columns:1fr 1fr}.frame-wrap iframe{min-height:430px}.metrics{grid-template-columns:1fr 1fr}.body{padding:9px}}-@media(max-width:420px){.grid{grid-template-columns:1fr}.heading span{max-width:150px}.tools .optional{display:none}.metrics{grid-template-columns:1fr}.frame-wrap iframe{min-height:480px}}+@media(max-width:660px){body{padding:5px}.surface{border-radius:14px}.bar{align-items:flex-start;min-height:46px}.tools{max-width:50%}.tools button,.tools .button{padding:5px 7px}.grid{grid-template-columns:1fr 1fr}.metrics{grid-template-columns:1fr 1fr}.body{padding:9px}}+@media(max-width:420px){.grid{grid-template-columns:1fr}.heading span{max-width:150px}.tools .optional{display:none}.metrics{grid-template-columns:1fr}}++html[data-display-mode="inline"] .surface{min-height:min(220px,var(--inline-max-h));max-height:var(--inline-max-h)}+html[data-display-mode="inline"] .body{overscroll-behavior:contain}+html[data-display-mode="inline"] .stage,html[data-display-mode="inline"] .frame-wrap,html[data-display-mode="inline"] .frame-wrap iframe{min-height:0}+html[data-display-mode="inline"] .frame-wrap iframe{height:100%}html[data-display-mode="fullscreen"],html[data-display-mode="fullscreen"] body{height:100%;width:100%;overflow:hidden}html[data-display-mode="fullscreen"] body{padding:0}html[data-display-mode="fullscreen"] .surface{height:100vh;height:100dvh;min-height:0;max-height:none;border:0;border-radius:0;box-shadow:none}diff --git a/lib/mcp/ui-surface.ts b/lib/mcp/ui-surface.tsindex b65b7ba8..bcf02ea6 100644--- a/lib/mcp/ui-surface.ts+++ b/lib/mcp/ui-surface.ts@@ -6,7 +6,7 @@ import { surfaceFrameDomains } from "./surface-catalog";import { MSO_SURFACE_SCRIPT } from "./ui-surface-script";import { MSO_SURFACE_STYLE } from "./ui-surface-style";-export const MSO_PAGE_URI = "ui://mso/page-v9.html";+export const MSO_PAGE_URI = "ui://mso/page-v10.html";const MIME = "text/html;profile=mcp-app";const html = String.raw`<main class="surface" aria-label="MSO Page">diff --git a/scripts/e2e/mcp-page.mjs b/scripts/e2e/mcp-page.mjsindex a66028bb..85254844 100644--- a/scripts/e2e/mcp-page.mjs+++ b/scripts/e2e/mcp-page.mjs@@ -28,7 +28,7 @@ try {window.addEventListener("message",event=>{const msg=event.data;if(!msg||msg.jsonrpc!=="2.0")return;calls.push(msg);const frame=document.querySelector("iframe").contentWindow;- if(msg.method==="ui/initialize"&&!${legacy})frame.postMessage({jsonrpc:"2.0",id:msg.id,result:{protocolVersion:"2026-01-26",hostCapabilities:{serverTools:{},openLinks:{}},hostContext:{displayMode:"inline"}}},"https://mso-ui.rahmanef.com");+ if(msg.method==="ui/initialize"&&!${legacy})frame.postMessage({jsonrpc:"2.0",id:msg.id,result:{protocolVersion:"2026-01-26",hostCapabilities:{serverTools:{},openLinks:{}},hostContext:{displayMode:"inline",maxHeight:800}}},"https://mso-ui.rahmanef.com");if(msg.method==="ui/notifications/initialized"){frame.postMessage({jsonrpc:"2.0",method:"ui/notifications/tool-input",params:{arguments:{route:result.route}}},"https://mso-ui.rahmanef.com");frame.postMessage({jsonrpc:"2.0",method:"ui/notifications/tool-result",params:{structuredContent:result}},"https://mso-ui.rahmanef.com");@@ -40,6 +40,13 @@ try {const component = page.frameLocator('iframe[src="https://mso-ui.rahmanef.com/qa"]');await component.locator('.frame-wrap[data-state="loading"]').waitFor();assert.equal(childLoads, 1); assertions++;+ assert.equal(await component.locator("iframe").count(), 1, "one Page document must mount exactly one reviewed app frame"); assertions++;+ if (!legacy) {+ await page.waitForTimeout(50);+ const hostHeight = await page.locator('iframe[src="https://mso-ui.rahmanef.com/qa"]').evaluate((node) => node.getBoundingClientRect().height);+ assert(hostHeight < 400, `inline Page must stay below 50% of the 800px host viewport, got ${hostHeight}`); assertions++;+ assert.equal(await component.locator("#surface-mode").textContent(), "inline"); assertions++;+ }const widget = page.frames().find((frame) => frame.url() === "https://mso-ui.rahmanef.com/qa");const game = page.frames().find((frame) => frame.url() === "https://game.rahmanef.com/embed");assert(widget && game);