Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): show the scroll-to-end pill when the chat is not at the newest message #12376

Closedbompus(GitHub profile, opens in a new tab)wants to merge 4 commits intomain fromrefs/pull/12376/headopened View on GitHub

Showing 3 changed files with 54 additions and 0 deletions (loading 2).

x
0 of 3 viewed, 3 left
54 additions and 0 deletionsapps/web/src/components/chat/MessagesTimeline.logic.tsModified
View file
@@ -171,6 +171,60 @@
return contentLength - scroll - scrollLength <= TIMELINE_FOLLOW_REARM_THRESHOLD_PX;
​
+export interface TimelineEndSettleInput {
+ /** Render-visible follow flag: false once the user has scrolled away. */
+ readonly liveFollowEnabled: boolean;
+ /** A turn is currently streaming. */
+ readonly isWorking: boolean;
+ /** Send-time anchored end space owns positioning (new-turn anchor mode). */
+ readonly anchorActive: boolean;
+ /** A disclosure toggle is settling (end maintenance briefly suspended). */
+ readonly disclosureSettling: boolean;
+ /** Citation positioning owns the viewport. */
+ readonly citationActive: boolean;
+ /** Thread-position restore is still in flight. */
+ readonly restoring: boolean;
+ /** The list state belongs to the currently painted rows. */
+ readonly listDataCurrent: boolean;
+ readonly isAtEnd: boolean | undefined;
+}
+​
+export type TimelineEndSettleAction = "leave-end" | "report-away-from-end" | "ignore";
+​
+/**
+ * What to do when content settles without firing a scroll event (late row
+ * measurement, turn completion, restore completion) while the viewport reads
+ * away from the live edge.
+ *
+ * A viewport that drifted off the end while follow was still engaged and the