Scrolling a long thread stutters after loading earlier turns (timeline measure pass and per-scroll message re-derivation)
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- react, typescript
- Lĩnh vực
- frontend, performance
Hướng nghiên cứu
Start by locating useTimelineFollow and the legend-list measure pass identified in the CPU trace (W$ in the generated bundle); the issue gives no source file paths, so search the repository for those entry points. Profile scrolling after repeatedly loading earlier turns and inspect the layout effects and row derivation they trigger. Done means the long-thread scroll no longer repeatedly measures every mounted container or rebuilds unchanged message rows, with the initial-page behavior preserved.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
What happened
Scrolling the chat timeline of a long thread (about 3,250 items, 318 turns) stutters on the Windows desktop app. The jank appears after "Load earlier turns" has been used. At the initial page the same thread scrolls smoothly.
Diagnosis
Repro in the web client served by the thread's own server, headless Chromium at 1600x1000, with a scripted 8 s rAF scroll sweep on .messages-timeline-scroll:
| State | Scroll height | DOM nodes | p50 | p99 | Max frame | Frames >50 ms |
|---|---|---|---|---|---|---|
| Initial page | 3,812 px | 2,053 | 16.7 ms | 17.2 ms | 67 ms | 1 |
| After 8x "Load earlier turns" | ~197,000 px | ~3,000 | 16.7 ms | 83 ms | 200 ms | 9 |
The DOM stays near 3,000 nodes because the list is virtualized, so the cost scales with the amount of loaded history rather than with the DOM.
The CPU trace for the loaded state (8 s of scrolling) shows:
- 14,980 forced style and layout flushes totalling 1.13 s, plus 640 ms of self time in
getBoundingClientRect. All of it comes from the legend-list measure pass (r0->W$in main-*.js), which runs from layout effects during commits and measures every mounted container. InW$,getBoundingClientRectis followed byoffsetWidth/offsetHeightand sometimesgetComputedStyle. - Scroll-time work in useTimelineFollow-*.js that rebuilds message rows:
formatMessagetakes 218 ms,encodeabout 116 ms, andlt/Q/ytin session-logic run underLp/gh/Dh. This re-derivation runs while scrolling, even though the thread is idle and nothing new is arriving. - Long Animation Frame attribution names
DOMWebSocket.onmessageas the entry point for most long frames (2.45 s), because the runtime picks up work queued behind socket messages. The handler itself takes under 20 ms; the cost is the rendering work above.
Rendering itself is small: about 300 ms in the render phase and 190 ms in paint.
Caveat: headless Chromium rasterizes in software, so absolute frame times are higher than in the desktop app. The layout and JS costs above are CPU-side and carry over.
Steps to reproduce
- Open a thread with a few thousand timeline items.
- Click "Load earlier turns" until a few hundred thousand px of history is loaded.
- Scroll up and down with the wheel or trackpad.
Version
Desktop app 0.1.11-nightly.20261119.4954 (Windows). The thread lives on a linked Linux environment that runs 0.1.11-nightly.20261119.4941, and the headless repro used that server's web client.
Environment
Windows 11 Pro 26300, Ryzen 7 5800X, 128 GB RAM, RTX 3080 Ti, 60 Hz. The machine was idle during the repro (no process above about one core of 16, GPU 3D under 4%).
Evidence
Local scroll traces, LoAF summaries and the CPU trace are available on request.
Workaround
Switch away from the thread and back; it reopens at the first page, which scrolls smoothly.
Related
- #13925: the same symptom on the Android app, which has a separate native feed. That report says web and desktop are smooth, which no longer holds once older turns are loaded.
- #12689: Windows desktop renderer stalls from synchronous topology IPC. This repro ran in a browser with no
desktopBridge, so that path is excluded here and may add to it on desktop. This desktop'sdesktop.trace.ndjsonshows 4,111sendSynccalls in 8.3 h, with handlers at a 1.6 ms maximum. - #37639: a forced layout from equations when a thread opens; a different trigger.
- #22350: iOS LegendList
scrollBycorrections; this one is about scroll position, not CPU.
Agent: Claude Code (Opus 5.5), following the t3 triage playbook.
- Ngôn ngữ chính
- TypeScript
- Star
- 24.8k
- Fork
- 6.4k
- Merge trung bình
- 4 giờ 29 phút
- Pull request đã merge (30 ngày)
- 488
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của pingdotgg/t3code
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
needs more info
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
pingdotgg/t3code#39400 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: Wrapped PR titles lose bottom padding in the thread details panelCó thể đã có người làm @iamdatvt94 đã nhận 1 ngày trước. Đang mởbug needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của pingdotgg/t3code
Issue tương tự
-
area:plugins kind:bug priority:p2 ready
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Escaped `*` followed by `*` (`\**`) never matchesCó thể đã có người làm @bardrop đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 71/100
editorconfig/editorconfig-core-js#172 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
vega/vega-webgpu#40 ·
-
Adjust break point sizingĐang mởtype: bug 🐛
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 63/100
puckeditor/puck#1929 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
compression() compresses every response at Brotli quality 11Có thể đã có người làm @staylor đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày