Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): keep Agents panel scroll position per thread #14525

Closedf4llenz(GitHub profile, opens in a new tab)wants to merge 6 commits intomain fromrefs/pull/14525/headopened View on GitHub

Showing 4 changed files with 205 additions and 0 deletions (loading 2).

x
0 of 4 viewed, 4 left
5 additions and 0 deletionsapps/web/src/components/ui/scroll-area.tsxModified
View file
@@ -1,6 +1,7 @@
"use client";
​
import { ScrollArea as ScrollAreaPrimitive } from "@base-ui/react/scroll-area";
+import type { Ref } from "react";
​
import { cn } from "~/lib/utils";
​
@@ -31,6 +32,7 @@
chainVerticalScroll = false,
radius = "inherit",
viewportTabIndex,
+ viewportRef,
...props
}: ScrollAreaPrimitive.Root.Props & {
scrollFade?: boolean;
@@ -44,6 +46,8 @@
radius?: "inherit" | "none";
/** Override Base UI's focusable viewport when focusable descendants provide scroll access. */
viewportTabIndex?: number;
+ /** The element that actually scrolls, for callers that read or restore its offset. */
+ viewportRef?: Ref<HTMLDivElement>;
}) {
return (
<ScrollAreaPrimitive.Root
@@ -66,6 +70,7 @@
hideScrollbars &&
"[-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",