Skip to content

Commit 65e501b

Browse files
test(web): build sidebar render-isolation threads with makeThreadFixture
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent ed711fe commit 65e501b

1 file changed

Lines changed: 3 additions & 34 deletions

File tree

‎apps/web/src/components/Sidebar.browser.test.tsx‎

Lines changed: 3 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { userEvent } from "vite-plus/test/browser";
1212

1313
import { act, fakeTimers, render } from "../../test/render";
1414
import { openCommandPalette } from "../commandPaletteBus";
15+
import { makeThreadFixture } from "../test-fixtures";
1516
import { useHandleNewThread } from "../hooks/useHandleNewThread";
1617
import { __setClientSettingsForTests, getClientSettings } from "../hooks/useSettings";
1718
import { useThreadRouteTarget } from "../hooks/useThreadRouteTarget";
@@ -112,44 +113,12 @@ describe("sidebar header new thread", () => {
112113
});
113114

114115
function threadShell(projectId: ProjectId, index: number): EnvironmentThreadShell {
115-
return {
116+
return makeThreadFixture({
116117
environmentId: EnvironmentId.make("local"),
117118
id: ThreadId.make(`thread-${index}`),
118119
projectId,
119120
title: `Thread ${index}`,
120-
providerInstanceId: "codex",
121-
modelSelection: { instanceId: "codex", model: "gpt-5" },
122-
branch: null,
123-
worktreePath: null,
124-
lineage: { sideChat: false },
125-
forkedFrom: null,
126-
linkOrigin: null,
127-
delegatedFrom: null,
128-
latestRun: null,
129-
runtime: null,
130-
latestUserMessageAt: null,
131-
hasPendingApprovals: false,
132-
hasPendingUserInput: false,
133-
hasActionableProposedPlan: false,
134-
pendingBackgroundTasks: [],
135-
providerInstanceHistory: [],
136-
goal: null,
137-
itemCount: 1,
138-
visibleItemCount: 1,
139-
createdAt: "2026-01-01T00:00:00.000Z",
140-
updatedAt: `2026-01-01T00:00:0${index}.000Z`,
141-
archivedAt: null,
142-
settledOverride: null,
143-
settledAt: null,
144-
unsettledAt: null,
145-
snoozedUntil: null,
146-
snoozedAt: null,
147-
pinnedAt: null,
148-
pinOrderKey: null,
149-
activeOrderKey: null,
150-
pullRequests: [],
151-
deletedAt: null,
152-
} as unknown as EnvironmentThreadShell;
121+
});
153122
}
154123

155124
describe("sidebar render isolation", () => {

0 commit comments

Comments
 (0)