From b6eaf45c3810816ed02a926c0e53a2a83b3796af Mon Sep 17 00:00:00 2001 From: Hayden <154503486+groupthinking@users.noreply.github.com> Date: Wed, 18 Nov 2026 12:45:04 -0600 Subject: [PATCH 1/2] feat(studio): wire Webflow floating rail, active extraction chat state, and native WebMCP tools --- apps/web/src/components/Nav.tsx | 28 +- apps/web/src/components/OneLoopStudio.tsx | 181 +++++++---- .../__tests__/Nav.template.test.tsx | 18 ++ .../__tests__/StudioIdeChat.plan.test.tsx | 9 + .../web/src/components/home/HomePasteForm.tsx | 8 +- .../src/components/studio/StudioIdeChat.tsx | 19 +- .../lib/__tests__/webmcp-studio-tools.test.ts | 107 +++++++ apps/web/src/lib/webmcp-studio-tools.ts | 283 ++++++++++++++++++ apps/web/src/styles/studio-workbench.css | 15 +- apps/web/src/styles/theme-tokens.css | 113 ++++++- apps/web/webmcp.d.ts | 10 + commit_message.txt | 6 - 12 files changed, 716 insertions(+), 81 deletions(-) create mode 100644 apps/web/src/lib/__tests__/webmcp-studio-tools.test.ts create mode 100644 apps/web/src/lib/webmcp-studio-tools.ts create mode 100644 apps/web/webmcp.d.ts delete mode 100644 commit_message.txt diff --git a/apps/web/src/components/Nav.tsx b/apps/web/src/components/Nav.tsx index bcc680797..e4ee6e447 100644 --- a/apps/web/src/components/Nav.tsx +++ b/apps/web/src/components/Nav.tsx @@ -25,6 +25,8 @@ interface NavProps { fixed?: boolean; /** 'topbar' (default) or the Webflow floating 'rail'. */ variant?: 'topbar' | 'rail'; + /** Collapse the floating rail to its 56px icon dock initially. */ + defaultCollapsed?: boolean; } const NAV_LINKS = [ @@ -138,8 +140,9 @@ function RailNav({ pathname, rightSlot, subtitle, -}: Pick & { pathname: string }) { - const [collapsed, setCollapsed] = useState(false); + defaultCollapsed = false, +}: Pick & { pathname: string }) { + const [collapsed, setCollapsed] = useState(defaultCollapsed); useEffect(() => { const onKeyDown = (event: KeyboardEvent) => { @@ -159,11 +162,11 @@ function RailNav({ aria-label="Primary" >
- + - UVAI + UVAI
-
    - {( - [ - { id: 'pack', label: 'Pack' }, - { id: 'captions', label: 'Captions' }, - { id: 'transcript', label: 'Transcript' }, - { id: 'events', label: 'Events' }, - { id: 'ready', label: 'Ready' }, - ] as const - ).map((step, idx) => { - const activeIdx = - transcriptStage.id === 'ready' - ? 4 - : transcriptStage.id === 'events' - ? 3 - : transcriptStage.id === 'transcript' - ? 2 - : transcriptStage.id === 'captions' - ? 1 - : 0; - const isDone = - !transcriptWorking && - selected?.status !== 'failed' && - Boolean(selected?.videoPack || selected?.transcript?.trim()); - const isFailed = selected?.status === 'failed'; - const stepState = isDone - ? 'done' - : isFailed - ? idx < activeIdx - ? 'done' - : idx === activeIdx - ? 'failed' - : 'idle' - : transcriptWorking +
    +
      + {( + [ + { id: 'pack', label: 'Pack' }, + { id: 'captions', label: 'Captions' }, + { id: 'transcript', label: 'Transcript' }, + { id: 'events', label: 'Events' }, + { id: 'ready', label: 'Ready' }, + ] as const + ).map((step, idx) => { + const activeIdx = + transcriptStage.id === 'ready' + ? 4 + : transcriptStage.id === 'events' + ? 3 + : transcriptStage.id === 'transcript' + ? 2 + : transcriptStage.id === 'captions' + ? 1 + : 0; + const isDone = + !transcriptWorking && + selected?.status !== 'failed' && + Boolean(selected?.videoPack || selected?.transcript?.trim()); + const isFailed = selected?.status === 'failed'; + const stepState = isDone + ? 'done' + : isFailed ? idx < activeIdx ? 'done' : idx === activeIdx - ? 'active' + ? 'failed' : 'idle' - : 'idle'; - return ( -
    1. - {step.label} -
    2. - ); - })} -
    + : transcriptWorking + ? idx < activeIdx + ? 'done' + : idx === activeIdx + ? 'active' + : 'idle' + : 'idle'; + return ( +
  1. + {step.label} +
  2. + ); + })} +
+ {videoId ? ( + + YouTube ↗ + + ) : null} +
{selected?.videoPack ? (
@@ -1255,9 +1334,9 @@ export default function OneLoopStudio({ } chatPane={ } outputPane={ diff --git a/apps/web/src/components/__tests__/Nav.template.test.tsx b/apps/web/src/components/__tests__/Nav.template.test.tsx index d05aaef2e..326fd7194 100644 --- a/apps/web/src/components/__tests__/Nav.template.test.tsx +++ b/apps/web/src/components/__tests__/Nav.template.test.tsx @@ -84,4 +84,22 @@ describe('Nav template routing semantics', () => { expect(document.documentElement.dataset.contrast).toBe('normal'); expect(contrast.getAttribute('aria-pressed')).toBe('false'); }); + + it('supports Webflow floating rail defaultCollapsed with visible brand mark and ⌘/ toggle', () => { + usePathnameMock.mockReturnValue('/studio'); + render(