From dc5a5a4a62e019db0e0634f6d17f933cf85e4f4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BE=B7=E5=AE=87?= Date: Thu, 24 Sep 2026 14:21:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=90=88=E5=B9=B6=E5=90=8E?= =?UTF-8?q?=20CI=20=E5=A4=B1=E8=B4=A5=EF=BC=9A=E9=80=80=E5=BD=B9=E5=91=BD?= =?UTF-8?q?=E4=BB=A4=E7=9A=84=E6=AE=8B=E7=95=99=E6=B8=85=E5=8D=95=E4=B8=8E?= =?UTF-8?q?=E7=94=A8=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - scripts/check-config.mjs 的 native-only 白名单删除已退役的 bind_components 与 create_ui_design_resource,两端原生能力检查重新自洽 - appSurface 的 UI 原型入口用例改断言 create_ui_design_doc_from_images,并按新契约补齐 relativePath / imageIds 返回形状 - 验证:npm run typecheck(含 skill-pack 与 check-config)、npx vitest run tests/appSurface.test.ts(211 passed / 9 skipped) --- apps/ai-game-creator-shell/scripts/check-config.mjs | 3 --- .../tests/appSurface/project-development.suite.ts | 11 ++++++----- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/apps/ai-game-creator-shell/scripts/check-config.mjs b/apps/ai-game-creator-shell/scripts/check-config.mjs index b22a44081..3c3c4c35a 100644 --- a/apps/ai-game-creator-shell/scripts/check-config.mjs +++ b/apps/ai-game-creator-shell/scripts/check-config.mjs @@ -157,11 +157,8 @@ const allowedUncalledTauriCommands = [ 'set_active_game_creator_agent_session', 'start_game_creator_agent_goal', 'start_game_creator_supervisor_runtime_task', - // TODO: Remove the retired binding command after the legacy runtime path is removed. - 'bind_components', 'chat_with_game_creator_agent', 'check_ui_editor_font_glyph_coverage', - 'create_ui_design_resource', // 图片类生成的同步变体:GUI 已改为 `start_local_project_asset_generation` + 项目内任务账本 // (提交即返回、后台生成)。这条命令**没有生产调用方**,只有 Rust 集成测试 // (`src/tests/project.rs`)与 `commands.rs` 单测在调;待后续批次删除,或改为转调 diff --git a/apps/ai-game-creator-shell/tests/appSurface/project-development.suite.ts b/apps/ai-game-creator-shell/tests/appSurface/project-development.suite.ts index c5cafa048..36a202eda 100644 --- a/apps/ai-game-creator-shell/tests/appSurface/project-development.suite.ts +++ b/apps/ai-game-creator-shell/tests/appSurface/project-development.suite.ts @@ -6534,7 +6534,7 @@ export function registerProjectWorkbenchFoundationTests() { ).not.toBeNull(); }); - it('opens the UI editor bridge from a canonical ui-design prototype image', async () => { + it('opens the UI editor by creating a design doc from a canonical ui-design prototype image', async () => { installResizeObserverStub(); const manifest = createGameCreationAppManifest( 'workbench-ui-prototype-entry', @@ -6577,7 +6577,7 @@ export function registerProjectWorkbenchFoundationTests() { }, }; } - if (command === 'ensure_ui_design_resource_for_prototype') { + if (command === 'create_ui_design_doc_from_images') { // 必须返回真实形状的成功结果:返回 `null` 会让 `result.manifest.projectId` // 抛 TypeError 并被组件吞进错误分支,用例就永远测不到它名字里的成功路径。 return { @@ -6601,8 +6601,9 @@ export function registerProjectWorkbenchFoundationTests() { }, ], }, + relativePath: 'ui/UI 设计 1.json', + imageIds: ['ui-prototype-asset'], committedProjectRevision: 1, - created: true, }; } throw new Error(`unexpected invoke ${command}`); @@ -6629,10 +6630,10 @@ export function registerProjectWorkbenchFoundationTests() { ); fireEvent.click(await screen.findByRole('button', { name: 'UI 编辑器' })); expect(invoke).toHaveBeenCalledWith( - 'ensure_ui_design_resource_for_prototype', + 'create_ui_design_doc_from_images', expect.objectContaining({ input: expect.objectContaining({ - prototypeAssetId: 'ui-prototype-asset', + images: [{ assetId: 'ui-prototype-asset' }], }), }), );