Skip to content

fix(web): position opened threads and sent messages before paint - #31553

Draft
flamboh wants to merge 1 commit into
pingdotgg:maria/redesign/1-primitives-shellfrom
flamboh:t3/redesign-fix-landing-positions
Draft

flamboh wants to merge 1 commit into
pingdotgg:maria/redesign/1-primitives-shellfrom
flamboh:t3/redesign-fix-landing-positions

Conversation

@flamboh

@flamboh flamboh commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Fix for the redesign stack, targets layer 1 (#28839).

Note

🤖 GPT-6.1 Sol on behalf of Oliver

Opening a thread at its end can briefly show older rows. Sending can leave the new user message under the composer until a later scroll correction.

The timeline now corrects these positions from measured content in observeResize, before paint. Opening corrections stop with the existing restoration operation. Send corrections apply only when a new user row arrives in the same thread while follow is enabled; they preserve an active turn anchor and leave ordinary streamed row growth alone.

The affected code originated in layer 1. This uses the before-paint idea from #31450, but watches content during restoration and user-message insertion rather than viewport resizing. It does not change the history-collapse measurement in #31272, the footer in #31401, or the streaming-follow behavior in #31521.

Validation

  • Failing-first browser regressions on layer 1: opening a 25-row thread initially leaves a 5,054 px end gap; an unanchored send initially overlaps composer clearance by 78.75 px. The corrected first measured frame meets both assertions. Sends with an active anchor are covered too.
  • The full MessagesTimeline.browser.test.tsx suite passes: 43 tests, including saved mid-thread positions and find navigation.
  • Integrated web client at 1280 × 800, isolated Replay showcase history: the first before-paint send sample has scrollTop=1295, end gap 0, message bounds 430–520.75, height 90.75, and composer top 616.5. No paid provider turns. The integrated thread was shorter than the 25-row regression fixture.
  • vp run check:changed origin/maria/redesign/1-primitives-shell passes: format, lint, both knip checks, affected typechecks, 137 tests across four files, and two React Compiler checks.

Before / after

Captures pending.

GPT-6.1 Sol in the Codex harness (T3 Code).

@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 Nov 5, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 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