Skip to content

fix(web): threads open at the newest message, not thousands of pixels above it - #19663

Merged
juliusmarminge merged 4 commits into
mainfrom
t3/fix-thread-scroll-resume
Oct 19, 2026
Merged

juliusmarminge merged 4 commits into
mainfrom
t3/fix-thread-scroll-resume

Conversation

@t3dotgg

@t3dotgg t3dotgg commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

A long thread opened from an empty or loading pane could stop well above its newest message. Our restoration scroll replaced LegendList’s measured initial end target with an estimated one.

The timeline now records the thread on which a list instance first mounted and leaves that initial end target intact. Saved reading positions and switches that reuse an existing list retain their restoration behavior.

Original fix by @t3dotgg in #19663, building on @bompus’s investigation. Contributor commits and credit are preserved.

Verification:

  • One PR-added regression retained (1→1) in the existing MessagesTimeline.browser.test.tsx; the existing reading-position test also covers reopening and thread switches. Removing the fix makes cold entry stop 20,912px above the end. Final focused suites: 72 browser and 205 unit tests passed (277 total).
  • Scoped web typecheck, targeted lint, formatting and diff checks passed.
  • Independent Claude Opus 5.5 and GPT-6 Sol full-diff review: two rounds; first round identified a return-to-end coverage gap. The existing cold-entry test now covers it and fails 2,000px above the end when the identity clearing is removed. Final round: no blockers.
  • Integrated Linux Chromium web app with synthetic stored messages at 1280×800: main stopped 2,152px above the end; this head reached 0px and remained there across 30 layout frames. A manual reading position restored the identical paragraph and pixel offset after switching threads; an end-position switch also returned to 0px. DejaVu Sans used for both captures.

Before (main):

Before: cold entry stops above the newest message

After:

After: cold entry reaches the newest message

Cold-entry recording: Before · After

The settled/snoozed empty-footer variant was not verified live.

Not verified: macOS, Windows, iOS, Android or Electron desktop. Native mobile has a separate timeline and is outside this fix. Safari/WebKit and Electron remain human checks.

Tests: GPT-6 Astra; implementation: GPT-6.1 Sol; adversarial reviews: Claude Opus 5.5 and GPT-6 Sol. Codex and Claude Code harnesses, delegated through T3 Code.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Oct 14, 2026
@juliusmarminge juliusmarminge added the macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews label Oct 14, 2026
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Oct 14, 2026
@macroscopeapp

macroscopeapp Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 714165e

Macroscope's review found this PR approvable — This is a focused web bug fix that preserves measured initial scroll positioning without changing saved-position behavior, with targeted browser regression coverage. Its runtime impact is localized to thread opening and reuse, with no sensitive, schema, deployment, or static-analysis changes.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Path: .coderabbit.config.ts
  • Review profile: CHILL
  • Plan: Team
  • Run ID: dba9fa51-ad7d-4eae-9679-2a2359190d53
📥 Commits

Reviewing files that changed from the base of the PR and between bc7efe2 and 714165e.

📒 Files selected for processing: 2
  • apps/web/src/components/chat/MessagesTimeline.browser.test.tsx
  • apps/web/src/components/chat/MessagesTimeline.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.

📝 Walkthrough

ConversationTimeline tracks the thread associated with its list and skips end scrolling when the list is already associated with that thread. Browser tests cover end-position and saved-offset restoration after loading messages, reopening the chat, and switching threads.

Changes: Thread-aware timeline scrolling

Layer / File(s) Summary
Track list identity and restore positions
apps/web/src/components/chat/MessagesTimeline.tsx, apps/web/src/components/chat/MessagesTimeline.browser.test.tsx
The timeline records the thread identity associated with its list and skips scrollToEnd when that list is already associated with the current thread. Browser tests cover reaching the newest message after an empty timeline, reopening the chat, switching threads, and restoring a saved offset.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: maria-rcks, juliusmarminge

Merge Risk: ⚪ Minimal · up to 71416

Long threads should now open at the newest message instead of stopping far above it. Saved reading positions and thread switches keep their existing behavior. No actionable merge-blocking risk remains.

Pre-merge checks: Passed 4
Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title clearly and concisely describes the primary fix: threads now open at the newest message instead of far above it. It uses a valid conventional commit format.
Description check Passed The description clearly explains the problem, implementation, verification results, test coverage, screenshots, recordings, and unverified platforms. It does not use the template headings and does not…
Full details: Description check

Explanation

The description clearly explains the problem, implementation, verification results, test coverage, screenshots, recordings, and unverified platforms. It does not use the template headings and does not explicitly document maintainer approval or explain why approval was unnecessary, so the Scope and approval section could be improved.

✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 5.0 KiB 5.0 KiB 0 B (0.0%) 6.8 KiB ✅
Codex Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅
Codex Live turn WebSocket wire 1.2 KiB 1.2 KiB 0 B (0.0%) 2.0 KiB ✅
Codex Live turn WebSocket decoded 20.9 KiB 20.9 KiB 0 B (0.0%) 29.3 KiB ✅
Codex Live turn messages 2 2 0 (0.0%) 8 ✅
Claude Total thread wire 5.0 KiB 5.0 KiB −24 B (−0.5%) 6.8 KiB ✅
Claude Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅
Claude Live turn WebSocket wire 1.2 KiB 1.2 KiB −24 B (−2.0%) 2.0 KiB ✅
Claude Live turn WebSocket decoded 21.2 KiB 21.2 KiB −41 B (−0.2%) 29.3 KiB ✅
Claude Live turn messages 2 1 −1 (−50.0%) 8 ✅

Baseline: 40a7908 · PR result: 34709d2 · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 108.5 KiB
  • Claude decoded thread snapshot: 108.8 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

When the timeline list mounted fresh for a thread, the restore effect's
scrollToEnd replaced LegendList's initialScrollAtEnd, which keeps
retargeting the end while rows measure. The thread stopped at the
estimated end, often thousands of pixels above the newest message.
Skip that call when the list mounted for this thread. A list reused
across a thread switch still scrolls to the end.

Takes over #18074.

Co-authored-by: Aaron Queen <bompus@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@t3dotgg
t3dotgg force-pushed the t3/fix-thread-scroll-resume branch from 34709d2 to bc7efe2 Compare October 17, 2026 23:49
@macroscopeapp
macroscopeapp Bot dismissed their stale review October 17, 2026 23:49

Dismissing prior approval to re-evaluate bc7efe2

macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Oct 17, 2026
AdEx-Partners-DE added a commit to AdEx-Partners-DE/t3code that referenced this pull request Oct 19, 2026
Upstream pingdotgg#20402 made MessagesTimeline compile by keeping the list identity
in state and building rows with useIncrementalTimelineRows. The fork kept
its older version of those parts (it had adopted the open upstream pingdotgg#19663,
which changes the same code), so the compiler skipped the whole file:
refs read during render in five places and one memo it could not keep.

Ported from nightly 3315: the list identity lives in state, the latest-run
effect remembers which list its previous run belonged to, rows come from
useIncrementalTimelineRows, handoff runs and stable rows are held in state,
and the video attachment asset follows only the fields it reads. The fork's
own fields (unreachableRevertTurnCounts, remembered disclosures) stay.

Fork rank 0bq.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@juliusmarminge juliusmarminge self-assigned this Oct 19, 2026
@juliusmarminge

Copy link
Copy Markdown
Member

Taking over this one. I will preserve saved reading positions, verify the cold-entry fix against current main, and push the focused update here.

@macroscopeapp
macroscopeapp Bot dismissed their stale review October 19, 2026 03:18

Dismissing prior approval to re-evaluate 714165e

@juliusmarminge
juliusmarminge merged commit a0fd206 into main Oct 19, 2026
30 of 31 checks passed
@juliusmarminge
juliusmarminge deleted the t3/fix-thread-scroll-resume branch October 19, 2026 18:07
Pipyakas pushed a commit to Pipyakas/t3code that referenced this pull request Oct 19, 2026
… above it (pingdotgg#19663)

Co-authored-by: Aaron Queen <bompus@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
(cherry picked from commit a0fd206)
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Oct 19, 2026
## What's Changed
* fix(mobile): settings no longer tell you to update when you're up to date by @shivamhwp in pingdotgg/t3code#21688
* test(web): fix the workflow script test that times out on busy CI runners by @shivamhwp in pingdotgg/t3code#21699
* fix(mobile): a file shared into a new task shows in the composer before you send by @shivamhwp in pingdotgg/t3code#21659
* fix(desktop): a cold WSL distro gets 30 seconds to boot instead of 10 by @SunkenInTime in pingdotgg/t3code#21070
* fix(web): detect software keyboard before handling composer Enter by @Yash-Singh1 in pingdotgg/t3code#21763
* fix(mobile): the Git sheet uses the standard list rows by @juliusmarminge in pingdotgg/t3code#21785
* fix(server): changed files keep their real paths for renames and non-ASCII names by @Atharvsinh-codez in pingdotgg/t3code#20175
* fix(server): a message promoted into a stopping run stays queued by @lbgos in pingdotgg/t3code#16926
* perf(mobile): streaming re-renders less on the open thread screen by @juliusmarminge in pingdotgg/t3code#20963
* feat(usage): show even-pace marks on Limits bars by @flamboh in pingdotgg/t3code#14477
* fix(web): Usage hourly labels follow the Time format setting by @mInrOz in pingdotgg/t3code#15575
* fix(web): stop repeating the subagent name in the waiting banner by @saphid in pingdotgg/t3code#16022
* fix(web): Cmd+O no longer opens the editor more than once by @5knnbdwm in pingdotgg/t3code#18983
* fix(web): hoist favorited legacy models to the top of the model picker by @TonybynMp4 in pingdotgg/t3code#11933
* fix(server): a rollback blocked by Git's index lock says so instead of a generic error by @shivamhwp in pingdotgg/t3code#11340
* fix(mobile): expanded tool-call groups keep following new calls by @nekohasekai in pingdotgg/t3code#15747
* fix(web): going back in the command palette keeps the search that led there by @saphid in pingdotgg/t3code#15940
* fix(web): changing a project's model no longer keeps the old model's options by @yaacovcorcos in pingdotgg/t3code#16581
* fix(web): preserve snapshot thumbnail context and detail by @maria-rcks in pingdotgg/t3code#18440
* fix(web): keep expanded tool actions usable from the keyboard by @saphid in pingdotgg/t3code#18831
* fix(usage): Claude usage no longer lists a `<synthetic>` model by @tris203 in pingdotgg/t3code#14672
* fix(server): release webhook claims when acceptance fails by @saphid in pingdotgg/t3code#18820
* fix(desktop): make the annotation editor border and shadow actually render by @PollyGlot in pingdotgg/t3code#9406
* fix(server): Claude follow-ups no longer fail in Auto on models without Auto by @Gigioxx in pingdotgg/t3code#15687
* fix(web): reopening Connections picks up new network addresses by @lnieuwenhuis in pingdotgg/t3code#15840
* fix(client): MCP apps can no longer trap you in full screen; it opens only after a tap by @shivamhwp in pingdotgg/t3code#18548
* fix(web,mobile): disabled provider instances no longer badge their siblings by @tris203 in pingdotgg/t3code#14545
* fix(web): threads open at the newest message, not thousands of pixels above it by @t3dotgg in pingdotgg/t3code#19663
* fix(mobile): report rejected shared settings writes by @juliusmarminge in pingdotgg/t3code#9356
* fix(claude): show automatic compaction while it runs by @maria-rcks in pingdotgg/t3code#15631
* fix(web): keep the parent thread highlighted while viewing its subagent by @saphid in pingdotgg/t3code#15163
* fix(web): show pull request checkout error detail by @saphid in pingdotgg/t3code#15007
* fix(server): mark unvisited thread completions unread by @maria-rcks in pingdotgg/t3code#15607
* fix(web): started threads no longer offer a machine picker that does nothing by @tris203 in pingdotgg/t3code#19900
* fix(web): provider model names no longer get cut off by their slug by @ilyaliao in pingdotgg/t3code#16522
* fix(claude): mid-sentence skill chips keep the full request by @ScottN-PV in pingdotgg/t3code#15253
* fix(web): preserve unsaved keybinding edits when saving another binding by @pnupu in pingdotgg/t3code#11109
* fix(connections): retry unsupported saved direct connections by @none23 in pingdotgg/t3code#15107
* fix(web): show readable messages for structured thread errors by @juliusmarminge in pingdotgg/t3code#21483
* fix(web): custom shortcuts work when Local environment is off by @Mnigos in pingdotgg/t3code#15825
* fix(web): keep thread notification tags within the Windows toast limit by @satyalyadav in pingdotgg/t3code#12289
* fix(web): pinned thread marker stays put when hovering the row by @flamboh in pingdotgg/t3code#11122
* fix(web): keep a typed question answer when you open a new thread by @Gigioxx in pingdotgg/t3code#13865
* fix(web): renumber following items when continuing a plain-Markdown numbered list by @saphid in pingdotgg/t3code#14332
* fix(web): clicking a logged request route no longer opens it in the editor by @lnieuwenhuis in pingdotgg/t3code#15838
* fix(desktop): reject offscreen annotation screenshot crops by @maria-rcks in pingdotgg/t3code#18441
* fix(web): NVDA browse mode reaches the new-thread project picker again by @akj in pingdotgg/t3code#17877
* fix(web): stop composer banner glass overlap by @t3-code[bot] in pingdotgg/t3code#8034
* fix(web): keep pasted decorators as text by @Gigioxx in pingdotgg/t3code#8415
* fix(shell): avoid interactive job control in environment probes by @LouisDeconinck in pingdotgg/t3code#11275
* fix(web): a closed proactive diff stays closed when you return to a thread by @ilyaliao in pingdotgg/t3code#14705
* fix(web): render powerline separators at cell edges by @SadriG91 in pingdotgg/t3code#5607
* fix(server): provider failures say why a turn could not start by @saphid in pingdotgg/t3code#16303

## New Contributors
* @Atharvsinh-codez made their first contribution in pingdotgg/t3code#20175
* @lbgos made their first contribution in pingdotgg/t3code#16926
* @yaacovcorcos made their first contribution in pingdotgg/t3code#16581
* @pnupu made their first contribution in pingdotgg/t3code#11109
* @LouisDeconinck made their first contribution in pingdotgg/t3code#11275
* @SadriG91 made their first contribution in pingdotgg/t3code#5607

**Full Changelog**: pingdotgg/t3code@v0.1.1-nightly.20261019.3360...v0.1.1-nightly.20261019.3373

Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.1.1-nightly.20261019.3373
github-actions Bot added a commit to davidvanderklay/t3code-flake that referenced this pull request Oct 19, 2026
## What's Changed
* fix(mobile): settings no longer tell you to update when you're up to date by @shivamhwp in pingdotgg/t3code#21688
* test(web): fix the workflow script test that times out on busy CI runners by @shivamhwp in pingdotgg/t3code#21699
* fix(mobile): a file shared into a new task shows in the composer before you send by @shivamhwp in pingdotgg/t3code#21659
* fix(desktop): a cold WSL distro gets 30 seconds to boot instead of 10 by @SunkenInTime in pingdotgg/t3code#21070
* fix(web): detect software keyboard before handling composer Enter by @Yash-Singh1 in pingdotgg/t3code#21763
* fix(mobile): the Git sheet uses the standard list rows by @juliusmarminge in pingdotgg/t3code#21785
* fix(server): changed files keep their real paths for renames and non-ASCII names by @Atharvsinh-codez in pingdotgg/t3code#20175
* fix(server): a message promoted into a stopping run stays queued by @lbgos in pingdotgg/t3code#16926
* perf(mobile): streaming re-renders less on the open thread screen by @juliusmarminge in pingdotgg/t3code#20963
* feat(usage): show even-pace marks on Limits bars by @flamboh in pingdotgg/t3code#14477
* fix(web): Usage hourly labels follow the Time format setting by @mInrOz in pingdotgg/t3code#15575
* fix(web): stop repeating the subagent name in the waiting banner by @saphid in pingdotgg/t3code#16022
* fix(web): Cmd+O no longer opens the editor more than once by @5knnbdwm in pingdotgg/t3code#18983
* fix(web): hoist favorited legacy models to the top of the model picker by @TonybynMp4 in pingdotgg/t3code#11933
* fix(server): a rollback blocked by Git's index lock says so instead of a generic error by @shivamhwp in pingdotgg/t3code#11340
* fix(mobile): expanded tool-call groups keep following new calls by @nekohasekai in pingdotgg/t3code#15747
* fix(web): going back in the command palette keeps the search that led there by @saphid in pingdotgg/t3code#15940
* fix(web): changing a project's model no longer keeps the old model's options by @yaacovcorcos in pingdotgg/t3code#16581
* fix(web): preserve snapshot thumbnail context and detail by @maria-rcks in pingdotgg/t3code#18440
* fix(web): keep expanded tool actions usable from the keyboard by @saphid in pingdotgg/t3code#18831
* fix(usage): Claude usage no longer lists a `<synthetic>` model by @tris203 in pingdotgg/t3code#14672
* fix(server): release webhook claims when acceptance fails by @saphid in pingdotgg/t3code#18820
* fix(desktop): make the annotation editor border and shadow actually render by @PollyGlot in pingdotgg/t3code#9406
* fix(server): Claude follow-ups no longer fail in Auto on models without Auto by @Gigioxx in pingdotgg/t3code#15687
* fix(web): reopening Connections picks up new network addresses by @lnieuwenhuis in pingdotgg/t3code#15840
* fix(client): MCP apps can no longer trap you in full screen; it opens only after a tap by @shivamhwp in pingdotgg/t3code#18548
* fix(web,mobile): disabled provider instances no longer badge their siblings by @tris203 in pingdotgg/t3code#14545
* fix(web): threads open at the newest message, not thousands of pixels above it by @t3dotgg in pingdotgg/t3code#19663
* fix(mobile): report rejected shared settings writes by @juliusmarminge in pingdotgg/t3code#9356
* fix(claude): show automatic compaction while it runs by @maria-rcks in pingdotgg/t3code#15631
* fix(web): keep the parent thread highlighted while viewing its subagent by @saphid in pingdotgg/t3code#15163
* fix(web): show pull request checkout error detail by @saphid in pingdotgg/t3code#15007
* fix(server): mark unvisited thread completions unread by @maria-rcks in pingdotgg/t3code#15607
* fix(web): started threads no longer offer a machine picker that does nothing by @tris203 in pingdotgg/t3code#19900
* fix(web): provider model names no longer get cut off by their slug by @ilyaliao in pingdotgg/t3code#16522
* fix(claude): mid-sentence skill chips keep the full request by @ScottN-PV in pingdotgg/t3code#15253
* fix(web): preserve unsaved keybinding edits when saving another binding by @pnupu in pingdotgg/t3code#11109
* fix(connections): retry unsupported saved direct connections by @none23 in pingdotgg/t3code#15107
* fix(web): show readable messages for structured thread errors by @juliusmarminge in pingdotgg/t3code#21483
* fix(web): custom shortcuts work when Local environment is off by @Mnigos in pingdotgg/t3code#15825
* fix(web): keep thread notification tags within the Windows toast limit by @satyalyadav in pingdotgg/t3code#12289
* fix(web): pinned thread marker stays put when hovering the row by @flamboh in pingdotgg/t3code#11122
* fix(web): keep a typed question answer when you open a new thread by @Gigioxx in pingdotgg/t3code#13865
* fix(web): renumber following items when continuing a plain-Markdown numbered list by @saphid in pingdotgg/t3code#14332
* fix(web): clicking a logged request route no longer opens it in the editor by @lnieuwenhuis in pingdotgg/t3code#15838
* fix(desktop): reject offscreen annotation screenshot crops by @maria-rcks in pingdotgg/t3code#18441
* fix(web): NVDA browse mode reaches the new-thread project picker again by @akj in pingdotgg/t3code#17877
* fix(web): stop composer banner glass overlap by @t3-code[bot] in pingdotgg/t3code#8034
* fix(web): keep pasted decorators as text by @Gigioxx in pingdotgg/t3code#8415
* fix(shell): avoid interactive job control in environment probes by @LouisDeconinck in pingdotgg/t3code#11275
* fix(web): a closed proactive diff stays closed when you return to a thread by @ilyaliao in pingdotgg/t3code#14705
* fix(web): render powerline separators at cell edges by @SadriG91 in pingdotgg/t3code#5607
* fix(server): provider failures say why a turn could not start by @saphid in pingdotgg/t3code#16303

## New Contributors
* @Atharvsinh-codez made their first contribution in pingdotgg/t3code#20175
* @lbgos made their first contribution in pingdotgg/t3code#16926
* @yaacovcorcos made their first contribution in pingdotgg/t3code#16581
* @pnupu made their first contribution in pingdotgg/t3code#11109
* @LouisDeconinck made their first contribution in pingdotgg/t3code#11275
* @SadriG91 made their first contribution in pingdotgg/t3code#5607

**Full Changelog**: pingdotgg/t3code@v0.1.1-nightly.20261019.3360...v0.1.1-nightly.20261019.3373

Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.1.1-nightly.20261019.3373
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews size:S 10-29 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants