Skip to content

[Bug]: "Scroll to end" pill changes horizontal position between frames #26338

Closed

Description

@Lyten02

Before submitting

Area

apps/web (inferred from the UI; not checked against source)

Steps to reproduce

Not fully captured. Reporter to add the exact trigger if known.

  1. Open a thread whose message list is long enough that the "Scroll to end" pill appears.
  2. Watch the "Scroll to end" pill during the recording (3 s clip, see attachment).

Expected behavior

The "Scroll to end" pill stays at a fixed position while it is shown.

Actual behavior

In a 3-second recording (6 sampled frames) the pill's horizontal position changes between frames: left, center, right. Its vertical position stays the same. The text behind the pill is cut at the left and right edges.

Cause: not investigated. [INFERENCE] the pill is positioned relative to a container whose width or offset changes while the chat updates.

Impact

Cosmetic issue

Version or commit

Unknown

Environment

Linux x64, omarchy (kernel 7.2.8-9-omarchy). Client type (desktop or web) not recorded.

Logs or stack traces

None captured.

Workaround

None known.

Attachments

Screen recording screenrecording-2026-10-28_09-17-31.mp4 (222x128, 3 s, 60 fps, 38 KB). Not attached yet: the GitHub API does not accept mp4 uploads for issues. Reporter to attach it through the web UI.

Activity

  1. Lyten02 commented on Oct 28, 2026

    @Lyten02
    Author
    screenrecording-2026-10-28_09-17-31.mp4
  2. Melv1C commented on Oct 28, 2026

    @Melv1C

    Seeing the same pill instability on macOS, but the jitter is vertical (a few px up and down, continuously), not horizontal.

    • Version: desktop app, 0.1.4-nightly.20261028.3809 (server reports the same). Started right after updating to this nightly this morning; earlier nightly was fine.
    • OS: macOS 26 (Darwin 25.6.0), arm64
    • Repro: open any thread long enough to show "Scroll to end", scroll up. The pill moves up/down by a few pixels constantly, even when the thread is idle. Happens in every thread.

    Diagnosis (from source at the tag, unconfirmed): the pill's bottom comes from scrollToEndClearance (ChatView.tsx:3352). It's recomputed in publishComposerOverlayHeight on every resize of the composer overlay, using the pill's own bounding rect plus attached banner rects (ChatView.tsx:2224-2244, resolveScrollToEndClearance in composerFooterLayout.ts). A continuous small oscillation suggests a measure→reposition→re-measure feedback loop. Both this path and the overlay re-measure effect changed just before this nightly, in #25401 and #25915. The horizontal jump reported above is likely the same regression.

    Investigated via t3 triage by Claude Code (Opus 5.5).

  3. coygeek commented on Oct 28, 2026

    @coygeek

    Same vertical jitter here, still present on a newer nightly.

    • Version: desktop app (T3 Code Nightly), server 0.1.4-nightly.20261028.3814. That is newer than the .3809 reported above.
    • OS: macOS, Darwin 27.2.0, arm64
    • Repro: in a thread long enough to show "Scroll to end", scroll up by one page. The pill appears and immediately flickers, moving up and down.
    • Upstream state: main is 8 commits past this tag as of 2026-10-28 (f17c9d202). None of those commits touch the pill's positioning path: scrollToEndClearance in ChatView.tsx, resolveScrollToEndClearance in composerFooterLayout.ts, or TimelineOverlays.tsx. I found no open PR addressing it.
    • Source note (unconfirmed): at this tag, publishComposerOverlayHeight sets the clearance to the full overlay height while the pill is unmounted. Once the pill mounts, it measures the pill and the composer's main surface instead. The re-measure effect also depends on showScrollToBottom. So the pill's bottom can take two different values around the moment it appears, which fits the up-and-down movement.

    Investigated via t3 triage by Claude Code (Opus 5.5).

  4. MarvelTiyjudy commented on Oct 28, 2026

    @MarvelTiyjudy

    Note

    On behalf of Marvel Tiyjudy, written by Claude Code (Claude Opus 5.5, claude-opus-5-5).

    Same vertical jitter on Windows, with a recording and per-frame measurements. The signature here is smaller than the one in #26365, so it may be worth checking that the fix covers this case too.

    • Version: desktop app (T3 Code Nightly), 0.1.4-nightly.20261028.3814
    • OS: Windows 11 Enterprise x64, 1920x1080, window maximized
    • Repro: a long thread with no turn running in it, scrolled up so the pill shows. The mouse pointer rested on the pill the whole time.

    Clip, 3 s, cropped to the pill and scaled 3x:

    pill-flicker-windows-3s.mp4

    Measured from 60 s of screen capture: 1744 captured frames, with the pill visible in 1367 of them. I located the pill in each frame by template matching.

    • The pill takes exactly two positions, 8 px apart vertically. Its x-position is the same in every frame.
    • It switches 598 times in 47 s, between 2 and 28 times per second. The higher position lasts a single frame in 285 of its 299 occurrences.
    • The composer's top edge does not move in 593 of the 598 switches. The recording in fix(web): scroll-to-end pill no longer jitters after scrolling up #26365 shows the composer flipping between 110 and 147.5 px and the pill jumping by tens of pixels. Here only the pill moves, and only by 8 px.

    Not tested: the pointer away from the pill, and #26365 on this machine.

  5. ViaxCo commented on Oct 28, 2026

    @ViaxCo
    Contributor

    Note

    On behalf of Victor, written by Claude Code (Claude Opus 5.5, claude-opus-5-5).

    Extra data on the cause, for #26363 and #26365. Same build here (0.1.4-nightly.20261028.3814, macOS). The same problem also stops the composer from collapsing on scroll, because each ref cleanup reports onContentOverflowChange(false).

    Why the ref callback started to change on each render. Bisected to 1f8530e (#26255). That commit added this loop in ConversationTimeline, after useStableRows:

    const unmatchedPendingApprovals = new Map(pendingApprovalsByRequestId);
    // ...
    unmatchedPendingApprovals.delete(item.requestId);

    React Compiler sees the Map copy and .delete() as mutations of a value that is created before hook calls. It then drops the memo scope, and all callbacks in ConversationTimeline lose memoization, not only setTimelineList. In the compiler output, the component goes from 0 unmemoized callbacks (parent commit) to several (1f8530e).

    A fix that keeps the compiler happy. Build the list without mutation:

    const timelineApprovalRequestIds = new Set(
      rows
        .flatMap((row) =>
          row.kind === "work" ? row.groupedEntries : row.kind === "work-live" ? [row.entry] : [],
        )
        .map((entry) => entry.projectedItem?.item)
        .flatMap((item) => (item?.type === "approval_request" ? [item.requestId] : [])),
    );
    const unmatchedPendingApprovals = pendingApprovals.filter(
      (approval) =>
        pendingApprovalRequestIds.has(approval.requestId) &&
        !timelineApprovalRequestIds.has(approval.requestId),
    );

    Then use .length instead of .size, and unmatchedPendingApprovals.map(...) in the footer.

    Checks

    The useStableCallback fix in the open PRs is still a good guard for the ref. This change could be a small follow-up, so the other callbacks in ConversationTimeline are memoized again.

  6. Melv1C commented on Oct 28, 2026

    @Melv1C

    Note

    🤖 Responded by Claude Opus 5.5

    #26375, merged into main, fixes this. The vertical jitter came from the timeline's list ref callback re-attaching on every render. Each detach reported "no overflow", which flipped the composer between its resting and expanded layouts, and the pill's position follows the composer's height. The horizontal jumps in the original Linux report are likely the same loop, but nobody has checked that on Linux.

  7. GrajAP commented on Oct 28, 2026

    @GrajAP

    Can confirm I am also experiencing this bug on Linux with the "Scroll to end" button rapidly flickering / jumping vertically.

    Environment:

    • App: T3 Code Desktop Nightly 0.1.4-nightly.20261028.3814 (commit ce66aab13fab)
    • OS: NixOS 26.11 (kernel 7.2.7-zen1, x86_64, Wayland)

    Observations:

    • Scrolled up in an active conversation thread causes the "Scroll to end" button to jitter/flicker vertically between two heights (~8px difference) rapidly.
    • Captured a 16s screen recording showing the vertical jitter repro (can attach via GitHub web UI).

    (Noted that #26375 was recently merged to address the timeline list ref callback loop causing this jitter).

  8. t3-code-bot commented on Oct 28, 2026

    @t3-code-bot
    Contributor

    resolved by #26375, merged into main. the fix stabilizes the timeline list ref callback to stop the scroll-to-end button jitter.

    closed at the request of @UtkarshUsername.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions