From 98cf32b6e25b59f3a784272b01ab7073931e31c2 Mon Sep 17 00:00:00 2001 From: "xiaohan.yuan" Date: Sun, 18 Oct 2026 18:36:43 +0800 Subject: [PATCH] test(ui): restore offline renderer verification bridge Add the startup API stubs required by the current renderer tree so home, conversation fixtures, and settings panels mount in the offline harness. --- scripts/verify-ui.mjs | 132 ++++++++++++++++++++++++++++++++---------- 1 file changed, 103 insertions(+), 29 deletions(-) diff --git a/scripts/verify-ui.mjs b/scripts/verify-ui.mjs index 68fa2c8..170a469 100644 --- a/scripts/verify-ui.mjs +++ b/scripts/verify-ui.mjs @@ -34,38 +34,112 @@ const MIME = { '.ttf': 'font/ttf' } -// 假桥:只提供渲染进程首屏需要的调用,其余返回空/默认值 +/** + * 假桥:只提供渲染进程首屏挂载需要的调用,其余返回空数组/空对象/undefined。 + * + * 形状对齐 src/preload/index.ts 暴露的 window.ycode;主窗口(index.html)与设置窗口 + * (settings.html / index.html?window=settings)共用同一份假桥。命名空间清单来自启动路径: + * App.tsx、stores/chat.ts、stores/settings.ts、ChatPane.tsx、Sidebar.tsx、 + * SettingsDialog.tsx、settings.tsx、TitleBar.tsx、GeneralSettingsPanel.tsx、 + * useComposerConnectors.ts、ComposerContextInfo.tsx。 + */ const STUB = `` const server = createServer(async (req, res) => {