Skip to content

Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.

Restore chat scroll affordances and add timeline minimap (#3587)

Julius Marmingefda6486233e0
diff --git a/apps/web/src/components/BranchToolbar.tsx b/apps/web/src/components/BranchToolbar.tsx
index 03f24dac8..958cb3743 100644
--- a/apps/web/src/components/BranchToolbar.tsx
+++ b/apps/web/src/components/BranchToolbar.tsx
@@ -239,7 +239,7 @@ export const BranchToolbar = memo(function BranchToolbar({
if (!hasActiveThread || !activeProject) return null;
return (
- <div className="mx-auto flex w-full max-w-208 items-center gap-2 px-2.5 pb-3 pt-1 sm:px-3">
+ <div className="mx-auto flex w-full max-w-3xl items-center gap-2 px-2.5 pb-3 pt-1 sm:px-3">
{isMobile ? (
<MobileRunContextSelector
envLocked={envLocked}
diff --git a/apps/web/src/components/ChatView.tsx b/apps/web/src/components/ChatView.tsx
index 4f99fb5d5..f5ea5bb1e 100644
--- a/apps/web/src/components/ChatView.tsx
+++ b/apps/web/src/components/ChatView.tsx
@@ -85,6 +85,7 @@ import {
isLatestTurnSettled,
} from "../session-logic";
import { type LegendListRef } from "@legendapp/list/react";
+import { getAnchoredTurnMetrics, type TimelineScrollMode } from "./chat/timelineScrollAnchoring";
import {
buildPendingUserInputAnswers,
derivePendingUserInputProgress,
@@ -1161,6 +1162,7 @@ function ChatViewContent(props: ChatViewProps) {
const updateHeight = () => {
const nextHeight = Math.ceil(composerOverlayElement.getBoundingClientRect().height);
+ if (nextHeight <= 0) return;
setComposerOverlayHeight((currentHeight) =>
currentHeight === nextHeight ? currentHeight : nextHeight,
);
@@ -2012,7 +2014,6 @@ function ChatViewContent(props: ChatViewProps) {
: // Spread only fires for the few messages that actually changed;
// unchanged ones early-return their original reference.
// In-place mutation would break React's immutable state contract.
- // oxlint-disable-next-line no-map-spread
messages.map((message) => {
if (
message.role !== "user" ||
@@ -3148,31 +3149,158 @@ function ChatViewContent(props: ChatViewProps) {
],
);
- // Scrolling is explicit so streamed timeline updates never take control away
- // from the user after the newly sent row has been positioned once.
- const scrollToEnd = useCallback((animated = false) => {
- void legendListRef.current?.scrollToEnd?.({ animated });
- }, []);
+ // Debounce *showing* the scroll-to-bottom pill so it doesn't flash during
+ // thread switches. LegendList fires scroll events with isAtEnd=false while
+ // initialScrollAtEnd is settling; hiding is always immediate.
+ const showScrollDebouncer = useRef(
+ new Debouncer(() => setShowScrollToBottom(true), { wait: 150 }),
+ );
+ const timelineScrollModeRef = useRef<TimelineScrollMode>("following-end");
+ const pendingTimelineAnchorRef = useRef<MessageId | null>(null);
const positionedTimelineAnchorRef = useRef<MessageId | null>(null);
const settledTimelineAnchorRef = useRef<MessageId | null>(null);
+ const activeTimelineAnchorIndexRef = useRef<number | null>(null);
+ const anchorUserScrollGenerationRef = useRef(0);
+ const liveFollowUserScrollGenerationRef = useRef<number | null>(0);
const pendingAnchorScrollRestoreRef = useRef<{
readonly messageId: MessageId;
readonly offset: number;
+ readonly userScrollGeneration: number;
} | null>(null);
const anchorScrollRestoreFrameRef = useRef<number | null>(null);
+ const cancelTimelineLiveFollowForUserNavigation = useCallback(() => {
+ anchorUserScrollGenerationRef.current += 1;
+ timelineScrollModeRef.current = "free-scrolling";
+ liveFollowUserScrollGenerationRef.current = null;
+ pendingTimelineAnchorRef.current = null;
+ positionedTimelineAnchorRef.current = null;
+ settledTimelineAnchorRef.current = null;
+ activeTimelineAnchorIndexRef.current = null;
+ pendingAnchorScrollRestoreRef.current = null;
+ if (anchorScrollRestoreFrameRef.current !== null) {
+ cancelAnimationFrame(anchorScrollRestoreFrameRef.current);
+ anchorScrollRestoreFrameRef.current = null;
+ }
+ }, []);
+ const cancelTimelineLiveFollowForUserNavigationRef = useRef(
+ cancelTimelineLiveFollowForUserNavigation,
+ );
+ useEffect(() => {
+ cancelTimelineLiveFollowForUserNavigationRef.current =
+ cancelTimelineLiveFollowForUserNavigation;
+ }, [cancelTimelineLiveFollowForUserNavigation]);
+ const getActiveTimelineTurnMetrics = useCallback(
+ (list?: LegendListRef | null) => {
+ const resolvedList = list ?? legendListRef.current;
+ const anchorIndex = activeTimelineAnchorIndexRef.current;
+ const state = resolvedList?.getState();
+ if (!resolvedList || !state || anchorIndex === null) {
+ return null;
+ }
+
+ return getAnchoredTurnMetrics({
+ state,
+ anchorIndex,
+ composerOverlayHeight,
+ anchorOffset: CHAT_LIST_ANCHOR_OFFSET,
+ });
+ },
+ [composerOverlayHeight],
+ );
+ const timelineRealContentOverflowsViewport = useCallback(
+ (list?: LegendListRef | null) => {
+ const resolvedList = list ?? legendListRef.current;
+ const state = resolvedList?.getState();
+ if (!resolvedList || !state || state.data.length === 0) {
+ return false;
+ }
+
+ const lastRowIndex = state.data.length - 1;
+ const lastRowTop = state.positionAtIndex(lastRowIndex);
+ const lastRowHeight = state.sizeAtIndex(lastRowIndex);
+ if (
+ typeof lastRowTop !== "number" ||
+ typeof lastRowHeight !== "number" ||
+ !Number.isFinite(lastRowTop) ||
+ !Number.isFinite(lastRowHeight)
+ ) {
+ return false;
+ }
+
+ const realContentBottom = lastRowTop + Math.max(1, lastRowHeight);
+ const visibleScrollLength = Math.max(
+ 0,
+ (state.scrollLength ?? 0) - composerOverlayHeight - CHAT_LIST_ANCHOR_OFFSET,
+ );
+ return realContentBottom > visibleScrollLength;
+ },
+ [composerOverlayHeight],
+ );
+
+ // Live-follow stays active after send/thread-open until an actual list scroll
+ // gesture opts out.
+ const scrollToEnd = useCallback((animated = false) => {
+ isAtEndRef.current = true;
+ timelineScrollModeRef.current = "following-end";
+ liveFollowUserScrollGenerationRef.current = anchorUserScrollGenerationRef.current;
+ pendingTimelineAnchorRef.current = null;
+ activeTimelineAnchorIndexRef.current = null;
+ showScrollDebouncer.current.cancel();
+ setShowScrollToBottom(false);
+ void legendListRef.current?.scrollToEnd?.({ animated });
+ }, []);
+ useEffect(() => {
+ let removeListeners: (() => void) | null = null;
+ const frame = requestAnimationFrame(() => {
+ const scrollNode = legendListRef.current?.getScrollableNode();
+ if (!scrollNode) {
+ return;
+ }
+ const handleManualNavigation = () => {
+ cancelTimelineLiveFollowForUserNavigationRef.current();
+ };
+ scrollNode.addEventListener("wheel", handleManualNavigation, {
+ passive: true,
+ });
+ scrollNode.addEventListener("touchmove", handleManualNavigation, {
+ passive: true,
+ });
+ scrollNode.addEventListener("pointerdown", handleManualNavigation, {
+ passive: true,
+ });
+ removeListeners = () => {
+ scrollNode.removeEventListener("wheel", handleManualNavigation);
+ scrollNode.removeEventListener("touchmove", handleManualNavigation);
+ scrollNode.removeEventListener("pointerdown", handleManualNavigation);
+ };
+ });
+
+ return () => {
+ cancelAnimationFrame(frame);
+ removeListeners?.();
+ };
+ }, [activeThread?.id]);
+
const onTimelineAnchorReady = useCallback((messageId: MessageId, anchorIndex: number) => {
+ if (pendingTimelineAnchorRef.current === messageId) {
+ pendingTimelineAnchorRef.current = null;
+ }
+ activeTimelineAnchorIndexRef.current = anchorIndex;
if (positionedTimelineAnchorRef.current === messageId) {
return;
}
positionedTimelineAnchorRef.current = messageId;
settledTimelineAnchorRef.current = null;
- requestAnimationFrame(() => {
+ const positionAnchor = (remainingAttempts: number) => {
requestAnimationFrame(() => {
if (positionedTimelineAnchorRef.current !== messageId) {
return;
}
const list = legendListRef.current;
if (!list) {
+ if (remainingAttempts > 0) {
+ positionAnchor(remainingAttempts - 1);
+ }
return;
}
const scrollNode = list.getScrollableNode();
@@ -3200,18 +3328,26 @@ function ChatViewContent(props: ChatViewProps) {
viewOffset: CHAT_LIST_ANCHOR_OFFSET,
});
});
- });
+ };
+ requestAnimationFrame(() => positionAnchor(12));
}, []);
const onTimelineAnchorSizeChanged = useCallback((messageId: MessageId) => {
if (settledTimelineAnchorRef.current !== messageId) {
return;
}
+ if (liveFollowUserScrollGenerationRef.current === anchorUserScrollGenerationRef.current) {
+ return;
+ }
const scrollOffset = legendListRef.current?.getState().scroll;
if (scrollOffset === undefined) {
return;
}
if (pendingAnchorScrollRestoreRef.current === null) {
- pendingAnchorScrollRestoreRef.current = { messageId, offset: scrollOffset };
+ pendingAnchorScrollRestoreRef.current = {
+ messageId,
+ offset: scrollOffset,
+ userScrollGeneration: anchorUserScrollGenerationRef.current,
+ };
}
if (anchorScrollRestoreFrameRef.current !== null) {
return;
@@ -3220,32 +3356,121 @@ function ChatViewContent(props: ChatViewProps) {
anchorScrollRestoreFrameRef.current = null;
const pending = pendingAnchorScrollRestoreRef.current;
pendingAnchorScrollRestoreRef.current = null;
- if (pending && settledTimelineAnchorRef.current === pending.messageId) {
- void legendListRef.current?.scrollToOffset({ offset: pending.offset, animated: false });
+ if (
+ pending &&
+ settledTimelineAnchorRef.current === pending.messageId &&
+ pending.userScrollGeneration === anchorUserScrollGenerationRef.current
+ ) {
+ const list = legendListRef.current;
+ const currentScrollOffset = list?.getState().scroll;
+ if (
+ typeof currentScrollOffset === "number" &&
+ Math.abs(currentScrollOffset - pending.offset) <= 2
+ ) {
+ void list?.scrollToOffset({ offset: pending.offset, animated: false });
+ }
}
});
}, []);
- // Debounce *showing* the scroll-to-bottom pill so it doesn't flash during
- // thread switches. LegendList fires scroll events with isAtEnd=false while
- // initialScrollAtEnd is settling; hiding is always immediate.
- const showScrollDebouncer = useRef(
- new Debouncer(() => setShowScrollToBottom(true), { wait: 150 }),
- );
const onIsAtEndChange = useCallback((isAtEnd: boolean) => {
+ if (
+ !isAtEnd &&
+ liveFollowUserScrollGenerationRef.current === anchorUserScrollGenerationRef.current
+ ) {
+ showScrollDebouncer.current.cancel();
+ setShowScrollToBottom(false);
+ return;
+ }
if (isAtEndRef.current === isAtEnd) return;
isAtEndRef.current = isAtEnd;
if (isAtEnd) {
+ timelineScrollModeRef.current = "following-end";
+ liveFollowUserScrollGenerationRef.current = anchorUserScrollGenerationRef.current;
showScrollDebouncer.current.cancel();
setShowScrollToBottom(false);
} else {
+ timelineScrollModeRef.current = "free-scrolling";
+ liveFollowUserScrollGenerationRef.current = null;
showScrollDebouncer.current.maybeExecute();
}
}, []);
+ useEffect(() => {
+ if (!activeThread?.id) {
+ return;
+ }
+ if (liveFollowUserScrollGenerationRef.current !== anchorUserScrollGenerationRef.current) {
+ return;
+ }
+
+ let secondFrame: number | null = null;
+ const frame = requestAnimationFrame(() => {
+ secondFrame = requestAnimationFrame(() => {
+ if (liveFollowUserScrollGenerationRef.current !== anchorUserScrollGenerationRef.current) {
+ return;
+ }
+ if (pendingTimelineAnchorRef.current !== null) {
+ return;
+ }
+ if (
+ positionedTimelineAnchorRef.current !== null &&
+ settledTimelineAnchorRef.current !== positionedTimelineAnchorRef.current
+ ) {
+ return;
+ }
+ const list = legendListRef.current;
+ if (!list) {
+ return;
+ }
+
+ if (timelineScrollModeRef.current === "anchoring-new-turn") {
+ const metrics = getActiveTimelineTurnMetrics(list);
+ if (!metrics) {
+ return;
+ }
+ if (metrics.scrollDeltaToRevealEnd <= 1) {
+ return;
+ }
+
+ const nextOffset = list.getState().scroll + metrics.scrollDeltaToRevealEnd;
+ void list.scrollToOffset({ offset: nextOffset, animated: false });
+ return;
+ }
+
+ if (timelineScrollModeRef.current !== "following-end") {
+ return;
+ }
+ if (!timelineRealContentOverflowsViewport(list)) {
+ return;
+ }
+
+ void list.scrollToEnd?.({ animated: false });
+ });
+ });
+
+ return () => {
+ cancelAnimationFrame(frame);
+ if (secondFrame !== null) {
+ cancelAnimationFrame(secondFrame);
+ }
+ };
+ }, [
+ activeThread?.id,
+ timelineEntries,
+ getActiveTimelineTurnMetrics,
+ timelineRealContentOverflowsViewport,
+ ]);
+
useEffect(() => {
setPullRequestDialogState(null);
isAtEndRef.current = true;
+ timelineScrollModeRef.current = "following-end";
+ liveFollowUserScrollGenerationRef.current = anchorUserScrollGenerationRef.current;
+ pendingTimelineAnchorRef.current = null;
+ positionedTimelineAnchorRef.current = null;
+ settledTimelineAnchorRef.current = null;
+ activeTimelineAnchorIndexRef.current = null;
showScrollDebouncer.current.cancel();
setShowScrollToBottom(false);
if (planSidebarOpenOnNextThreadRef.current) {
@@ -3256,7 +3481,6 @@ function ChatViewContent(props: ChatViewProps) {
}
planSidebarDismissedForTurnRef.current = null;
// activeThreadRef resets transitively with the active thread.
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [activeThread?.id]);
// Auto-open the plan sidebar when plan/todo steps arrive for the current turn.
@@ -3806,6 +4030,10 @@ function ChatViewContent(props: ChatViewProps) {
// anchored end-space target so it lands near the top while the response
// streams into the reserved space below it.
isAtEndRef.current = true;
+ timelineScrollModeRef.current = "anchoring-new-turn";
+ liveFollowUserScrollGenerationRef.current = anchorUserScrollGenerationRef.current;
+ pendingTimelineAnchorRef.current = messageIdForSend;
+ activeTimelineAnchorIndexRef.current = null;
showScrollDebouncer.current.cancel();
setShowScrollToBottom(false);
setTimelineAnchor({
@@ -4239,6 +4467,10 @@ function ChatViewContent(props: ChatViewProps) {
// Position this sent row once LegendList has measured the anchored tail.
isAtEndRef.current = true;
+ timelineScrollModeRef.current = "anchoring-new-turn";
+ liveFollowUserScrollGenerationRef.current = anchorUserScrollGenerationRef.current;
+ pendingTimelineAnchorRef.current = messageIdForSend;
+ activeTimelineAnchorIndexRef.current = null;
showScrollDebouncer.current.cancel();
setShowScrollToBottom(false);
setTimelineAnchor({
@@ -4868,9 +5100,10 @@ function ChatViewContent(props: ChatViewProps) {
onAnchorSizeChanged={onTimelineAnchorSizeChanged}
contentInsetEndAdjustment={composerOverlayHeight}
onIsAtEndChange={onIsAtEndChange}
+ onManualNavigation={cancelTimelineLiveFollowForUserNavigation}
/>
- {/* scroll to bottom pill — shown when user has scrolled away from the bottom */}
+ {/* scroll to end pill — shown when user has scrolled away from the live edge */}
{showScrollToBottom && (
<div
className="pointer-events-none absolute left-1/2 z-30 flex -translate-x-1/2 justify-center py-1.5"
@@ -4878,11 +5111,13 @@ function ChatViewContent(props: ChatViewProps) {
>
<button
type="button"
+ aria-label="Scroll to end"
+ title="Scroll to end"
onClick={() => scrollToEnd(true)}
className="pointer-events-auto flex items-center gap-1.5 rounded-full border border-border/60 bg-card px-3 py-1 text-muted-foreground text-xs shadow-sm transition-colors hover:border-border hover:text-foreground hover:cursor-pointer"
>
<ChevronDownIcon className="size-3.5" />
- Scroll to bottom
+ Scroll to end
</button>
</div>
)}
@@ -4898,7 +5133,7 @@ function ChatViewContent(props: ChatViewProps) {
aria-hidden="true"
className="chat-composer-horizontal-inset pointer-events-none absolute inset-x-0 top-1.5 bottom-0 z-0 sm:top-2"
>
- <div className="relative mx-auto h-full w-full max-w-208 overflow-clip rounded-t-[20px]">
+ <div className="relative mx-auto h-full w-full max-w-3xl overflow-clip rounded-t-[20px]">
<div className="chat-composer-shared-blur absolute -inset-8" />
</div>
</div>
diff --git a/apps/web/src/components/chat/ChatComposer.tsx b/apps/web/src/components/chat/ChatComposer.tsx
index c93f22249..5f9aec837 100644
--- a/apps/web/src/components/chat/ChatComposer.tsx
+++ b/apps/web/src/components/chat/ChatComposer.tsx
@@ -2044,7 +2044,7 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
<form
ref={composerFormRef}
onSubmit={submitComposer}
- className="mx-auto w-full min-w-0 max-w-208"
+ className="mx-auto w-full min-w-0 max-w-3xl"
data-chat-composer-form="true"
>
<div
diff --git a/apps/web/src/components/chat/ComposerBannerStack.tsx b/apps/web/src/components/chat/ComposerBannerStack.tsx
index 4a2a8f29d..1f82c452b 100644
--- a/apps/web/src/components/chat/ComposerBannerStack.tsx
+++ b/apps/web/src/components/chat/ComposerBannerStack.tsx
@@ -82,7 +82,7 @@ export function ComposerBannerStack({ className, items }: ComposerBannerStackPro
};
return (
- <div className={cn("group/banner-stack mx-auto mb-2 max-w-208", className)}>
+ <div className={cn("group/banner-stack mx-auto mb-2 max-w-3xl", className)}>
<div
className={cn(
"relative",
diff --git a/apps/web/src/components/chat/MessagesTimeline.logic.ts b/apps/web/src/components/chat/MessagesTimeline.logic.ts
index d93ec0d03..c6e277cce 100644
--- a/apps/web/src/components/chat/MessagesTimeline.logic.ts
+++ b/apps/web/src/components/chat/MessagesTimeline.logic.ts
@@ -10,6 +10,59 @@ import { type ChatMessage, type ProposedPlan, type TurnDiffSummary } from "../..
import { type MessageId, type OrchestrationLatestTurn, type TurnId } from "@t3tools/contracts";
export const MAX_VISIBLE_WORK_LOG_ENTRIES = 1;
+export const TIMELINE_MINIMAP_ITEM_SPACING = 8;
+export const TIMELINE_MINIMAP_MIN_ITEMS = 2;
+export const TIMELINE_MINIMAP_MAX_HEIGHT_CSS = "calc(100vh - 18rem)";
+export const TIMELINE_CONTENT_MAX_WIDTH = 768;
+export const TIMELINE_MINIMAP_PERSISTENT_GUTTER = 48;
+
+export interface TimelineEndState {
+ readonly isAtEnd?: boolean;
+ readonly isNearEnd?: boolean;
+}
+
+export function resolveTimelineIsAtEnd(state: TimelineEndState | undefined): boolean | undefined {
+ return state?.isNearEnd ?? state?.isAtEnd;
+}
+
+export function resolveTimelineMinimapHeightStyle(itemCount: number): string {
+ const naturalHeight = Math.max(1, (itemCount - 1) * TIMELINE_MINIMAP_ITEM_SPACING);
+ return `min(${naturalHeight}px, ${TIMELINE_MINIMAP_MAX_HEIGHT_CSS})`;
+}
+
+export function resolveTimelineMinimapTopPercent(index: number, itemCount: number): number {
+ if (itemCount <= 1) {
+ return 0;
+ }
+ return (Math.max(0, Math.min(index, itemCount - 1)) / (itemCount - 1)) * 100;
+}
+
+export function resolveTimelineMinimapIndexFromPointer(input: {
+ readonly itemCount: number;
+ readonly railTop: number;
+ readonly railHeight: number;
+ readonly pointerY: number;
+}): number | null {
+ if (input.itemCount <= 0 || input.railHeight <= 0) {
+ return null;
+ }
+ if (input.itemCount === 1) {
+ return 0;
+ }
+
+ const progress = Math.max(0, Math.min(1, (input.pointerY - input.railTop) / input.railHeight));
+ return Math.max(0, Math.min(input.itemCount - 1, Math.round(progress * (input.itemCount - 1))));
+}
+
+export function resolveTimelineMinimapHasPersistentGutter(viewportWidth: number): boolean {
+ if (!Number.isFinite(viewportWidth) || viewportWidth <= 0) {
+ return false;
+ }
+
+ const contentWidth = Math.min(viewportWidth, TIMELINE_CONTENT_MAX_WIDTH);
+ const sideGutter = Math.max(0, (viewportWidth - contentWidth) / 2);
+ return sideGutter >= TIMELINE_MINIMAP_PERSISTENT_GUTTER;
+}
function computeElapsedMs(startIso: string, endIso: string): number | null {
const start = Date.parse(startIso);
diff --git a/apps/web/src/components/chat/MessagesTimeline.test.tsx b/apps/web/src/components/chat/MessagesTimeline.test.tsx
index 55ef6bfd5..0957e0253 100644
--- a/apps/web/src/components/chat/MessagesTimeline.test.tsx
+++ b/apps/web/src/components/chat/MessagesTimeline.test.tsx
@@ -22,7 +22,16 @@ vi.mock("@legendapp/list/react", async () => {
};
contentInsetEndAdjustment?: number;
className?: string;
- maintainScrollAtEnd?: boolean;
+ maintainScrollAtEnd?:
+ | boolean
+ | {
+ animated?: boolean;
+ on?: {
+ dataChange?: boolean;
+ itemLayout?: boolean;
+ layout?: boolean;
+ };
+ };
maintainVisibleContentPosition?:
| boolean
| {
@@ -45,7 +54,27 @@ vi.mock("@legendapp/list/react", async () => {
data-anchor-on-ready={Boolean(props.anchoredEndSpace?.onReady)}
data-content-inset-end={props.contentInsetEndAdjustment}
data-class-name={props.className}
- data-maintain-scroll-at-end={props.maintainScrollAtEnd}
+ data-maintain-scroll-at-end={props.maintainScrollAtEnd ? "enabled" : undefined}
+ data-maintain-scroll-at-end-animated={
+ typeof props.maintainScrollAtEnd === "object"
+ ? props.maintainScrollAtEnd.animated
+ : undefined
+ }
+ data-maintain-scroll-at-end-data-change={
+ typeof props.maintainScrollAtEnd === "object"
+ ? props.maintainScrollAtEnd.on?.dataChange
+ : undefined
+ }
+ data-maintain-scroll-at-end-item-layout={
+ typeof props.maintainScrollAtEnd === "object"
+ ? props.maintainScrollAtEnd.on?.itemLayout
+ : undefined
+ }
+ data-maintain-scroll-at-end-layout={
+ typeof props.maintainScrollAtEnd === "object"
+ ? props.maintainScrollAtEnd.on?.layout
+ : undefined
+ }
data-maintain-visible-content-position={
typeof props.maintainVisibleContentPosition === "object"
? "object"
@@ -162,6 +191,7 @@ function buildProps() {
onAnchorSizeChanged: () => {},
contentInsetEndAdjustment: 0,
onIsAtEndChange: () => {},
+ onManualNavigation: () => {},
};
}
@@ -189,6 +219,43 @@ function buildUserTimelineEntry(text: string) {
}
describe("MessagesTimeline", () => {
+ it("uses LegendList isNearEnd when deciding whether the live edge is visible", async () => {
+ const {
+ resolveTimelineIsAtEnd,
+ resolveTimelineMinimapHasPersistentGutter,
+ resolveTimelineMinimapHeightStyle,
+ resolveTimelineMinimapIndexFromPointer,
+ resolveTimelineMinimapTopPercent,
+ } = await import("./MessagesTimeline.logic");
+
+ expect(resolveTimelineIsAtEnd({ isNearEnd: true, isAtEnd: false })).toBe(true);
+ expect(resolveTimelineIsAtEnd({ isNearEnd: false, isAtEnd: true })).toBe(false);
+ expect(resolveTimelineIsAtEnd({ isAtEnd: true })).toBe(true);
+ expect(resolveTimelineIsAtEnd(undefined)).toBeUndefined();
+
+ expect(resolveTimelineMinimapHeightStyle(5)).toBe("min(32px, calc(100vh - 18rem))");
+ expect(resolveTimelineMinimapTopPercent(2, 5)).toBe(50);
+ expect(
+ resolveTimelineMinimapIndexFromPointer({
+ itemCount: 101,
+ railTop: 100,
+ railHeight: 500,
+ pointerY: 350,
+ }),
+ ).toBe(50);
+ expect(
+ resolveTimelineMinimapIndexFromPointer({
+ itemCount: 101,
+ railTop: 100,
+ railHeight: 500,
+ pointerY: 999,
+ }),
+ ).toBe(100);
+ expect(resolveTimelineMinimapHasPersistentGutter(832)).toBe(false);
+ expect(resolveTimelineMinimapHasPersistentGutter(863)).toBe(false);
+ expect(resolveTimelineMinimapHasPersistentGutter(864)).toBe(true);
+ });
+
it("anchors a sent attachment message using its measured height", async () => {
const { MessagesTimeline } = await import("./MessagesTimeline");
const onAnchorReady = vi.fn();
@@ -229,7 +296,7 @@ describe("MessagesTimeline", () => {
expect(markup).not.toContain("data-anchor-max-size=");
expect(markup).toContain('data-content-inset-end="144"');
expect(markup).toContain("[overflow-anchor:none]");
- expect(markup).not.toContain("data-maintain-scroll-at-end=");
+ expect(markup).not.toContain('data-maintain-scroll-at-end="enabled"');
expect(markup).toContain('data-maintain-visible-content-position="object"');
expect(markup).toContain('data-maintain-visible-content-position-data="true"');
expect(markup).toContain('data-maintain-visible-content-position-size="false"');
@@ -248,6 +315,11 @@ describe("MessagesTimeline", () => {
);
expect(markup).toContain("Show full message");
+ expect(markup).toContain('data-maintain-scroll-at-end="enabled"');
+ expect(markup).toContain('data-maintain-scroll-at-end-animated="false"');
+ expect(markup).toContain('data-maintain-scroll-at-end-data-change="true"');
+ expect(markup).toContain('data-maintain-scroll-at-end-item-layout="true"');
+ expect(markup).toContain('data-maintain-scroll-at-end-layout="true"');
expect(markup).toContain('data-user-message-collapsed="true"');
expect(markup).toContain('data-user-message-fade="true"');
expect(markup).toContain('data-user-message-footer="true"');
diff --git a/apps/web/src/components/chat/MessagesTimeline.tsx b/apps/web/src/components/chat/MessagesTimeline.tsx
index 0134f5493..1a4dc6b68 100644
--- a/apps/web/src/components/chat/MessagesTimeline.tsx
+++ b/apps/web/src/components/chat/MessagesTimeline.tsx
@@ -18,6 +18,7 @@ import {
useRef,
useState,
type KeyboardEvent,
+ type MouseEvent,
type ReactNode,
} from "react";
import { flushSync } from "react-dom";
@@ -69,8 +70,14 @@ import {
deriveMessagesTimelineRows,
normalizeCompactToolLabel,
resolveAssistantMessageCopyState,
+ resolveTimelineIsAtEnd,
+ resolveTimelineMinimapHasPersistentGutter,
+ resolveTimelineMinimapHeightStyle,
+ resolveTimelineMinimapIndexFromPointer,
+ resolveTimelineMinimapTopPercent,
type StableMessagesTimelineRowsState,
type MessagesTimelineRow,
+ TIMELINE_MINIMAP_MIN_ITEMS,
type TimelineLatestTurn,
} from "./MessagesTimeline.logic";
import { TerminalContextInlineChip } from "./TerminalContextInlineChip";
@@ -171,6 +178,7 @@ interface MessagesTimelineProps {
onAnchorSizeChanged: (messageId: MessageId, size: number) => void;
contentInsetEndAdjustment: number;
onIsAtEndChange: (isAtEnd: boolean) => void;
+ onManualNavigation: () => void;
}
// ---------------------------------------------------------------------------
@@ -203,9 +211,11 @@ export const MessagesTimeline = memo(function MessagesTimeline({
onAnchorSizeChanged,
contentInsetEndAdjustment,
onIsAtEndChange,
+ onManualNavigation,
}: MessagesTimelineProps) {
const [expandedTurnIds, setExpandedTurnIds] = useState<ReadonlySet<TurnId>>(new Set());
const [expandedWorkGroupIds, setExpandedWorkGroupIds] = useState<ReadonlySet<string>>(new Set());
+ const [minimapStripMap] = useState(() => new Map<string, HTMLSpanElement>());
const onToggleTurnFold = useCallback((turnId: TurnId) => {
setExpandedTurnIds((existing) => {
@@ -307,6 +317,11 @@ export const MessagesTimeline = memo(function MessagesTimeline({
],
);
const rows = useStableRows(rawRows);
+ const minimapItems = useMemo(() => deriveTimelineMinimapItems(rows), [rows]);
+ const [timelineViewportElement, setTimelineViewportElement] = useState<HTMLDivElement | null>(
+ null,
+ );
+ const [minimapHasPersistentGutter, setMinimapHasPersistentGutter] = useState(false);
const handleAnchorReady = useCallback(
(info: { anchorIndex: number | undefined }) => {
if (anchorMessageId !== null && info.anchorIndex !== undefined) {
@@ -334,10 +349,62 @@ export const MessagesTimeline = memo(function MessagesTimeline({
const handleScroll = useCallback(() => {
const state = listRef.current?.getState?.();
- if (state) {
- onIsAtEndChange(state.isAtEnd);
+ const isAtEnd = resolveTimelineIsAtEnd(state);
+ if (isAtEnd !== undefined) {
+ onIsAtEndChange(isAtEnd);
+ }
+ if (!state || minimapItems.length === 0) {
+ return;
+ }
+
+ const scrollTop = state.scroll ?? 0;
+ const scrollBottom = scrollTop + (state.scrollLength ?? 0);
+
+ for (const item of minimapItems) {
+ const strip = minimapStripMap.get(item.id);
+ if (!strip) {
+ continue;
+ }
+
+ const rowTop = resolveTimelineRowTop(state, item.rowIndex);
+ const rowHeight = resolveTimelineRowHeight(state, item.rowIndex);
+ const inView =
+ rowTop !== null &&
+ rowTop < scrollBottom &&
+ rowTop + Math.max(1, rowHeight ?? 1) > scrollTop;
+
+ strip.dataset.inView = inView ? "true" : "false";
+ }
+ }, [listRef, minimapItems, minimapStripMap, onIsAtEndChange]);
+
+ useEffect(() => {
+ const frame = requestAnimationFrame(handleScroll);
+ return () => cancelAnimationFrame(frame);
+ }, [handleScroll, rows.length]);
+
+ useEffect(() => {
+ if (!timelineViewportElement) {
+ return;
}
- }, [listRef, onIsAtEndChange]);
+
+ const measure = () => {
+ const viewportWidth = timelineViewportElement.getBoundingClientRect().width;
+ const nextHasPersistentGutter = resolveTimelineMinimapHasPersistentGutter(viewportWidth);
+ setMinimapHasPersistentGutter((current) =>
+ current === nextHasPersistentGutter ? current : nextHasPersistentGutter,
+ );
+ };
+
+ const frame = requestAnimationFrame(measure);
+
+ const observer = new ResizeObserver(measure);
+ observer.observe(timelineViewportElement);
+
+ return () => {
+ cancelAnimationFrame(frame);
+ observer.disconnect();
+ };
+ }, [timelineViewportElement, rows.length]);
const sharedState = useMemo<TimelineRowSharedState>(
() => ({
@@ -403,25 +470,53 @@ export const MessagesTimeline = memo(function MessagesTimeline({
return (
<TimelineRowCtx value={sharedState}>
<TimelineRowActivityCtx value={activityState}>
- <LegendList<MessagesTimelineRow>
- ref={listRef}
- data={rows}
- keyExtractor={keyExtractor}
- getItemType={getItemType}
- renderItem={renderItem}
- estimatedItemSize={90}
- initialScrollAtEnd
- {...(anchoredEndSpace ? { anchoredEndSpace } : {})}
- contentInsetEndAdjustment={contentInsetEndAdjustment}
- maintainVisibleContentPosition={{
- data: true,
- size: false,
- }}
- onScroll={handleScroll}
- className="scrollbar-gutter-both h-full min-h-0 overflow-x-hidden overscroll-y-contain px-3 [overflow-anchor:none] sm:px-5"
- ListHeaderComponent={TIMELINE_LIST_HEADER}
- ListFooterComponent={TIMELINE_LIST_FOOTER}
- />
+ <div ref={setTimelineViewportElement} className="relative h-full min-h-0">
+ <LegendList<MessagesTimelineRow>
+ ref={listRef}
+ data={rows}
+ keyExtractor={keyExtractor}
+ getItemType={getItemType}
+ renderItem={renderItem}
+ estimatedItemSize={90}
+ initialScrollAtEnd
+ {...(anchoredEndSpace ? { anchoredEndSpace } : {})}
+ contentInsetEndAdjustment={contentInsetEndAdjustment}
+ maintainScrollAtEnd={
+ anchoredEndSpace
+ ? false
+ : {
+ animated: false,
+ on: {
+ dataChange: true,
+ itemLayout: true,
+ layout: true,
+ },
+ }
+ }
+ maintainVisibleContentPosition={{
+ data: true,
+ size: false,
+ }}
+ onScroll={handleScroll}
+ className="scrollbar-gutter-both h-full min-h-0 overflow-x-hidden overscroll-y-contain px-3 [overflow-anchor:none] sm:px-5"
+ ListHeaderComponent={TIMELINE_LIST_HEADER}
+ ListFooterComponent={TIMELINE_LIST_FOOTER}
+ />
+ <TimelineMinimap
+ items={minimapItems}
+ bottomInset={contentInsetEndAdjustment}
+ hasPersistentGutter={minimapHasPersistentGutter}
+ stripMap={minimapStripMap}
+ onSelect={(item) => {
+ onManualNavigation();
+ void listRef.current?.scrollToIndex({
+ index: item.rowIndex,
+ animated: true,
+ viewOffset: 24,
+ });
+ }}
+ />
+ </div>
</TimelineRowActivityCtx>
</TimelineRowCtx>
);
@@ -435,6 +530,261 @@ function getItemType(item: MessagesTimelineRow) {
return item.kind === "message" ? `message:${item.message.role}` : item.kind;
}
+interface TimelineMinimapItem {
+ readonly id: string;
+ readonly rowIndex: number;
+ readonly userText: string | null;
+ readonly assistantText: string | null;
+}
+
+interface TimelinePositionState {
+ readonly contentLength?: number;
+ readonly scroll?: number;
+ readonly scrollLength?: number;
+ readonly positionAtIndex?: (index: number) => number | undefined;
+ readonly sizeAtIndex?: (index: number) => number | undefined;
+}
+
+function deriveTimelineMinimapItems(
+ rows: ReadonlyArray<MessagesTimelineRow>,
+): TimelineMinimapItem[] {
+ const items: TimelineMinimapItem[] = [];
+ for (let index = 0; index < rows.length; index += 1) {
+ const row = rows[index];
+ if (row?.kind !== "message" || row.message.role !== "user") {
+ continue;
+ }
+
+ items.push({
+ id: row.id,
+ rowIndex: index,
+ userText: compactMinimapPreview(row.message.text),
+ assistantText: compactMinimapPreview(resolveFinalAssistantTextForTurn(rows, index)),
+ });
+ }
+ return items;
+}
+
+function resolveFinalAssistantTextForTurn(
+ rows: ReadonlyArray<MessagesTimelineRow>,
+ userRowIndex: number,
+) {
+ let finalAssistantText: string | null = null;
+ for (let index = userRowIndex + 1; index < rows.length; index += 1) {
+ const row = rows[index];
+ if (row?.kind !== "message") {
+ continue;
+ }
+ if (row.message.role === "user") {
+ break;
+ }
+ if (row.message.role === "assistant") {
+ finalAssistantText = row.message.text ?? null;
+ }
+ }
+ return finalAssistantText;
+}
+
+function compactMinimapPreview(text: string | null | undefined) {
+ const compact = text?.replace(/\s+/g, " ").trim() ?? "";
+ return compact.length > 0 ? compact : null;
+}
+
+function resolveTimelineRowTop(state: TimelinePositionState, rowIndex: number) {
+ const top = state.positionAtIndex?.(rowIndex);
+ return typeof top === "number" && Number.isFinite(top) ? top : null;
+}
+
+function resolveTimelineRowHeight(state: TimelinePositionState, rowIndex: number) {
+ const height = state.sizeAtIndex?.(rowIndex);
+ return typeof height === "number" && Number.isFinite(height) ? height : null;
+}
+
+function TimelineMinimap({
+ bottomInset,
+ hasPersistentGutter,
+ items,
+ stripMap,
+ onSelect,
+}: {
+ bottomInset: number;
+ hasPersistentGutter: boolean;
+ items: ReadonlyArray<TimelineMinimapItem>;
+ stripMap: Map<string, HTMLSpanElement>;
+ onSelect: (item: TimelineMinimapItem) => void;
+}) {
+ const [activeIndex, setActiveIndex] = useState<number | null>(null);
+
+ const resolvedActiveIndex =
+ activeIndex !== null && activeIndex < items.length ? activeIndex : null;
+ const activeItem = resolvedActiveIndex === null ? null : (items[resolvedActiveIndex] ?? null);
+ const activeTopPercent =
+ resolvedActiveIndex === null
+ ? 0
+ : resolveTimelineMinimapTopPercent(resolvedActiveIndex, items.length);
+ const activeTooltipTranslate =
+ resolvedActiveIndex === null
+ ? "-50%"
+ : resolvedActiveIndex === 0
+ ? "0%"
+ : resolvedActiveIndex === items.length - 1
+ ? "-100%"
+ : "-50%";
+
+ const resolveActiveIndexFromPointer = useCallback(
+ (event: MouseEvent<HTMLElement>) => {
+ const rect = event.currentTarget.getBoundingClientRect();
+ return resolveTimelineMinimapIndexFromPointer({
+ itemCount: items.length,
+ railTop: rect.top,
+ railHeight: rect.height,
+ pointerY: event.clientY,
+ });
+ },
+ [items.length],
+ );
+
+ const updateActiveIndexFromPointer = useCallback(
+ (event: MouseEvent<HTMLElement>) => {
+ const nextIndex = resolveActiveIndexFromPointer(event);
+ setActiveIndex(nextIndex);
+ },
+ [resolveActiveIndexFromPointer],
+ );
+
+ const moveActiveIndex = useCallback(
+ (delta: number) => {
+ setActiveIndex((current) => {
+ const base = current ?? 0;
+ return Math.max(0, Math.min(items.length - 1, base + delta));
+ });
+ },
+ [items.length],
+ );
+
+ if (items.length < TIMELINE_MINIMAP_MIN_ITEMS) {
+ return null;
+ }
+
+ const safeBottomInset = Math.max(0, Math.ceil(bottomInset));
+
+ return (
+ <div
+ className={cn(
+ "group/minimap pointer-events-auto absolute top-0 left-0 z-40 hidden w-18 [@media(pointer:fine)]:block",
+ hasPersistentGutter
+ ? "opacity-100"
+ : "opacity-0 transition-opacity duration-150 hover:opacity-100 focus-within:opacity-100",
+ )}
+ data-testid="timeline-minimap"
+ data-persistent-gutter={hasPersistentGutter ? "true" : "false"}
+ style={{ bottom: safeBottomInset }}
+ >
+ <div className="relative h-full w-full select-none">
+ <button
+ aria-label={`Jump to message: ${activeItem?.userText ?? "User message"}`}
+ className="pointer-events-auto absolute top-1/2 left-3 w-10 -translate-y-1/2 cursor-pointer bg-transparent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/70"
+ onBlur={() => setActiveIndex(null)}
+ onClick={(event) => {
+ const nextIndex = resolveActiveIndexFromPointer(event);
+ const nextItem = nextIndex === null ? null : (items[nextIndex] ?? null);
+ if (nextItem) {
+ onSelect(nextItem);
+ }
+ event.currentTarget.blur();
+ }}
+ onFocus={() => setActiveIndex((current) => current ?? 0)}
+ onKeyDown={(event) => {
+ if (event.key === "ArrowDown") {
+ event.preventDefault();
+ moveActiveIndex(1);
+ } else if (event.key === "ArrowUp") {
+ event.preventDefault();
+ moveActiveIndex(-1);
+ } else if (event.key === "Home") {
+ event.preventDefault();
+ setActiveIndex(0);
+ } else if (event.key === "End") {
+ event.preventDefault();
+ setActiveIndex(items.length - 1);
+ } else if (event.key === "Enter" || event.key === " ") {
+ event.preventDefault();
+ if (activeItem) {
+ onSelect(activeItem);
+ }
+ }
+ }}
+ onMouseLeave={() => setActiveIndex(null)}
+ onMouseMove={updateActiveIndexFromPointer}
+ onMouseDown={(event) => {
+ event.preventDefault();
+ }}
+ style={{ height: resolveTimelineMinimapHeightStyle(items.length) }}
+ type="button"
+ >
+ <div className="absolute top-0 left-3 h-full w-px bg-border/15" />
+ {items.map((item, index) => {
+ const top = `${resolveTimelineMinimapTopPercent(index, items.length)}%`;
+ const activeDistance =
+ resolvedActiveIndex === null ? null : Math.abs(index - resolvedActiveIndex);
+ return (
+ <span
+ aria-hidden="true"
+ className={cn(
+ "pointer-events-none absolute left-0 h-0.5 -translate-y-1/2 rounded-full bg-muted-foreground/35 transition-[background-color,width] duration-150 data-[in-view=true]:bg-foreground/90",
+ activeDistance === 0
+ ? "w-6 bg-muted-foreground/75"
+ : activeDistance === 1
+ ? "w-4"
+ : activeDistance === 2
+ ? "w-2.5"
+ : "w-2",
+ )}
+ data-in-view="false"
+ data-minimap-strip
+ key={item.id}
+ ref={(node) => {
+ if (node) {
+ stripMap.set(item.id, node);
+ } else {
+ stripMap.delete(item.id);
+ }
+ }}
+ style={{ top }}
+ />
+ );
+ })}
+ {activeItem ? (
+ <span
+ className="pointer-events-none absolute left-8 w-80 rounded-xl border border-border/70 bg-popover/95 p-3 text-left text-popover-foreground shadow-xl shadow-black/25 backdrop-blur"
+ style={{
+ top: `${activeTopPercent}%`,
+ transform: `translateY(${activeTooltipTranslate})`,
+ }}
+ >
+ <span className="block max-w-full overflow-hidden text-ellipsis whitespace-nowrap text-sm font-medium leading-5">
+ {activeItem.userText ?? "User message"}
+ </span>
+ {activeItem.assistantText ? (
+ <span
+ className="mt-1 max-h-[3.75rem] overflow-hidden text-muted-foreground text-sm leading-5"
+ style={{
+ display: "-webkit-box",
+ WebkitBoxOrient: "vertical",
+ WebkitLineClamp: 3,
+ }}
+ >
+ {activeItem.assistantText}
+ </span>
+ ) : null}
+ </span>
+ ) : null}
+ </button>
+ </div>
+ </div>
+ );
+}
+
// ---------------------------------------------------------------------------
// TimelineRowContent — the actual row component
// ---------------------------------------------------------------------------
diff --git a/apps/web/src/components/chat/timelineScrollAnchoring.test.tsx b/apps/web/src/components/chat/timelineScrollAnchoring.test.tsx
new file mode 100644
index 000000000..1bf82c47a
--- /dev/null
+++ b/apps/web/src/components/chat/timelineScrollAnchoring.test.tsx
@@ -0,0 +1,138 @@
+import { describe, expect, it } from "vite-plus/test";
+import { getAnchoredTurnMetrics, getRowBottom } from "./timelineScrollAnchoring";
+
+function buildState({
+ positions,
+ sizes,
+ scroll = 0,
+ scrollLength = 700,
+}: {
+ readonly positions: readonly number[];
+ readonly sizes: readonly number[];
+ readonly scroll?: number;
+ readonly scrollLength?: number;
+}) {
+ return {
+ data: positions.map((_, index) => index),
+ scroll,
+ scrollLength,
+ positionAtIndex: (index: number) => positions[index],
+ sizeAtIndex: (index: number) => sizes[index],
+ };
+}
+
+describe("timeline scroll anchoring", () => {
+ it("measures row bottoms from LegendList row position and size", () => {
+ const state = buildState({
+ positions: [0, 120],
+ sizes: [80, 40],
+ });
+
+ expect(getRowBottom(state, 1)).toBe(160);
+ });
+
+ it("treats the active turn as fitting when it fits above the composer", () => {
+ const state = buildState({
+ positions: [0, 300, 460],
+ sizes: [240, 80, 140],
+ scrollLength: 760,
+ });
+
+ const metrics = getAnchoredTurnMetrics({
+ state,
+ anchorIndex: 1,
+ composerOverlayHeight: 180,
+ anchorOffset: 16,
+ });
+
+ expect(metrics?.turnHeight).toBe(300);
+ expect(metrics?.usableViewportHeight).toBe(564);
+ expect(metrics?.overflowsUsableViewport).toBe(false);
+ expect(metrics?.targetScrollToRevealEnd).toBe(36);
+ expect(metrics?.scrollDeltaToRevealEnd).toBe(36);
+ });
+
+ it("targets the real row end instead of any temporary reserved tail", () => {
+ const state = buildState({
+ positions: [0, 1720, 1880],
+ sizes: [1600, 80, 120],
+ scroll: 1900,
+ scrollLength: 760,
+ });
+
+ const metrics = getAnchoredTurnMetrics({
+ state,
+ anchorIndex: 1,
+ composerOverlayHeight: 180,
+ anchorOffset: 16,
+ });
+
+ expect(metrics?.lastBottom).toBe(2000);
+ expect(metrics?.targetScrollToRevealEnd).toBe(1436);
+ expect(metrics?.scrollDeltaToRevealEnd).toBe(0);
+ });
+
+ it("reports overflow only for the current anchored turn", () => {
+ const state = buildState({
+ positions: [0, 900, 1180],
+ sizes: [800, 220, 300],
+ scroll: 900,
+ scrollLength: 760,
+ });
+
+ const metrics = getAnchoredTurnMetrics({
+ state,
+ anchorIndex: 1,
+ composerOverlayHeight: 180,
+ anchorOffset: 16,
+ });
+
+ expect(metrics?.turnHeight).toBe(580);
+ expect(metrics?.usableViewportHeight).toBe(564);
+ expect(metrics?.overflowsUsableViewport).toBe(true);
+ });
+
+ it("returns the minimal positive scroll delta needed to reveal the turn end", () => {
+ const state = buildState({
+ positions: [0, 900, 1180],
+ sizes: [800, 220, 360],
+ scroll: 900,
+ scrollLength: 760,
+ });
+
+ const metrics = getAnchoredTurnMetrics({
+ state,
+ anchorIndex: 1,
+ composerOverlayHeight: 180,
+ anchorOffset: 16,
+ });
+
+ expect(metrics?.lastBottom).toBe(1540);
+ expect(metrics?.visibleUsableBottom).toBe(1464);
+ expect(metrics?.scrollDeltaToRevealEnd).toBe(76);
+ });
+
+ it("subtracts composer height from usable viewport height", () => {
+ const state = buildState({
+ positions: [0, 300],
+ sizes: [120, 470],
+ scrollLength: 700,
+ });
+
+ const withoutComposer = getAnchoredTurnMetrics({
+ state,
+ anchorIndex: 1,
+ composerOverlayHeight: 0,
+ anchorOffset: 16,
+ });
+ const withComposer = getAnchoredTurnMetrics({
+ state,
+ anchorIndex: 1,
+ composerOverlayHeight: 220,
+ anchorOffset: 16,
+ });
+
+ expect(withoutComposer?.overflowsUsableViewport).toBe(false);
+ expect(withComposer?.overflowsUsableViewport).toBe(true);
+ });
+});
diff --git a/apps/web/src/components/chat/timelineScrollAnchoring.ts b/apps/web/src/components/chat/timelineScrollAnchoring.ts
new file mode 100644
index 000000000..48d3fc754
--- /dev/null
+++ b/apps/web/src/components/chat/timelineScrollAnchoring.ts
@@ -0,0 +1,78 @@
+export type TimelineScrollMode = "following-end" | "anchoring-new-turn" | "free-scrolling";
+
+export interface TimelineListMeasurementState {
+ readonly data: readonly unknown[];
+ readonly scroll: number;
+ readonly scrollLength: number;
+ readonly positionAtIndex: (index: number) => number | undefined;
+ readonly sizeAtIndex: (index: number) => number | undefined;
+}
+
+export interface AnchoredTurnMetrics {
+ readonly anchorTop: number;
+ readonly lastBottom: number;
+ readonly turnHeight: number;
+ readonly usableViewportHeight: number;
+ readonly visibleUsableBottom: number;
+ readonly overflowsUsableViewport: boolean;
+ readonly targetScrollToRevealEnd: number;
+ readonly scrollDeltaToRevealEnd: number;
+}
+
+export function getRowBottom(state: TimelineListMeasurementState, index: number): number | null {
+ const top = state.positionAtIndex(index);
+ const height = state.sizeAtIndex(index);
+ if (
+ typeof top !== "number" ||
+ typeof height !== "number" ||
+ !Number.isFinite(top) ||
+ !Number.isFinite(height)
+ ) {
+ return null;
+ }
+
+ return top + Math.max(1, height);
+}
+
+export function getAnchoredTurnMetrics({
+ state,
+ anchorIndex,
+ composerOverlayHeight,
+ anchorOffset,
+}: {
+ readonly state: TimelineListMeasurementState;
+ readonly anchorIndex: number;
+ readonly composerOverlayHeight: number;
+ readonly anchorOffset: number;
+}): AnchoredTurnMetrics | null {
+ if (state.data.length === 0) {
+ return null;
+ }
+
+ const boundedAnchorIndex = Math.max(0, Math.min(anchorIndex, state.data.length - 1));
+ const anchorTop = state.positionAtIndex(boundedAnchorIndex);
+ const lastBottom = getRowBottom(state, state.data.length - 1);
+ if (typeof anchorTop !== "number" || !Number.isFinite(anchorTop) || lastBottom === null) {
+ return null;
+ }
+
+ const usableViewportHeight = Math.max(
+ 0,
+ state.scrollLength - composerOverlayHeight - anchorOffset,
+ );
+ const turnHeight = Math.max(0, lastBottom - anchorTop);
+ const visibleUsableBottom = state.scroll + usableViewportHeight;
+ const targetScrollToRevealEnd = Math.max(0, lastBottom - usableViewportHeight);
+ const scrollDeltaToRevealEnd = Math.max(0, targetScrollToRevealEnd - state.scroll);
+
+ return {
+ anchorTop,
+ lastBottom,
+ turnHeight,
+ usableViewportHeight,
+ visibleUsableBottom,
+ overflowsUsableViewport: turnHeight > usableViewportHeight,
+ targetScrollToRevealEnd,
+ scrollDeltaToRevealEnd,
+ };
+}
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 8d7c462a7..ee959513d 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -192,10 +192,10 @@ importers:
dependencies:
'@callstack/liquid-glass':
specifier: ^0.7.1
'@clerk/expo':
specifier: 3.5.3-snapshot.v20260622234151
'@effect/atom-react':
specifier: 4.0.0-beta.78
version: 4.0.0-beta.78([email protected](patch_hash=c502bc684210b707dfceb87d8fe6ad6843395af6e19cfc02cd65854898bde2c5))([email protected])([email protected])
@@ -204,10 +204,10 @@ importers:
version: 0.4.2
'@expo/ui':
specifier: ~56.0.8
- version: 56.0.15(961c4aa6f32829b318e3c87ef20ad401)
+ version: 56.0.15(ab3f255d102c60ba0fd2bbe4e47ba584)
'@legendapp/list':
specifier: 3.2.0
'@noble/curves':
specifier: 'catalog:'
version: 1.9.1
@@ -219,7 +219,7 @@ importers:
version: 1.3.0-beta.5(patch_hash=7cb6da88544119adda056b2f46f43956f99326227732da0b345081e285a6c53a)(@shikijs/[email protected])([email protected]([email protected]))([email protected])
'@react-native-menu/menu':
specifier: ^2.0.0
'@shikijs/core':
specifier: 4.2.0
version: 4.2.0
@@ -240,7 +240,7 @@ importers:
version: link:../../packages/contracts
'@t3tools/mobile-markdown-text':
specifier: file:./modules/t3-markdown-text
- version: file:apps/mobile/modules/t3-markdown-text(f0ff241d48c23db461fff5d47e450578)
+ version: file:apps/mobile/modules/t3-markdown-text(e909ee9a8f7fbe234da80c739fca4984)
'@t3tools/mobile-review-diff-native':
specifier: file:./modules/t3-review-diff
version: file:apps/mobile/modules/t3-review-diff
@@ -261,40 +261,40 @@ importers:
version: 4.0.0-beta.78(patch_hash=c502bc684210b707dfceb87d8fe6ad6843395af6e19cfc02cd65854898bde2c5)
expo:
specifier: ^56.0.0
- version: 56.0.8(63f7aade424ad9e7b1154b679fa2a14d)
expo-asset:
specifier: ~56.0.15
expo-auth-session:
specifier: ~56.0.12
expo-build-properties:
specifier: ~56.0.15
version: 56.0.16([email protected])
expo-camera:
specifier: ~56.0.7
expo-clipboard:
specifier: ~56.0.3
expo-constants:
specifier: ~56.0.16
expo-crypto:
specifier: ~56.0.4
version: 56.0.4([email protected])
expo-dev-client:
specifier: ~56.0.16
expo-file-system:
specifier: ~56.0.7
expo-font:
specifier: ~56.0.5
expo-glass-effect:
specifier: ~56.0.4
expo-haptics:
specifier: ~56.0.3
version: 56.0.3([email protected])
@@ -303,19 +303,19 @@ importers:
version: 56.0.15([email protected])
expo-linking:
specifier: ~56.0.12
expo-network:
specifier: ~56.0.5
expo-notifications:
specifier: ~56.0.14
expo-paste-input:
specifier: ^0.1.15
expo-router:
specifier: ~56.2.7
- version: 56.2.8(5bfdf39b8f760e4dc2d5c3acffc97310)
+ version: 56.2.8(c021de11d02907bd585610408f5252e8)
expo-secure-store:
specifier: ~56.0.4
version: 56.0.4([email protected])
@@ -324,16 +324,16 @@ importers:
expo-symbols:
specifier: ~56.0.5
expo-updates:
specifier: ~56.0.17
expo-web-browser:
specifier: ~56.0.5
expo-widgets:
specifier: ~56.0.15
- version: 56.0.16(961c4aa6f32829b318e3c87ef20ad401)
+ version: 56.0.16(ab3f255d102c60ba0fd2bbe4e47ba584)
punycode:
specifier: ^2.3.1
version: 2.3.1
@@ -345,43 +345,43 @@ importers:
version: 19.2.3([email protected])
react-native:
specifier: 0.85.3
react-native-gesture-handler:
specifier: ~2.31.1
react-native-image-viewing:
specifier: ^0.2.2
react-native-keyboard-controller:
specifier: 1.21.7
react-native-nitro-markdown:
specifier: ^0.5.0
react-native-nitro-modules:
specifier: 0.35.9
- version: 0.35.9(patch_hash=825622aae63a8fb5b904f3c77908a0e216261d727ea171709f2c0b6088422675)([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected])([email protected])([email protected]))(@types/[email protected])([email protected])([email protected])([email protected]))([email protected])
+ version: 0.35.9(patch_hash=825622aae63a8fb5b904f3c77908a0e216261d727ea171709f2c0b6088422675)([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected])([email protected])([email protected]))([email protected])
react-native-reanimated:
specifier: 4.3.1
react-native-safe-area-context:
specifier: ~5.7.0
react-native-screens:
specifier: 4.25.2
react-native-shiki-engine:
specifier: ^0.3.12
react-native-svg:
specifier: 15.15.4
react-native-webview:
specifier: ^13.16.1
react-native-worklets:
specifier: 0.8.3
shiki:
specifier: 4.2.0
version: 4.2.0
@@ -390,7 +390,7 @@ importers:
version: 3.6.0
uniwind:
specifier: ^1.6.2
devDependencies:
'@effect/vitest':
specifier: 4.0.0-beta.78
@@ -11216,10 +11216,10 @@ snapshots:
'@bruits/[email protected]':
optional: true
dependencies:
react: 19.2.3
'@capsizecss/[email protected]':
dependencies:
@@ -11323,23 +11323,23 @@ snapshots:
electron-store: 8.2.0
react-dom: 19.2.6([email protected])
dependencies:
'@clerk/clerk-js': 6.21.0-snapshot.v20260622234151([email protected]([email protected]))([email protected])
'@clerk/react': 6.11.0-snapshot.v20260622234151([email protected]([email protected]))([email protected])
'@clerk/shared': 4.21.0-snapshot.v20260622234151([email protected]([email protected]))([email protected])
base-64: 1.0.0
- expo: 56.0.8(63f7aade424ad9e7b1154b679fa2a14d)
react: 19.2.3
tslib: 2.8.1
optionalDependencies:
expo-crypto: 56.0.4([email protected])
expo-secure-store: 56.0.4([email protected])
react-dom: 19.2.3([email protected])
@@ -11922,7 +11922,7 @@ snapshots:
'@expo-google-fonts/[email protected]': {}
dependencies:
'@expo/code-signing-certificates': 0.0.6
'@expo/config': 56.0.9([email protected])
@@ -11932,7 +11932,7 @@ snapshots:
'@expo/image-utils': 0.10.1([email protected])
'@expo/inline-modules': 0.0.10([email protected])
'@expo/json-file': 10.2.0
'@expo/metro': 56.0.0([email protected])([email protected])
'@expo/metro-config': 56.0.13(patch_hash=8cb08b5bb7051ed9d2dbe46a2c293c5a1e17f1bd6ddf30de27909e18c921ff46)([email protected])([email protected])([email protected])([email protected])
'@expo/metro-file-map': 56.0.3
@@ -11957,7 +11957,7 @@ snapshots:
connect: 3.7.0
debug: 4.4.3
dnssd-advertise: 1.1.4
- expo: 56.0.8(63f7aade424ad9e7b1154b679fa2a14d)
expo-server: 56.0.4
fetch-nodeshim: 0.4.10
getenv: 2.0.0
@@ -11983,8 +11983,8 @@ snapshots:
zod: 3.25.76
optionalDependencies:
- expo-router: 56.2.8(5bfdf39b8f760e4dc2d5c3acffc97310)
+ expo-router: 56.2.8(c021de11d02907bd585610408f5252e8)
transitivePeerDependencies:
- '@expo/dom-webview'
- '@expo/metro-runtime'
@@ -12046,18 +12046,18 @@ snapshots:
transitivePeerDependencies:
- supports-color
dependencies:
chalk: 4.1.2
optionalDependencies:
react: 19.2.3
dependencies:
- expo: 56.0.8(63f7aade424ad9e7b1154b679fa2a14d)
react: 19.2.3
dependencies:
@@ -12118,13 +12118,13 @@ snapshots:
- supports-color
- typescript
dependencies:
anser: 1.4.10
- expo: 56.0.8(63f7aade424ad9e7b1154b679fa2a14d)
react: 19.2.3
stacktrace-parser: 0.1.11
'@expo/[email protected](patch_hash=8cb08b5bb7051ed9d2dbe46a2c293c5a1e17f1bd6ddf30de27909e18c921ff46)([email protected])([email protected])([email protected])([email protected])':
@@ -12154,7 +12154,7 @@ snapshots:
postcss: 8.5.15
resolve-from: 5.0.0
optionalDependencies:
- expo: 56.0.8(63f7aade424ad9e7b1154b679fa2a14d)
transitivePeerDependencies:
- bufferutil
- supports-color
@@ -12172,14 +12172,14 @@ snapshots:
transitivePeerDependencies:
- supports-color
dependencies:
anser: 1.4.10
- expo: 56.0.8(63f7aade424ad9e7b1154b679fa2a14d)
pretty-format: 29.7.0
react: 19.2.3
stacktrace-parser: 0.1.11
whatwg-fetch: 3.6.20
optionalDependencies:
@@ -12254,14 +12254,14 @@ snapshots:
dependencies:
debug: 4.4.3
- expo: 56.0.8(63f7aade424ad9e7b1154b679fa2a14d)
expo-server: 56.0.4
react: 19.2.3
optionalDependencies:
- expo-router: 56.2.8(5bfdf39b8f760e4dc2d5c3acffc97310)
+ expo-router: 56.2.8(c021de11d02907bd585610408f5252e8)
react-dom: 19.2.3([email protected])
transitivePeerDependencies:
- supports-color
@@ -12276,18 +12276,18 @@ snapshots:
'@expo/[email protected]': {}
- '@expo/[email protected](961c4aa6f32829b318e3c87ef20ad401)':
+ '@expo/[email protected](ab3f255d102c60ba0fd2bbe4e47ba584)':
dependencies:
- expo: 56.0.8(63f7aade424ad9e7b1154b679fa2a14d)
react: 19.2.3
sf-symbols-typescript: 2.2.0
optionalDependencies:
'@babel/core': 7.29.7
react-dom: 19.2.3([email protected])
transitivePeerDependencies:
- '@types/react'
- '@types/react-dom'
@@ -12548,13 +12548,13 @@ snapshots:
dependencies:
jsbi: 4.3.2
dependencies:
react: 19.2.3
use-sync-external-store: 1.6.0([email protected])
optionalDependencies:
react-dom: 19.2.3([email protected])
dependencies:
@@ -13377,15 +13377,15 @@ snapshots:
prompts: 2.4.2
tinyexec: 1.2.4
dependencies:
react: 19.2.3
dependencies:
react: 19.2.3
'@react-native/[email protected]': {}
@@ -13445,7 +13445,7 @@ snapshots:
tinyglobby: 0.2.17
yargs: 17.7.2
dependencies:
'@react-native/dev-middleware': 0.85.3([email protected])([email protected])
debug: 4.4.3
@@ -13455,7 +13455,7 @@ snapshots:
metro-core: 0.84.4
semver: 7.8.5
optionalDependencies:
- '@react-native/metro-config': 0.85.3(@babel/[email protected])([email protected])([email protected])
+ '@react-native/metro-config': 0.85.3(@babel/[email protected])
transitivePeerDependencies:
- bufferutil
- supports-color
@@ -13503,7 +13503,7 @@ snapshots:
transitivePeerDependencies:
- supports-color
+ '@react-native/[email protected](@babel/[email protected])':
dependencies:
'@react-native/js-polyfills': 0.85.3
'@react-native/metro-babel-transformer': 0.85.3(@babel/[email protected])
@@ -13511,18 +13511,16 @@ snapshots:
metro-runtime: 0.84.4
transitivePeerDependencies:
- '@babel/core'
- - bufferutil
- supports-color
- - utf-8-validate
'@react-native/[email protected]': {}
dependencies:
invariant: 2.2.4
nullthrows: 1.1.1
react: 19.2.3
optionalDependencies:
'@types/react': 19.2.16
@@ -13907,15 +13905,15 @@ snapshots:
dependencies:
defer-to-connect: 2.0.1
- '@t3tools/mobile-markdown-text@file:apps/mobile/modules/t3-markdown-text(f0ff241d48c23db461fff5d47e450578)':
+ '@t3tools/mobile-markdown-text@file:apps/mobile/modules/t3-markdown-text(e909ee9a8f7fbe234da80c739fca4984)':
dependencies:
expo-haptics: 56.0.3([email protected])
react: 19.2.3
'@t3tools/mobile-review-diff-native@file:apps/mobile/modules/t3-review-diff': {}
@@ -14376,19 +14374,19 @@ snapshots:
babel-plugin-react-compiler: 1.0.0
dependencies:
'@testing-library/dom': 10.4.1
'@testing-library/user-event': 14.6.1(@testing-library/[email protected])
transitivePeerDependencies:
- bufferutil
- msw
- utf-8-validate
- vite
dependencies:
'@blazediff/core': 1.9.1
@@ -14397,7 +14395,7 @@ snapshots:
pngjs: 7.0.0
sirv: 3.0.2
tinyrainbow: 3.1.0
transitivePeerDependencies:
- bufferutil
@@ -15030,8 +15028,8 @@ snapshots:
react-refresh: 0.14.2
optionalDependencies:
'@babel/runtime': 7.29.7
- expo: 56.0.8(63f7aade424ad9e7b1154b679fa2a14d)
- expo-widgets: 56.0.16(961c4aa6f32829b318e3c87ef20ad401)
+ expo-widgets: 56.0.16(ab3f255d102c60ba0fd2bbe4e47ba584)
transitivePeerDependencies:
- '@babel/core'
- supports-color
@@ -15928,29 +15926,29 @@ snapshots:
dependencies:
- expo: 56.0.8(63f7aade424ad9e7b1154b679fa2a14d)
dependencies:
'@expo/image-utils': 0.10.1([email protected])
- expo: 56.0.8(63f7aade424ad9e7b1154b679fa2a14d)
react: 19.2.3
transitivePeerDependencies:
- supports-color
- typescript
dependencies:
expo-application: 56.0.3([email protected])
expo-crypto: 56.0.4([email protected])
invariant: 2.2.4
react: 19.2.3
transitivePeerDependencies:
- expo
- supports-color
@@ -15958,119 +15956,119 @@ snapshots:
dependencies:
'@expo/schema-utils': 56.0.1
- expo: 56.0.8(63f7aade424ad9e7b1154b679fa2a14d)
resolve-from: 5.0.0
semver: 7.8.5
dependencies:
barcode-detector: 3.2.0(@types/[email protected])
- expo: 56.0.8(63f7aade424ad9e7b1154b679fa2a14d)
react: 19.2.3
transitivePeerDependencies:
- '@types/emscripten'
dependencies:
- expo: 56.0.8(63f7aade424ad9e7b1154b679fa2a14d)
react: 19.2.3
dependencies:
'@expo/env': 2.3.0
- expo: 56.0.8(63f7aade424ad9e7b1154b679fa2a14d)
transitivePeerDependencies:
- supports-color
dependencies:
- expo: 56.0.8(63f7aade424ad9e7b1154b679fa2a14d)
dependencies:
- expo: 56.0.8(63f7aade424ad9e7b1154b679fa2a14d)
expo-dev-menu-interface: 56.0.1([email protected])
expo-manifests: 56.0.4([email protected])
expo-updates-interface: 56.0.2([email protected])
transitivePeerDependencies:
- react-native
dependencies:
'@expo/schema-utils': 56.0.1
- expo: 56.0.8(63f7aade424ad9e7b1154b679fa2a14d)
expo-manifests: 56.0.4([email protected])
dependencies:
- expo: 56.0.8(63f7aade424ad9e7b1154b679fa2a14d)
dependencies:
- expo: 56.0.8(63f7aade424ad9e7b1154b679fa2a14d)
expo-dev-menu-interface: 56.0.1([email protected])
dependencies:
- expo: 56.0.8(63f7aade424ad9e7b1154b679fa2a14d)
dependencies:
- expo: 56.0.8(63f7aade424ad9e7b1154b679fa2a14d)
fontfaceobserver: 2.3.0
react: 19.2.3
dependencies:
- expo: 56.0.8(63f7aade424ad9e7b1154b679fa2a14d)
react: 19.2.3
dependencies:
- expo: 56.0.8(63f7aade424ad9e7b1154b679fa2a14d)
dependencies:
- expo: 56.0.8(63f7aade424ad9e7b1154b679fa2a14d)
dependencies:
- expo: 56.0.8(63f7aade424ad9e7b1154b679fa2a14d)
expo-image-loader: 56.0.3([email protected])
dependencies:
- expo: 56.0.8(63f7aade424ad9e7b1154b679fa2a14d)
react: 19.2.3
dependencies:
invariant: 2.2.4
react: 19.2.3
transitivePeerDependencies:
- expo
- supports-color
dependencies:
- expo: 56.0.8(63f7aade424ad9e7b1154b679fa2a14d)
expo-json-utils: 56.0.0
@@ -16083,66 +16081,66 @@ snapshots:
- supports-color
- typescript
dependencies:
'@expo/expo-modules-macros-plugin': 0.0.9
invariant: 2.2.4
react: 19.2.3
optionalDependencies:
dependencies:
dependencies:
- expo: 56.0.8(63f7aade424ad9e7b1154b679fa2a14d)
react: 19.2.3
dependencies:
'@expo/image-utils': 0.10.1([email protected])
abort-controller: 3.0.0
badgin: 1.2.3
- expo: 56.0.8(63f7aade424ad9e7b1154b679fa2a14d)
expo-application: 56.0.3([email protected])
react: 19.2.3
transitivePeerDependencies:
- supports-color
- typescript
dependencies:
- expo: 56.0.8(63f7aade424ad9e7b1154b679fa2a14d)
react: 19.2.3
- [email protected](5bfdf39b8f760e4dc2d5c3acffc97310):
+ [email protected](c021de11d02907bd585610408f5252e8):
dependencies:
'@expo/schema-utils': 56.0.1
- '@expo/ui': 56.0.15(961c4aa6f32829b318e3c87ef20ad401)
+ '@expo/ui': 56.0.15(ab3f255d102c60ba0fd2bbe4e47ba584)
'@radix-ui/react-slot': 1.2.4(@types/[email protected])([email protected])
'@testing-library/jest-dom': 6.9.1
'@testing-library/user-event': 14.6.1(@testing-library/[email protected])
client-only: 0.0.1
color: 4.2.3
debug: 4.4.3
escape-string-regexp: 4.0.0
- expo: 56.0.8(63f7aade424ad9e7b1154b679fa2a14d)
expo-server: 56.0.4
fast-deep-equal: 3.1.3
invariant: 2.2.4
nanoid: 3.3.12
@@ -16150,18 +16148,18 @@ snapshots:
react: 19.2.3
react-fast-compare: 3.2.2
react-is: 19.2.7
- react-native-drawer-layout: 4.2.4(0e9729601f58a7a7ae26c76fe6017455)
server-only: 0.0.1
sf-symbols-typescript: 2.2.0
shallowequal: 1.1.0
optionalDependencies:
react-dom: 19.2.3([email protected])
transitivePeerDependencies:
- '@babel/core'
- '@testing-library/dom'
@@ -16173,7 +16171,7 @@ snapshots:
dependencies:
- expo: 56.0.8(63f7aade424ad9e7b1154b679fa2a14d)
@@ -16181,7 +16179,7 @@ snapshots:
dependencies:
'@expo/config-plugins': 56.0.8([email protected])
'@expo/image-utils': 0.10.1([email protected])
- expo: 56.0.8(63f7aade424ad9e7b1154b679fa2a14d)
xml2js: 0.6.0
transitivePeerDependencies:
- supports-color
@@ -16189,20 +16187,20 @@ snapshots:
dependencies:
'@expo-google-fonts/material-symbols': 0.4.38
- expo: 56.0.8(63f7aade424ad9e7b1154b679fa2a14d)
react: 19.2.3
sf-symbols-typescript: 2.2.0
dependencies:
- expo: 56.0.8(63f7aade424ad9e7b1154b679fa2a14d)
dependencies:
'@expo/code-signing-certificates': 0.0.6
'@expo/plist': 0.7.0
@@ -16210,7 +16208,7 @@ snapshots:
arg: 4.1.3
chalk: 4.1.2
debug: 4.4.3
- expo: 56.0.8(63f7aade424ad9e7b1154b679fa2a14d)
expo-eas-client: 56.0.1
expo-manifests: 56.0.4([email protected])
expo-structured-headers: 56.0.0
@@ -16220,25 +16218,25 @@ snapshots:
ignore: 5.3.2
nullthrows: 1.1.1
react: 19.2.3
resolve-from: 5.0.0
optionalDependencies:
transitivePeerDependencies:
- supports-color
dependencies:
- expo: 56.0.8(63f7aade424ad9e7b1154b679fa2a14d)
- [email protected](961c4aa6f32829b318e3c87ef20ad401):
+ [email protected](ab3f255d102c60ba0fd2bbe4e47ba584):
dependencies:
'@expo/plist': 0.7.0
- '@expo/ui': 56.0.15(961c4aa6f32829b318e3c87ef20ad401)
- expo: 56.0.8(63f7aade424ad9e7b1154b679fa2a14d)
+ '@expo/ui': 56.0.15(ab3f255d102c60ba0fd2bbe4e47ba584)
react: 19.2.3
transitivePeerDependencies:
- '@babel/core'
- '@types/react'
@@ -16247,37 +16245,37 @@ snapshots:
- react-native-reanimated
- react-native-worklets
- [email protected](63f7aade424ad9e7b1154b679fa2a14d):
dependencies:
'@babel/runtime': 7.29.7
'@expo/config': 56.0.9([email protected])
'@expo/config-plugins': 56.0.8([email protected])
'@expo/fingerprint': 0.19.3
'@expo/local-build-cache-provider': 56.0.8([email protected])
'@expo/metro': 56.0.0([email protected])([email protected])
'@expo/metro-config': 56.0.13(patch_hash=8cb08b5bb7051ed9d2dbe46a2c293c5a1e17f1bd6ddf30de27909e18c921ff46)([email protected])([email protected])([email protected])([email protected])
'@ungap/structured-clone': 1.3.1
expo-keep-awake: 56.0.3([email protected])([email protected])
expo-modules-autolinking: 56.0.14([email protected])
pretty-format: 29.7.0
react: 19.2.3
react-refresh: 0.14.2
whatwg-url-minimum: 0.1.2
optionalDependencies:
react-dom: 19.2.3([email protected])
transitivePeerDependencies:
- '@babel/core'
- bufferutil
@@ -18698,102 +18696,102 @@ snapshots:
transitivePeerDependencies:
- supports-color
- [email protected](0e9729601f58a7a7ae26c76fe6017455):
dependencies:
color: 4.2.3
react: 19.2.3
use-latest-callback: 0.2.6([email protected])
dependencies:
'@egjs/hammerjs': 2.0.17
'@types/react-test-renderer': 19.1.0
hoist-non-react-statics: 3.3.2
invariant: 2.2.4
react: 19.2.3
dependencies:
react: 19.2.3
dependencies:
react: 19.2.3
dependencies:
react: 19.2.3
dependencies:
react: 19.2.3
- react-native-nitro-modules: 0.35.9(patch_hash=825622aae63a8fb5b904f3c77908a0e216261d727ea171709f2c0b6088422675)([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected])([email protected])([email protected]))(@types/[email protected])([email protected])([email protected])([email protected]))([email protected])
+ react-native-nitro-modules: 0.35.9(patch_hash=825622aae63a8fb5b904f3c77908a0e216261d727ea171709f2c0b6088422675)([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected])([email protected])([email protected]))([email protected])
optionalDependencies:
+ [email protected](patch_hash=825622aae63a8fb5b904f3c77908a0e216261d727ea171709f2c0b6088422675)([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected])([email protected])([email protected]))([email protected]):
dependencies:
react: 19.2.3
dependencies:
react: 19.2.3
semver: 7.8.5
dependencies:
react: 19.2.3
dependencies:
react: 19.2.3
react-freeze: 1.0.4([email protected])
warn-once: 0.1.1
dependencies:
'@shikijs/types': 4.3.0
'@shikijs/vscode-textmate': 10.0.2
react: 19.2.3
dependencies:
css-select: 5.2.2
css-tree: 1.1.3
react: 19.2.3
warn-once: 0.1.1
dependencies:
whatwg-url-without-unicode: 8.0.0-3
dependencies:
escape-string-regexp: 4.0.0
invariant: 2.2.4
react: 19.2.3
dependencies:
'@babel/core': 7.29.7
'@babel/plugin-transform-arrow-functions': 7.29.7(@babel/[email protected])
@@ -18805,23 +18803,23 @@ snapshots:
'@babel/plugin-transform-template-literals': 7.29.7(@babel/[email protected])
'@babel/plugin-transform-unicode-regex': 7.29.7(@babel/[email protected])
'@babel/preset-typescript': 7.29.7(@babel/[email protected])
- '@react-native/metro-config': 0.85.3(@babel/[email protected])([email protected])([email protected])
+ '@react-native/metro-config': 0.85.3(@babel/[email protected])
convert-source-map: 2.0.0
react: 19.2.3
semver: 7.8.5
transitivePeerDependencies:
- supports-color
dependencies:
'@react-native/assets-registry': 0.85.3
'@react-native/codegen': 0.85.3(@babel/[email protected])
- '@react-native/community-cli-plugin': 0.85.3(@react-native/[email protected](@babel/[email protected])([email protected])([email protected]))([email protected])([email protected])
+ '@react-native/community-cli-plugin': 0.85.3(@react-native/[email protected](@babel/[email protected]))([email protected])([email protected])
'@react-native/gradle-plugin': 0.85.3
'@react-native/js-polyfills': 0.85.3
'@react-native/normalize-colors': 0.85.3
abort-controller: 3.0.0
anser: 1.4.10
ansi-regex: 5.0.1
@@ -19870,14 +19868,14 @@ snapshots:
dependencies:
'@tailwindcss/node': 4.2.1
'@tailwindcss/oxide': 4.2.1
culori: 4.0.2
lightningcss: 1.30.1
react: 19.2.3
tailwindcss: 4.3.0
@@ -20001,8 +19999,8 @@ snapshots:
dependencies:
'@oxc-project/types': 0.136.0
'@oxlint/plugins': 1.68.0
'@vitest/expect': 4.1.9
'@vitest/pretty-format': 4.1.9
@@ -20015,7 +20013,7 @@ snapshots:
oxlint-tsgolint: 0.23.0
optionalDependencies:
'@voidzero-dev/vite-plus-darwin-arm64': 0.2.1
'@voidzero-dev/vite-plus-darwin-x64': 0.2.1
@@ -20061,7 +20059,7 @@ snapshots:
optionalDependencies:
dependencies:
'@vitest/expect': 4.1.9
@@ -20085,7 +20083,7 @@ snapshots:
why-is-node-running: 2.3.0
optionalDependencies:
'@types/node': 24.12.4
transitivePeerDependencies:
- msw