From 876d3dec8c85cc5df73d560596100da73bfe5a67 Mon Sep 17 00:00:00 2001 From: "dayuan.jiang" Date: Sun, 11 Oct 2026 19:10:14 +0900 Subject: [PATCH] fix(mcp-server): the shell shows the versions once, in the side panel --- packages/mcp-server/shell/canvas-shell.tsx | 23 ++++++++------------- packages/mcp-server/tests/e2e/shell.spec.ts | 1 - 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/packages/mcp-server/shell/canvas-shell.tsx b/packages/mcp-server/shell/canvas-shell.tsx index e602960d..d063fc87 100644 --- a/packages/mcp-server/shell/canvas-shell.tsx +++ b/packages/mcp-server/shell/canvas-shell.tsx @@ -2,7 +2,6 @@ import { Download, History, Moon, Sun } from "lucide-react" import { useMemo, useState } from "react" import { CanvasStage } from "@/components/canvas/canvas-stage" import { CompareDialog } from "@/components/canvas/compare-dialog" -import { VersionStrip } from "@/components/canvas/version-strip" import { VersionsProvider } from "@/components/canvas/versions-context" import { type ExportFormat, SaveDialog } from "@/components/save-dialog" import { AppToaster } from "@/components/workspace/app-toaster" @@ -22,9 +21,10 @@ const iconButton = /** * The MCP preview: the web app's canvas without the chat. A slim bar names - * the session and the sync state; the versions strip, the version cards - * (from the server's History), Compare and the export dialog come from the - * shared canvas components. + * the session and the sync state; the version cards (from the server's + * History), Compare and the export dialog come from the shared canvas + * components. The cards sit in a side panel, so the web app's versions strip + * above the canvas is left out: it would show the same list twice. */ export function CanvasShell({ config }: { config: ShellConfig }) { const dict = useDictionary() @@ -135,16 +135,11 @@ export function CanvasShell({ config }: { config: ShellConfig }) {
-
- {/* With the cards open, one version alone adds - nothing to its card */} - -
- -
+
+
{showPanel && ( diff --git a/packages/mcp-server/tests/e2e/shell.spec.ts b/packages/mcp-server/tests/e2e/shell.spec.ts index d6234726..8eaf793c 100644 --- a/packages/mcp-server/tests/e2e/shell.spec.ts +++ b/packages/mcp-server/tests/e2e/shell.spec.ts @@ -468,7 +468,6 @@ test("the version cards follow the server's History; undo, redo and restore go t await expect(latestCard.getByTestId("version-undo")).toHaveText( /Undo change/, ) - await expect(page.getByTestId("version-thumb")).toHaveCount(3) // Undo: the server restores the version before; the card says so await latestCard.getByTestId("version-undo").click()