Skip to content

fix(chat): stop pushing follow-up messages to the top - #7897

Merged
t3dotgg merged 3 commits into
mainfrom
t3code/fix-thread-submission-scrolling
Aug 22, 2026
Merged

fix(chat): stop pushing follow-up messages to the top#7897
t3dotgg merged 3 commits into
mainfrom
t3code/fix-thread-submission-scrolling

Conversation

@t3dotgg

@t3dotgg t3dotgg commented Aug 22, 2026

Copy link
Copy Markdown
Member

Follow-up messages jumped to the top of a thread and left most of the screen empty.

Only the first user message now gets top anchoring and reserved space. Follow-ups stay at the real bottom on web, desktop, and mobile, including plan follow-ups.

Tests: 48 focused tests, web/mobile/shared type checks, targeted lint.

Model: GPT-5.6 Sol
Harness: Codex


Note

Medium Risk
Changes shared chat-list anchoring and send-time scroll on web and mobile, so a regression could mis-scroll threads or leave empty reserved space. Logic is covered by focused tests but still touches a high-traffic UX path.

Overview
Stops follow-up sends from jumping to the top of the thread and leaving a large empty gap. Only the first user message still gets reserved end-space; later sends stay at the live bottom on web and mobile.

resolveChatListAnchoredEndSpace now walks from the start and anchors only the first eligible user row. Web ChatView sets that first-message anchor when a thread has no turn and no user messages yet; otherwise it scrollToEnd(). Mobile splits submit vs. layout: submittedMessageId drives post-send scroll/follow reset, while resolveThreadFeedSubmissionAnchor keeps the first-message layout pin through queued outbox sends.

Also treats a connecting phase as not yet acknowledging a local dispatch so follow-ups stay active while the provider session starts.

Reviewed by Cursor Bugbot for commit 6d72b36. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Anchor only the first user message and scroll follow-ups to end

  • Introduces resolveThreadFeedSubmissionAnchor to decide at submission time whether a message gets an anchor: only the first user message in a not-yet-started turn qualifies; follow-up sends in an active turn get no anchor and rely on end-follow scrolling.
  • Updates both mobile (ThreadDetailScreen, ThreadFeed) and web (ChatViewContent, MessagesTimeline) send paths to use the new rule, tracking submittedMessageId instead of anchorMessageId for scroll-to-end behavior.
  • Reworks resolveChatListAnchoredEndSpace to scan forward and reserve end space only for the first eligible user-role message; later eligible rows are ignored.
  • Fixes hasServerAcknowledgedLocalDispatch to return false during the 'connecting' phase, preventing premature acknowledgement of follow-ups while a provider session is starting.
  • Risk: resolveChatListAnchoredEndSpace now returns undefined when the anchor id does not match the first eligible user message; any caller expecting reverse-scan semantics or anchoring of later rows will no longer reserve end space.

Macroscope summarized 6d72b36.

@coderabbitai

coderabbitai Bot commented Aug 22, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: f04b7be7-93de-418c-bc46-739448548e16

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Aug 22, 2026
@github-actions

github-actions Bot commented Aug 22, 2026

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 13.4 KiB 13.4 KiB −26 B (−0.2%) 15.1 KiB
Codex Thread snapshot wire 6.9 KiB 6.9 KiB −3 B (−0.0%) 7.3 KiB
Codex Live turn WebSocket wire 6.6 KiB 6.5 KiB −23 B (−0.3%) 7.8 KiB
Codex Live turn WebSocket decoded 55.0 KiB 55.0 KiB 0 B (0.0%) 66.4 KiB
Codex Live turn messages 16 16 0 (0.0%) 21
Claude Total thread wire 13.4 KiB 13.4 KiB −1 B (−0.0%) 15.1 KiB
Claude Thread snapshot wire 6.9 KiB 6.9 KiB −12 B (−0.2%) 7.3 KiB
Claude Live turn WebSocket wire 6.5 KiB 6.6 KiB +11 B (+0.2%) 7.8 KiB
Claude Live turn WebSocket decoded 55.8 KiB 55.8 KiB 0 B (0.0%) 66.4 KiB
Claude Live turn messages 16 16 0 (0.0%) 21

Baseline: ce91284 · PR result: 6d72b36 · 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: 109.4 KiB
  • Claude decoded thread snapshot: 110.1 KiB

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

Comment thread apps/mobile/src/features/threads/ThreadDetailScreen.tsx Outdated
@macroscopeapp

macroscopeapp Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Skipped

Macroscope did not run approvability analysis for this PR. Macroscope could not determine whether this PR modifies its approvability configuration, so the PR was not approved automatically. A PR that may change the rules that govern approval is never approved automatically.

@github-actions github-actions Bot added size:L 100-499 changed lines (additions + deletions). and removed size:M 30-99 changed lines (additions + deletions). labels Aug 22, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit fba3c7c. Configure here.

Comment thread apps/mobile/src/features/threads/thread-feed-live-follow.ts Outdated
@t3dotgg
t3dotgg merged commit 2274444 into main Aug 22, 2026
25 checks passed
@t3dotgg
t3dotgg deleted the t3code/fix-thread-submission-scrolling branch August 22, 2026 12:28
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Aug 22, 2026
## What's Changed
* fix(web): command-click spaced folder links by @SunkenInTime in pingdotgg/t3code#6439
* fix(chat): stop pushing follow-up messages to the top by @t3dotgg in pingdotgg/t3code#7897
* test(desktop): remove redundant release note assertion by @t3-code[bot] in pingdotgg/t3code#7873
* fix(web): handle wide ordered-list marker edge cases by @abcdmku in pingdotgg/t3code#7856

## New Contributors
* @abcdmku made their first contribution in pingdotgg/t3code#7856

**Full Changelog**: pingdotgg/t3code@v0.0.34-nightly.20260822.1159...v0.0.34-nightly.20260822.1160

Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.34-nightly.20260822.1160
ohbentos pushed a commit to ohbentos/t3code that referenced this pull request Aug 23, 2026
frankdavidcorona pushed a commit to frankdavidcorona/t3code that referenced this pull request Aug 23, 2026
cloudbridgeuy pushed a commit to cloudbridgeuy/t3code that referenced this pull request Aug 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 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.

1 participant