Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): reopen a thread that was following its stream at the end #13602

Closedsantiago-ramos-02(GitHub profile, opens in a new tab)wants to merge 3 commits intomain fromrefs/pull/13602/headopened View on GitHub

Showing 3 changed files with 113 additions and 2 deletions.

x
0 of 3 viewed, 3 left
93 additions and 1 deletionapps/web/src/components/chat/MessagesTimeline.test.tsxModified
View file
@@ -10,8 +10,13 @@
import { renderToStaticMarkup } from "react-dom/server";
import { create, type ReactTestRenderer } from "react-test-renderer";
import { beforeAll, beforeEach, describe, expect, it, vi } from "vite-plus/test";
-import type { LegendListRef, MaintainScrollAtEndOptions } from "@legendapp/list/react";
+import {
+ LegendList,
+ type LegendListRef,
+ type MaintainScrollAtEndOptions,
+} from "@legendapp/list/react";
import { shouldUseRestingComposerLayout } from "../composerFooterLayout";
+import { readTimelinePosition } from "./timelineScrollAnchoring";
import { useComposerFocusState } from "./useComposerFocusState";
​
vi.mock("@legendapp/list/react", async () => {
@@ -218,6 +223,7 @@
onAnchorReady: () => {},
contentInsetEndAdjustment: 0,
liveFollowEnabled: true,
+ isLiveFollowLatched: () => true,
onIsAtEndChange: () => {},
onManualNavigation: () => {},
@@ -998,6 +1004,92 @@
+ it("remembers a live-following thread at the end while the follow scroll trails output", () => {