Handle full migration runs and project defaults in tests

- Log when all migrations run
- Preserve project default model selection in sidebar test helper
This commit is contained in:
Julius Marminge committed 2026-03-24 21:35:40 -07:00
1 parent 607a4b8239
commit 1f19213bb2
2 files changed
+8 -3

No files matched your search

+5 -1
View File
@@ -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;
@@ -343,6 +343,7 @@ describe("getVisibleThreadsForProject", () => {
});
function makeProject(overrides: Partial<Project> = {}): Project {
const { defaultModelSelection, ...rest } = overrides;
return {
id: ProjectId.makeUnsafe("project-1"),
name: "Project",
@@ -350,13 +351,13 @@ function makeProject(overrides: Partial<Project> = {}): 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,
};
}