diff --git a/apps/ai-game-creator-shell/src/App.tsx b/apps/ai-game-creator-shell/src/App.tsx index 41525a5ec..ec6e662c2 100644 --- a/apps/ai-game-creator-shell/src/App.tsx +++ b/apps/ai-game-creator-shell/src/App.tsx @@ -105,6 +105,9 @@ import { createDefaultChatMessages, createLocalConversationDraftMessage, ensureProjectSupervisorActiveSessionId, + type GameChatPlayableRevision, + gameChatRuntimeBelongsToLineage, + gameChatRuntimeIdentity, isAgentFinalizationMessageId, isAgentRuntimeTerminalState, isGameChatSupervisorRoot, @@ -117,8 +120,6 @@ import { mergeProjectSupervisorConversation, mergeProjectSupervisorResponseStream, normalizeAgentRuntimeState, - gameChatRuntimeBelongsToLineage, - gameChatRuntimeIdentity, projectCurrentGameChatRuntimeLineage, projectNameFromPath, projectProfessionalAgentLabel, @@ -128,7 +129,6 @@ import { sameAgentRuntimeRun, submitProjectSupervisorRuntimeTask, taskRowsFromManifest, - type GameChatPlayableRevision, } from './features/agent-runtime'; import { isDeveloperMode, @@ -1535,6 +1535,10 @@ export function App({ disposed = true; cleanup?.(); }; + // The subscription deliberately invokes the current render's helper; its + // mutable state is read through refs, so resubscribing for that helper is + // neither necessary nor safe. + // eslint-disable-next-line react-hooks/exhaustive-deps }, [ appendGameChatFinalReplyMessages, gameChatOnly, diff --git a/apps/ai-game-creator-shell/src/features/agent-runtime/panels.tsx b/apps/ai-game-creator-shell/src/features/agent-runtime/panels.tsx index 6debc8b91..8b65dca34 100644 --- a/apps/ai-game-creator-shell/src/features/agent-runtime/panels.tsx +++ b/apps/ai-game-creator-shell/src/features/agent-runtime/panels.tsx @@ -16,6 +16,11 @@ import type { AgentRuntimeUserInputRequest, } from '../../app/types'; import type { ProjectAgentResultSummary } from '../../view/project-development'; +import { + gameChatRuntimeClaimsDynamicArtLineage, + isCurrentGameChatDynamicArtRuntime, + projectCurrentGameChatRuntimeLineage, +} from './gameChatRuntimeProjection'; import { agentGoalStatusIsPaused, agentGoalStatusIsTerminal, @@ -46,11 +51,6 @@ import { projectSupervisorPendingActionPresentation, projectSupervisorRuntimeStatusLabel, } from './model'; -import { - gameChatRuntimeClaimsDynamicArtLineage, - isCurrentGameChatDynamicArtRuntime, - projectCurrentGameChatRuntimeLineage, -} from './gameChatRuntimeProjection'; export function AgentGoalStatusPanel({ goal, diff --git a/apps/ai-game-creator-shell/tests/agentRuntimeModel.test.ts b/apps/ai-game-creator-shell/tests/agentRuntimeModel.test.ts index 1ce9a0cf5..97532d4bc 100644 --- a/apps/ai-game-creator-shell/tests/agentRuntimeModel.test.ts +++ b/apps/ai-game-creator-shell/tests/agentRuntimeModel.test.ts @@ -1,7 +1,6 @@ import { describe, expect, test, vi } from 'vitest'; import { createGameCreationAppManifest } from '../../../packages/shared/src/contracts/gameCreationApp'; - import type { AgentRuntimeEventRecord, AgentRuntimeResponseStream, @@ -10,6 +9,13 @@ import type { ChatMessage, LocalConversationMessageRecord, } from '../src/app/types'; +import { + canArchiveGameChatStage, + gameChatRuntimeClaimsDynamicArtLineage, + latestGameChatPlayableRevision, + projectCurrentGameChatRuntimeLineage, + projectGameChatPrimaryProgress, +} from '../src/features/agent-runtime/gameChatRuntimeProjection'; import { formatAgentRuntimeEvent, mergeGameChatRuntimeResponseMessagesIntoHistory, @@ -23,13 +29,6 @@ import { projectSupervisorVisibleConversationText, submitProjectSupervisorRuntimeTask, } from '../src/features/agent-runtime/model'; -import { - canArchiveGameChatStage, - gameChatRuntimeClaimsDynamicArtLineage, - latestGameChatPlayableRevision, - projectCurrentGameChatRuntimeLineage, - projectGameChatPrimaryProgress, -} from '../src/features/agent-runtime/gameChatRuntimeProjection'; import { projectAgentRuntimeSummaries } from '../src/features/project-summary/agentPresentation'; describe('Runtime-owned public statuses', () => { 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 1d32692f2..8dafcc9aa 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 @@ -8,11 +8,11 @@ import type { AgentRuntimeState, } from '../../src/app/types'; import { + AgentRuntimeStatusPanel, latestGameChatPlayableRevision as projectLatestGameChatPlayableRevision, MUD_POINT_INSUFFICIENT_INTERRUPTION_MESSAGE, - AgentRuntimeStatusPanel, - ProjectSupervisorRuntimePanel, projectCurrentGameChatRuntimeLineage, + ProjectSupervisorRuntimePanel, } from '../../src/features/agent-runtime'; import { buildGameChatProgressEvidence,