From 88cb8f4db89ccfc6c4cfb07897c09a4c7a5bbc72 Mon Sep 17 00:00:00 2001 From: Erick Wendel Date: Sat, 29 Aug 2026 18:03:09 +0200 Subject: [PATCH 01/13] chore(webmcp): set playground PPTX example --- apps/editor/src/ui/webmcp/webMcpShowcaseSteps.ts | 4 +++- tests/e2e/webmcp/discover-tools.spec.ts | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/apps/editor/src/ui/webmcp/webMcpShowcaseSteps.ts b/apps/editor/src/ui/webmcp/webMcpShowcaseSteps.ts index ec256a07..5a82f6e8 100644 --- a/apps/editor/src/ui/webmcp/webMcpShowcaseSteps.ts +++ b/apps/editor/src/ui/webmcp/webMcpShowcaseSteps.ts @@ -20,7 +20,9 @@ export const webMcpShowcaseSteps: WebMcpShowcaseStep[] = [ { label: 'Import PowerPoint from URL', toolName: 'import_powerpoint_from_url', - input: { url: 'http://localhost:8000/presentation.pptx' }, + input: { + url: 'https://localstudio.erickwendel.com.br/localstudio/public/web-ai-beyond-chat-renderatl-14082026%20%282%29.pptx', + }, }, { label: 'Translate deck and notes', diff --git a/tests/e2e/webmcp/discover-tools.spec.ts b/tests/e2e/webmcp/discover-tools.spec.ts index 63f3a8b0..adcf9818 100644 --- a/tests/e2e/webmcp/discover-tools.spec.ts +++ b/tests/e2e/webmcp/discover-tools.spec.ts @@ -54,6 +54,10 @@ test.describe('WebMCP discover tools journey', () => { for (const [, label] of showcaseCards) { await expect(workflow.getByRole('button', { name: label })).toBeVisible(); } + await page.getByRole('button', { name: 'Import PowerPoint from URL' }).click(); + await expect(page.getByLabel('Import PowerPoint from URL command input')).toHaveValue( + /https:\/\/localstudio\.erickwendel\.com\.br\/localstudio\/public\/web-ai-beyond-chat-renderatl-14082026%20%282%29\.pptx/, + ); await page.getByRole('button', { name: 'Create presentation' }).click(); await expect(page.getByLabel('Create presentation command input')).toBeVisible(); await page.getByLabel('Create presentation command input').fill('E2E WebMCP project'); From ba138663d92347f64b8c798b5c0f9016acab556f Mon Sep 17 00:00:00 2001 From: Erick Wendel Date: Sat, 29 Aug 2026 18:20:56 +0200 Subject: [PATCH 02/13] fix(webmcp): group playground actions --- apps/editor/src/ui/styles/webmcp-results.css | 6 +- apps/editor/src/ui/styles/webmcp-workflow.css | 62 +++- apps/editor/src/ui/styles/webmcp.css | 11 +- .../src/ui/webmcp/WebMcpShowcasePage.tsx | 146 ++++++---- .../src/ui/webmcp/webMcpShowcaseSteps.ts | 265 +++++++++++------- apps/editor/tests/unit/app/App.test.tsx | 3 +- tests/e2e/webmcp/discover-tools.spec.ts | 43 +++ 7 files changed, 351 insertions(+), 185 deletions(-) diff --git a/apps/editor/src/ui/styles/webmcp-results.css b/apps/editor/src/ui/styles/webmcp-results.css index e127d6f8..6e04a155 100644 --- a/apps/editor/src/ui/styles/webmcp-results.css +++ b/apps/editor/src/ui/styles/webmcp-results.css @@ -33,16 +33,20 @@ } .webmcp-editor-frame { + height: 100vh; + height: 100dvh; min-width: 0; - min-height: 100vh; + min-height: 0; padding: 18px; background: linear-gradient(135deg, rgba(159, 255, 210, 0.08), transparent 30%), rgba(3, 5, 6, 0.88); + overflow: hidden; } .webmcp-editor-frame iframe { width: 100%; height: calc(100vh - 36px); + height: calc(100dvh - 36px); display: block; border: 1px solid rgba(159, 255, 210, 0.2); border-radius: 8px; diff --git a/apps/editor/src/ui/styles/webmcp-workflow.css b/apps/editor/src/ui/styles/webmcp-workflow.css index a44efdc4..c8bd6c68 100644 --- a/apps/editor/src/ui/styles/webmcp-workflow.css +++ b/apps/editor/src/ui/styles/webmcp-workflow.css @@ -1,4 +1,54 @@ .webmcp-workflow { + display: grid; + gap: 18px; +} + +.webmcp-workflow-section { + display: grid; + gap: 10px; +} + +.webmcp-workflow-section-heading { + display: flex; + align-items: flex-start; + justify-content: space-between; + gap: 14px; + padding-bottom: 9px; + border-bottom: 1px solid rgba(100, 183, 255, 0.18); +} + +.webmcp-workflow-section-heading h2 { + margin: 0; + color: #ffffff; + font-family: 'Orbitron', sans-serif; + font-size: 13px; + font-weight: 800; + letter-spacing: 0.04em; + line-height: 18px; +} + +.webmcp-workflow-section-heading p { + margin: 4px 0 0; + color: rgba(238, 250, 245, 0.56); + font-size: 11px; + line-height: 16px; +} + +.webmcp-workflow-section-heading > span { + min-width: 24px; + height: 20px; + display: inline-grid; + place-items: center; + border: 1px solid rgba(100, 183, 255, 0.22); + border-radius: 999px; + background: rgba(100, 183, 255, 0.09); + color: #bfe5ff; + font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; + font-size: 10px; + font-weight: 800; +} + +.webmcp-workflow-section-tools { display: grid; gap: 9px; } @@ -31,18 +81,6 @@ box-shadow: 0 0 0 2px rgba(159, 255, 210, 0.14); } -.webmcp-step-index { - width: 22px; - height: 22px; - display: inline-grid; - place-items: center; - border-radius: 4px; - background: rgba(100, 183, 255, 0.16); - color: #bfe5ff; - font-size: 11px; - font-weight: 900; -} - .webmcp-step-command { display: grid; grid-template-columns: minmax(0, 1fr) 38px; diff --git a/apps/editor/src/ui/styles/webmcp.css b/apps/editor/src/ui/styles/webmcp.css index f7e483d1..f6c34087 100644 --- a/apps/editor/src/ui/styles/webmcp.css +++ b/apps/editor/src/ui/styles/webmcp.css @@ -1,14 +1,19 @@ .webmcp-page { - min-height: 100vh; + height: 100vh; + height: 100dvh; + min-height: 0; display: grid; grid-template-columns: minmax(380px, 520px) minmax(720px, 1fr); background: linear-gradient(90deg, rgba(46, 167, 255, 0.14), transparent 42%), linear-gradient(180deg, rgba(55, 253, 118, 0.08), transparent 36%), #05090a; color: #eefaf5; + overflow: hidden; } .webmcp-control-plane { + max-height: 100vh; + max-height: 100dvh; display: flex; flex-direction: column; gap: 22px; @@ -16,6 +21,10 @@ padding: 28px; border-right: 1px solid rgba(122, 255, 199, 0.18); background: rgba(5, 12, 13, 0.9); + overflow-x: hidden; + overflow-y: auto; + overscroll-behavior: contain; + scrollbar-gutter: stable; } .webmcp-brand-row { diff --git a/apps/editor/src/ui/webmcp/WebMcpShowcasePage.tsx b/apps/editor/src/ui/webmcp/WebMcpShowcasePage.tsx index 157ea930..9e39671b 100644 --- a/apps/editor/src/ui/webmcp/WebMcpShowcasePage.tsx +++ b/apps/editor/src/ui/webmcp/WebMcpShowcasePage.tsx @@ -1,6 +1,8 @@ import { Bot, FileJson, Play, Radar, SendHorizontal } from 'lucide-react'; import { useMemo, useRef, useState } from 'react'; -import { type WebMcpShowcaseStep, webMcpShowcaseSteps } from './webMcpShowcaseSteps'; +import { type WebMcpShowcaseStep, webMcpShowcaseSections } from './webMcpShowcaseSteps'; + +const webMcpShowcaseSteps = webMcpShowcaseSections.flatMap((section) => section.steps); interface WebMcpToolLike { call?: (input: Record) => unknown; @@ -256,69 +258,89 @@ export function WebMcpShowcasePage() {
- {webMcpShowcaseSteps.map((step, index) => ( -
- - {activeStepName === step.toolName ? ( -
{ - event.preventDefault(); - void runStep(step, commandValues[step.toolName] ?? ''); - }} - > - {step.inputKind === 'name' ? ( - { - setCommandValues((current) => ({ - ...current, - [step.toolName]: event.target.value, - })); + {webMcpShowcaseSections.map((section) => ( +
+
+
+

{section.title}

+

{section.description}

+
+ {section.steps.length} +
+
+ {section.steps.map((step) => ( +
+