@devries-cameron20 / t3code-1 / commits / fa3cccc3f9
Fork 0

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

fix message scrolling and update todo

Theo Browne committed Feb 13, 2026 at 18:46 UTC fa3cccc3f9ec880d0054f1f4f14f0fe7880185d3
2 files changed +11 -3
TODO.md
+2 -2
@@ -12,5 +12,5 @@
12 - [x] Reduce noise of tool calls (combine "command run" and "command completed", make tool calls a "box" with limited # of calls shown at a time, etc)
13 - [ ] Insta focus input on new thread creation
14 - [ ] Disable "streaming" (wait until whole paragraph/step finishes before showing it
15 -- [ ] Making new thread should auto-focus input box
16 -- [ ] Threads should be scrolled to bottom on open (they currently start near top and "scroll down" after rendering, it's jank)
15 +- [x] Making new thread should auto-focus input box
16 +- [x] Threads should be scrolled to bottom on open (they currently start near top and "scroll down" after rendering, it's jank)
apps/web/src/components/ChatView.tsx
+9 -1
@@ -13,6 +13,7 @@ import {
13 type KeyboardEvent,
14 useCallback,
15 useEffect,
16 + useLayoutEffect,
17 useMemo,
18 useRef,
19 useState,
@@ -131,6 +132,7 @@ export default function ChatView() {
132 const [expandedWorkGroups, setExpandedWorkGroups] = useState<Record<string, boolean>>({});
133 const [nowTick, setNowTick] = useState(() => Date.now());
134 const [terminalFocusRequestId, setTerminalFocusRequestId] = useState(0);
135 + const messagesScrollRef = useRef<HTMLDivElement>(null);
136 const messagesEndRef = useRef<HTMLDivElement>(null);
137 const textareaRef = useRef<HTMLTextAreaElement>(null);
138 const composerImagesRef = useRef<ComposerImageAttachment[]>([]);
@@ -345,6 +347,12 @@ export default function ChatView() {
347 // Auto-scroll on new messages
348 const messageCount = activeThread?.messages.length ?? 0;
349 const workLogCount = workLogEntries.length;
350 + useLayoutEffect(() => {
351 + if (!activeThread?.id) return;
352 + const scrollContainer = messagesScrollRef.current;
353 + if (!scrollContainer) return;
354 + scrollContainer.scrollTop = scrollContainer.scrollHeight;
355 + }, [activeThread?.id]);
356 useEffect(() => {
357 messagesEndRef.current?.scrollIntoView({ behavior: "smooth" });
358 }, [messageCount]);
@@ -1014,7 +1022,7 @@ export default function ChatView() {
1022 )}
1023
1024 {/* Messages */}
1017 - <div className="min-h-0 flex-1 overflow-y-auto px-5 py-4">
1025 + <div ref={messagesScrollRef} className="min-h-0 flex-1 overflow-y-auto px-5 py-4">
1026 {activeThread.messages.length === 0 && !isWorking ? (
1027 <div className="flex h-full items-center justify-center">
1028 <p className="text-sm text-muted-foreground/30">