fix(mcp-server): review fixes for the preview URL and the theme menu

The stalled-tab note names the page start_session opened (the shell
with DRAWIO_PREVIEW_UI=shell) instead of the classic page. With the
shell not built, start_session opens the classic page and the server
says so at startup, as it does for a missing dist/drawio. BROWSER=none
skips the system browser, as Vite and CRA dev servers do: the e2e tests
set it. Without a fixed DRAWIO_UI, the shell's draw.io URL carries
themes=1 so Extras > Theme is offered, as on the classic page.
This commit is contained in:
dayuan.jiang
2026-10-11 20:56:07 +09:00
parent b6bd032c2c
commit 3ef14318f9
6 changed files with 45 additions and 4 deletions
+3
View File
@@ -47,7 +47,10 @@ export function getDrawioSrc(source: DrawioSource, dark: boolean): string {
proto: "json",
configure: "1",
}
// Without a fixed theme, embedded draw.io shows Extras > Theme only
// with themes=1 (its isThemeMenuVisible)
if (source.ui) params.ui = source.ui
else params.themes = "1"
Object.assign(params, {
spin: "0",
libraries: "0",