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 25, 11:00 UTC
refactor: remove redundant workLogCount stick-to-bottom effect
timelineEntries is derived from workLogEntries; the timelineEntries effect already runs when work log changes. Dropped duplicate effect and unused workLogCount variable. Made-with: Cursor
Julius Marminge committed
Mar 2, 2026 at 10:10 UTC
5c0961431909f83536790677f46b6a08dadb3434
1 file changed
-6
apps/web/src/components/ChatView.tsx
-6
@@ -1284,7 +1284,6 @@ export default function ChatView({ threadId }: ChatViewProps) {
1284
1285
// Auto-scroll on new messages
1286
const messageCount = timelineMessages.length;
1287
- const workLogCount = workLogEntries.length;
1287
const scrollMessagesToBottom = useCallback((behavior: ScrollBehavior = "auto") => {
1288
const scrollContainer = messagesScrollRef.current;
1289
if (!scrollContainer) return;
@@ -1354,11 +1353,6 @@ export default function ChatView({ threadId }: ChatViewProps) {
1353
if (!shouldAutoScrollRef.current) return;
1354
scheduleStickToBottom();
1355
}, [messageCount, scheduleStickToBottom]);
1357
- useEffect(() => {
1358
- if (phase !== "running") return;
1359
- if (!shouldAutoScrollRef.current) return;
1360
- scheduleStickToBottom();
1361
- }, [phase, scheduleStickToBottom, workLogCount]);
1356
useEffect(() => {
1357
if (phase !== "running") return;
1358
if (!shouldAutoScrollRef.current) return;