From a81520799a0d5e549464273a29908a80c08b62f1 Mon Sep 17 00:00:00 2001 From: Linghong Date: Mon, 31 Aug 2026 12:56:07 +0000 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E6=97=A7=E8=81=8A=E5=A4=A9?= =?UTF-8?q?=E9=9D=A2=E6=9D=BF=E7=AD=96=E5=88=92=E6=8C=82=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 删除 ProjectWorkspaceChatPane 中重复的 GDD 与 planning runtime JSX 清理旧 Pane 的策划 props 和 App 传递 将策划界面测试迁移到正式 supervisor-only 挂载路径 --- apps/ai-game-creator-shell/src/App.tsx | 14 ---- .../ProjectWorkspaceChatPane.tsx | 68 ++++--------------- .../tests/appSurface/plan-gdd.suite.ts | 22 ++++-- 3 files changed, 28 insertions(+), 76 deletions(-) diff --git a/apps/ai-game-creator-shell/src/App.tsx b/apps/ai-game-creator-shell/src/App.tsx index be8168f4e..f923269b7 100644 --- a/apps/ai-game-creator-shell/src/App.tsx +++ b/apps/ai-game-creator-shell/src/App.tsx @@ -11037,20 +11037,6 @@ export function App({ projectSupervisorRuntime={projectSupervisorRuntime} projectSupervisorRuntimeError={projectSupervisorRuntimeError} projectSupervisorTransientReply={projectSupervisorTransientReply} - planGddState={planGddState} - planGddHydrateBusy={planGddHydrateBusy} - planGddDecisionBusy={planGddDecisionBusy} - planGddError={planGddError} - onPlanGddRefresh={() => void hydratePlanGddState()} - onPlanGddDecision={decidePlanGdd} - onMakeGameFromApprovedGdd={ - onMakeGameFromApprovedGdd - ? () => - onMakeGameFromApprovedGdd( - localProject?.projectPath ?? projectPath, - ) - : undefined - } queueAgentRunControlFromPanel={queueAgentRunControlFromPanel} queueOrExecuteProjectIndex={queueOrExecuteProjectIndex} queuePendingCommand={queuePendingCommand} diff --git a/apps/ai-game-creator-shell/src/features/project-workspace/ProjectWorkspaceChatPane.tsx b/apps/ai-game-creator-shell/src/features/project-workspace/ProjectWorkspaceChatPane.tsx index 126e08dc3..f70d648c7 100644 --- a/apps/ai-game-creator-shell/src/features/project-workspace/ProjectWorkspaceChatPane.tsx +++ b/apps/ai-game-creator-shell/src/features/project-workspace/ProjectWorkspaceChatPane.tsx @@ -25,8 +25,6 @@ import type { MemoryScope, PendingCommand, PendingUiConfirmation, - PlanGddDecisionAction, - PlanGddStateViewV1, } from '../../app/types'; import type { ProjectAgentResultSummary } from '../../view/project-development'; import { @@ -47,13 +45,10 @@ import { taskGroupLabels, taskStatusLabels, } from '../project-summary/projectSummary'; -import { PlanGddSurface } from './GddApprovalCard'; import { pendingCommandDetail, pendingCommandTitle, } from './pendingCommandPresentation'; -import { isPlanningLaneRuntime } from './planningLane'; -import { PlanningLaneRuntimeStrip } from './PlanningLaneRuntimeStrip'; import { resolvePendingCommandProjectPath } from './projectCommandPolicy'; type ProjectWorkspaceChatPaneProps = { @@ -180,16 +175,6 @@ type ProjectWorkspaceChatPaneProps = { projectSupervisorRuntime: AgentRuntimeState | null; projectSupervisorRuntimeError: string; projectSupervisorTransientReply: string; - planGddState: PlanGddStateViewV1 | null; - planGddHydrateBusy: boolean; - planGddDecisionBusy: boolean; - planGddError: string | null; - onPlanGddRefresh: () => void; - onPlanGddDecision: ( - action: PlanGddDecisionAction, - comment: string | null, - ) => Promise; - onMakeGameFromApprovedGdd?: () => Promise; queueAgentRunControlFromPanel: (action: 'kill' | 'retry' | 'resume') => void; queueOrExecuteProjectIndex: () => Promise; queuePendingCommand: (command: PendingCommand) => void; @@ -273,13 +258,6 @@ export function ProjectWorkspaceChatPane({ projectSupervisorRuntime, projectSupervisorRuntimeError, projectSupervisorTransientReply, - planGddState, - planGddHydrateBusy, - planGddDecisionBusy, - planGddError, - onPlanGddRefresh, - onPlanGddDecision, - onMakeGameFromApprovedGdd, queueAgentRunControlFromPanel, queueOrExecuteProjectIndex, queuePendingCommand, @@ -369,17 +347,6 @@ export function ProjectWorkspaceChatPane({ -
- {isPlanningLaneRuntime(projectSupervisorRuntime) ? ( - - ) : ( - - )} + {pendingCommand ? (
diff --git a/apps/ai-game-creator-shell/tests/appSurface/plan-gdd.suite.ts b/apps/ai-game-creator-shell/tests/appSurface/plan-gdd.suite.ts index 1960bd5cd..a26c135a9 100644 --- a/apps/ai-game-creator-shell/tests/appSurface/plan-gdd.suite.ts +++ b/apps/ai-game-creator-shell/tests/appSurface/plan-gdd.suite.ts @@ -4,21 +4,33 @@ import { resolve } from 'node:path'; import { PlanGddStageProgress } from '../../src/features/project-workspace/GddApprovalCard'; import { agentRuntimeUserInputRequest, + App, createPlanGddStateView, createProjectSupervisorRuntimeHarness, expect, fireEvent, it, - openMainProject, React, render, - renderAppAt, screen, vi, waitFor, within, } from './harness'; +function mountFormalSupervisor( + harness: ReturnType, +) { + window.history.pushState({}, '', '/'); + render( + React.createElement(App, { + initialProjectPath: harness.projectPath, + orchestrationMode: 'single-supervisor', + projectSupervisorOnly: true, + }), + ); +} + async function mountApprovalCard( harness: ReturnType, ) { @@ -26,8 +38,7 @@ async function mountApprovalCard( core: { invoke: harness.invoke }, event: { listen: harness.listen }, }; - renderAppAt('/'); - await openMainProject(harness.projectPath); + mountFormalSupervisor(harness); return await screen.findByLabelText('GDD 审批卡'); } @@ -38,8 +49,7 @@ async function mountPlanningSurface( core: { invoke: harness.invoke }, event: { listen: harness.listen }, }; - renderAppAt('/'); - await openMainProject(harness.projectPath); + mountFormalSupervisor(harness); return await screen.findByLabelText('立项策划阶段进度'); }