@devries-cameron20 / t3code-1 / commits / da9c848e62
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

test(web): the streaming render scenario gives the timeline stable props (#32792)

Co-authored-by: Julius Marminge <julius0216@outlook.com>

Entrpi committed Nov 15, 2026 at 17:34 UTC da9c848e62f63799ed50751a4d7c1ca24d18427d
1 file changed +29 -25
apps/web/test/renderScenarios.renders.tsx
+29 -25
@@ -85,36 +85,40 @@ const versionedProps = { onManualNavigation: () => {} };
85
86 // One list handle per mounted timeline, as ChatView keeps one: the timeline compares the
87 // handle across renders, and a new one per render would skip its scroll-to-end and settle work.
88 +// The callbacks and lists stay the same across renders too, as ChatView's do: new ones change
89 +// the rows' shared context, which re-renders every row and hides a row that re-renders alone.
90 function timelineFor() {
89 - const listRef = createRef<LegendListRef | null>();
91 + const props: Omit<TimelineProps, "timelineEntries" | "routeThreadKey"> = {
92 + isWorking: false,
93 + listRef: createRef<LegendListRef | null>(),
94 + latestRun: null,
95 + turnDiffSummaries: [],
96 + runs: [],
97 + onOpenTurnDiff: () => {},
98 + onOpenThread: () => {},
99 + onForkFromRun: async () => {},
100 + supportsConversationRollback: false,
101 + onRevertToTurnCount: () => {},
102 + isRevertingCheckpoint: false,
103 + onImageExpand: () => {},
104 + activeThreadEnvironmentId: ENVIRONMENT_ID,
105 + markdownCwd: undefined,
106 + resolvedTheme: "light",
107 + timestampFormat: "locale",
108 + workspaceRoot: undefined,
109 + anchorMessageId: null,
110 + onAnchorReady: () => {},
111 + onAnchorSizeChanged: () => {},
112 + contentInsetEndAdjustment: 0,
113 + emptyPlaceholderInset: 0,
114 + liveFollowEnabled: true,
115 + onIsAtEndChange: () => {},
116 + };
117 return (thread: string, entries: Entry[]) => (
118 <MessagesTimeline
119 + {...props}
120 timelineEntries={entries}
93 - isWorking={false}
94 - listRef={listRef}
95 - latestRun={null}
96 - turnDiffSummaries={[]}
97 - runs={[]}
121 routeThreadKey={`environment-local:${thread}`}
99 - onOpenTurnDiff={() => {}}
100 - onOpenThread={() => {}}
101 - onForkFromRun={async () => {}}
102 - supportsConversationRollback={false}
103 - onRevertToTurnCount={() => {}}
104 - isRevertingCheckpoint={false}
105 - onImageExpand={() => {}}
106 - activeThreadEnvironmentId={ENVIRONMENT_ID}
107 - markdownCwd={undefined}
108 - resolvedTheme="light"
109 - timestampFormat="locale"
110 - workspaceRoot={undefined}
111 - anchorMessageId={null}
112 - onAnchorReady={() => {}}
113 - onAnchorSizeChanged={() => {}}
114 - contentInsetEndAdjustment={0}
115 - emptyPlaceholderInset={0}
116 - liveFollowEnabled
117 - onIsAtEndChange={() => {}}
122 {...versionedProps}
123 />
124 );