Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

chore: post-release nit cleanup

Adam Eivya7f4c9e6eee4
diff --git a/client/src/pages/MediaHistory.jsx b/client/src/pages/MediaHistory.jsx
index a910d53664..af41ee4c0d 100644
--- a/client/src/pages/MediaHistory.jsx
+++ b/client/src/pages/MediaHistory.jsx
@@ -182,7 +182,7 @@ export default function MediaHistory() {
<MediaCard
key={it.key}
item={it}
- onPreview={setPreview}
+ onPreview={(media) => setPreview(media)}
onClick={inStitch ? () => toggleSelect(it.id) : undefined}
onRemix={!stitchMode ? handleRemix : undefined}
onSendToVideo={!stitchMode ? handleSendToVideo : undefined}
diff --git a/server/services/chatgptImport.test.js b/server/services/chatgptImport.test.js
index d19e4767e6..db348268e1 100644
--- a/server/services/chatgptImport.test.js
+++ b/server/services/chatgptImport.test.js
@@ -3,23 +3,12 @@ import { mkdtemp, rm, readdir, readFile } from 'fs/promises';
import { tmpdir } from 'os';
import { join } from 'path';
-// Redirect PATHS.brain to a temp dir BEFORE importing the service so that
-// IMPORT_ROOT (computed at module load) lands inside the temp tree.
+// Each test gets its own temp dir; the actual mocks are installed via
+// vi.doMock + vi.resetModules in beforeEach so PATHS.brain points at a
+// fresh per-test TMP before chatgptImport.js is (re-)loaded.
let TMP;
let createMemoryEntryMock;
-vi.mock('../lib/fileUtils.js', async () => {
- const actual = await vi.importActual('../lib/fileUtils.js');
- return {
- ...actual,
- PATHS: { ...actual.PATHS, brain: TMP }
- };
-});
-
-vi.mock('./brainStorage.js', () => ({
- createMemoryEntry: vi.fn(async (data) => ({ id: `mem-${Math.random().toString(36).slice(2, 8)}`, ...data }))
-}));
-
let parseExport;
let importConversations;
let extractMessages;