Skip to content

Commit b2836a5

Browse files
t3dotggclaude
andcommitted
test(web): drop the resting-composer overflow test from main
The resting composer and its overflow callback are deleted on this branch. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 66f87d0 commit b2836a5

2 files changed

Lines changed: 1 addition & 25 deletions

File tree

‎apps/web/src/components/chat/MessagesTimeline.browser.test.tsx‎

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -205,29 +205,6 @@ describe("MessagesTimeline messages", () => {
205205
expect(maxNestedCommits).toBeLessThan(20);
206206
});
207207

208-
it("keeps reporting overflow while the composer inset changes", async () => {
209-
setup();
210-
const props = baseProps();
211-
const overflowReports: boolean[] = [];
212-
const replies = Array.from({ length: 40 }, (_, index) =>
213-
message(`Reply ${index}\n\n${"line\n\n".repeat(8)}`, { role: "assistant" }, `r-${index}`),
214-
);
215-
const timeline = (inset: number) => (
216-
<MessagesTimeline
217-
{...props}
218-
timelineEntries={replies}
219-
contentInsetEndAdjustment={inset}
220-
onContentOverflowChange={(overflows) => overflowReports.push(overflows)}
221-
/>
222-
);
223-
await using screen = await renderElement(timeline(110));
224-
await vi.waitFor(() => expect(overflowReports.at(-1)).toBe(true));
225-
overflowReports.length = 0;
226-
// The resting composer resizes with overflow; a false report here flips it back.
227-
await screen.rerender(timeline(148));
228-
expect(overflowReports).not.toContain(false);
229-
});
230-
231208
it("keeps the first and last message headings reachable from either end", async () => {
232209
setup();
233210
const props = baseProps();

‎apps/web/src/components/chat/MessagesTimeline.tsx‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,8 +1114,7 @@ const ConversationTimeline = memo(function ConversationTimeline({
11141114

11151115
const canvas = useChatCanvas();
11161116
const registerTimeline = canvas?.registerTimeline;
1117-
// Stable so the list attaches once per mount. A re-attach reports no overflow for a frame,
1118-
// which flips the resting composer, resizes it, and re-renders this list again.
1117+
// Stable so the list attaches once per mount, not on every render.
11191118
const setTimelineList = useStableCallback((list: LegendListRef | null) => {
11201119
listRef.current = list;
11211120
const scrollNode: HTMLElement | null = list?.getScrollableNode() ?? null;

0 commit comments

Comments
 (0)