From 1f19213bb283e97a6917df88e283822b5b63ae6b Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Tue, 24 Mar 2026 21:35:40 -0700 Subject: [PATCH] Handle full migration runs and project defaults in tests - Log when all migrations run - Preserve project default model selection in sidebar test helper --- apps/server/src/persistence/Migrations.ts | 6 +++++- apps/web/src/components/Sidebar.logic.test.ts | 5 +++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/apps/server/src/persistence/Migrations.ts b/apps/server/src/persistence/Migrations.ts index 43c4e49f6f..7fd2690462 100644 --- a/apps/server/src/persistence/Migrations.ts +++ b/apps/server/src/persistence/Migrations.ts @@ -90,7 +90,11 @@ export interface RunMigrationsOptions { */ export const runMigrations = ({ toMigrationInclusive }: RunMigrationsOptions = {}) => Effect.gen(function* () { - yield* Effect.log(`Running migrations 1 through ${toMigrationInclusive}...`); + yield* Effect.log( + toMigrationInclusive === undefined + ? "Running all migrations..." + : `Running migrations 1 through ${toMigrationInclusive}...`, + ); const executedMigrations = yield* run({ loader: makeMigrationLoader(toMigrationInclusive) }); yield* Effect.log("Migrations ran successfully"); return executedMigrations; diff --git a/apps/web/src/components/Sidebar.logic.test.ts b/apps/web/src/components/Sidebar.logic.test.ts index 61c894deba..9eebee3666 100644 --- a/apps/web/src/components/Sidebar.logic.test.ts +++ b/apps/web/src/components/Sidebar.logic.test.ts @@ -343,6 +343,7 @@ describe("getVisibleThreadsForProject", () => { }); function makeProject(overrides: Partial = {}): Project { + const { defaultModelSelection, ...rest } = overrides; return { id: ProjectId.makeUnsafe("project-1"), name: "Project", @@ -350,13 +351,13 @@ function makeProject(overrides: Partial = {}): Project { defaultModelSelection: { provider: "codex", model: "gpt-5.4", - ...overrides?.defaultModelSelection, + ...defaultModelSelection, }, expanded: true, createdAt: "2026-03-09T10:00:00.000Z", updatedAt: "2026-03-09T10:00:00.000Z", scripts: [], - ...overrides, + ...rest, }; }