@devries-cameron20 / t3code Mirror · read-only / commits / e2f164d6bb
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 14:45 UTC

fix(web): let subagent lists pass scrolling to the details panel (#28968)

Co-authored-by: maria-rcks <maria@kuuro.net> Co-authored-by: Julius Marminge <julius0216@outlook.com>

Alb11747 committed Nov 14, 2026 at 07:44 UTC e2f164d6bb7088ce5ad70f96464b276b6471a59c
2 files changed +44 -1
apps/web/src/components/chat/ThreadRelationshipsControl.browser.test.tsx
+43
@@ -1,3 +1,4 @@
1 +import "~/index.css";
2 import * as DateTime from "effect/DateTime";
3 import { EnvironmentId, NodeId, ThreadId } from "@t3tools/contracts";
4 import * as Cause from "effect/Cause";
@@ -58,6 +59,7 @@ vi.mock(import("../../state/use-atom-command"), () => ({
59
60 import { render } from "../../../test/render";
61 import { makeThreadProjectionFixture } from "../../test-fixtures";
62 +import { ScrollArea } from "../ui/scroll-area";
63 import { ToastProvider } from "../ui/toast";
64 import { ThreadRelationshipsPanel } from "./ThreadRelationshipsControl";
65
@@ -406,3 +408,44 @@ it("hides a deleted fork and keeps unloaded and archived forks with their curren
408 await expect.element(screen.getByText("Archived fork", { exact: true })).toBeVisible();
409 await expect.element(screen.getByText("deleted-fork", { exact: true })).not.toBeInTheDocument();
410 });
411 +
412 +it.each([1, 18])("continues scrolling the panel past a list of %i subagents", async (count) => {
413 + setup();
414 + const projection = makeThreadProjectionFixture();
415 + state.projection = projection;
416 + state.relatedShells = Array.from({ length: count }, (_, index) => ({
417 + id: ThreadId.make(`subagent-${index}`),
418 + title: `Subagent ${index}`,
419 + forkedFrom: null,
420 + lineage: { parentThreadId: projection.thread.id, relationshipToParent: "subagent" },
421 + activityRunStatus: "running",
422 + status: "running",
423 + }));
424 + await using screen = await render(
425 + <div data-testid="panel" style={{ height: 320, width: 280 }}>
426 + <ScrollArea>
427 + <ThreadRelationshipsPanel
428 + environmentId={environmentId}
429 + threadId={projection.thread.id}
430 + showLineage
431 + showSideChats
432 + />
433 + <div style={{ height: 600 }} />
434 + </ScrollArea>
435 + </div>,
436 + );
437 + if (count > 6) {
438 + await screen.getByRole("button", { name: "Show 12 more" }).click();
439 + await expect.element(screen.getByText("Subagent 17", { exact: true })).toBeInTheDocument();
440 + }
441 + const list = screen.getByRole("list", { name: "Related threads" }).element();
442 + const viewport = screen
443 + .getByTestId("panel")
444 + .element()
445 + .querySelector<HTMLElement>("[data-slot=scroll-area-viewport]")!;
446 + list.scrollTop = list.scrollHeight;
447 + if (count > 6) expect(list.scrollTop).toBeGreaterThan(0);
448 + viewport.scrollTop = 0;
449 + await userEvent.wheel(list, { delta: { y: 300 } });
450 + await vi.waitFor(() => expect(viewport.scrollTop).toBeGreaterThan(0));
451 +});
apps/web/src/components/chat/ThreadRelationshipsControl.tsx
+1 -1
@@ -118,7 +118,7 @@ function ThreadLineageRowList(props: {
118 {/* ScrollArea's max-height viewport measures badly inside this scrolling panel. */}
119 <ul
120 aria-label="Related threads"
121 - className="m-0 max-h-[13.5rem] list-none overflow-y-auto overscroll-contain p-0 has-data-workflow-expanded:max-h-[min(28rem,55dvh)]"
121 + className="m-0 max-h-[13.5rem] list-none overflow-y-auto p-0 has-data-workflow-expanded:max-h-[min(28rem,55dvh)]"
122 >
123 {props.children}
124 </ul>