diff --git a/apps/ai-game-creator-shell/src-tauri/src/tests/runtime_state.rs b/apps/ai-game-creator-shell/src-tauri/src/tests/runtime_state.rs index d718069e1..4de7b020d 100644 --- a/apps/ai-game-creator-shell/src-tauri/src/tests/runtime_state.rs +++ b/apps/ai-game-creator-shell/src-tauri/src/tests/runtime_state.rs @@ -3008,11 +3008,23 @@ async fn background_task_recovers_when_assistant_message_cannot_persist() { .messages .iter() .all(|message| message.role != "assistant")); - let agent_db = fs::read_to_string(root.join(".agent/agent.db")).expect("agent db"); - let audit_records = agent_db - .lines() - .filter_map(|line| serde_json::from_str::(line).ok()) - .collect::>(); + let mut audit_records = Vec::new(); + for _ in 0..100 { + let agent_db = fs::read_to_string(root.join(".agent/agent.db")).expect("agent db"); + audit_records = agent_db + .lines() + .filter_map(|line| serde_json::from_str::(line).ok()) + .collect::>(); + if audit_records.iter().any(|record| { + record.get("recordType").and_then(Value::as_str) + == Some("agent.runtime.background_task.finalization_pending") + && record.get("runId").and_then(Value::as_str) + == Some("assistant-conversation-write-failure-run") + }) { + break; + } + std::thread::sleep(Duration::from_millis(20)); + } assert!(audit_records.iter().any(|record| { record.get("recordType").and_then(Value::as_str) == Some("agent.runtime.background_task.finalization_pending") diff --git a/apps/ai-game-creator-shell/tests/appSurface/home.suite.ts b/apps/ai-game-creator-shell/tests/appSurface/home.suite.ts index 55307ddb4..694c94b02 100644 --- a/apps/ai-game-creator-shell/tests/appSurface/home.suite.ts +++ b/apps/ai-game-creator-shell/tests/appSurface/home.suite.ts @@ -1,3 +1,5 @@ +import type { ProjectSupervisorComponentProps } from '../../src/features/app-shell/model'; +import { WorkspaceLauncherShell } from '../../src/features/app-shell/WorkspaceLauncher'; import { act, cleanup, @@ -20,8 +22,6 @@ import { waitFor, within, } from './harness'; -import { WorkspaceLauncherShell } from '../../src/features/app-shell/WorkspaceLauncher'; -import type { ProjectSupervisorComponentProps } from '../../src/features/app-shell/model'; export function registerClientHomeTests() { it('projects Supervisor manifest updates into the open workbench without reopening the project', async () => { diff --git a/src/components/image-editor/ImageCanvasEditorView.test.tsx b/src/components/image-editor/ImageCanvasEditorView.test.tsx index 862c527b3..4a0f3d842 100644 --- a/src/components/image-editor/ImageCanvasEditorView.test.tsx +++ b/src/components/image-editor/ImageCanvasEditorView.test.tsx @@ -12,7 +12,6 @@ import userEvent from '@testing-library/user-event'; import JSZip from 'jszip'; import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; -import type { EditorProjectResourceSnapshot } from '../../services/image-editor/editorProjectClient'; import type { EditorAgentConversationClient } from './EditorAgentConversation/useEditorAgentConversation'; import { ApiClientError, diff --git a/src/components/image-editor/ImageCanvasEditorView.tsx b/src/components/image-editor/ImageCanvasEditorView.tsx index 344d052ea..f2cfed4f3 100644 --- a/src/components/image-editor/ImageCanvasEditorView.tsx +++ b/src/components/image-editor/ImageCanvasEditorView.tsx @@ -39,8 +39,8 @@ import { DEFAULT_CANVAS_BACKGROUND_COLOR, generationInputsOrNull, isInlineEditorMediaSource, - resolveLayerResourceAssetKind, resolveContextMenuPosition, + resolveLayerResourceAssetKind, } from './ImageCanvasEditorModel'; import { ImageCanvasEditorShellView } from './ImageCanvasEditorShellView'; import type { diff --git a/src/components/image-editor/ImageCanvasLayerCommandModel.test.ts b/src/components/image-editor/ImageCanvasLayerCommandModel.test.ts index eafdbf488..c42a0b6a3 100644 --- a/src/components/image-editor/ImageCanvasLayerCommandModel.test.ts +++ b/src/components/image-editor/ImageCanvasLayerCommandModel.test.ts @@ -9,8 +9,8 @@ import { createCanvasLayerClipboard, duplicateCanvasLayers, flipCanvasLayers, - getCanvasLayersByIds, getCanvasLayerCopyBlockReason, + getCanvasLayersByIds, groupCanvasLayers, moveCanvasLayers, removeCanvasLayers, diff --git a/src/components/image-editor/useImageCanvasLayerCommands.ts b/src/components/image-editor/useImageCanvasLayerCommands.ts index 456f6e4ed..90f94a25c 100644 --- a/src/components/image-editor/useImageCanvasLayerCommands.ts +++ b/src/components/image-editor/useImageCanvasLayerCommands.ts @@ -22,8 +22,8 @@ import { createCanvasLayerClipboard, duplicateCanvasLayers, flipCanvasLayers, - getCanvasLayersByIds, getCanvasLayerCopyBlockReason, + getCanvasLayersByIds, groupCanvasLayers, moveCanvasLayers, removeCanvasLayers,