Skip to content

[Bug]: Mobile tool-call group stops following new calls, so the newest rows end up out of view #15704

Closed

Description

@nekohasekai

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/mobile

Steps to reproduce

  1. On iOS, open a thread whose turn is running and keeps producing tool calls, so the expanded tool-call group is taller than its scroll area.
  2. Expand the group and scroll it to its last row.
  3. Keep your finger off the screen while the turn adds more calls.

Expected behavior

While the group is scrolled to its end, new calls stay in view: the group follows them, as shouldFollowThreadWorkGroupAppend intends.

Actual behavior

The group stays where it was. New calls are added below the visible area, so the newest rows are hidden and the group's scroll indicator is no longer at the bottom.

In the recording, the group is at its end at 0:12. Over the next 16 s the turn adds 5 rows, and the group's scroll offset stays at 1831 pt while its content grows from 2116 pt to 2261 pt. Dragging again at 0:28 reveals them, and the next call is missed the same way. It also happens when the offset is exactly at the end: in a separate run the offset stayed at 1048 pt while the end moved from 1048 pt to 1193 pt. Offsets were read from the accessibility tree.

On my iPhone, during a long Claude turn, the group was in the same state, with its scroll indicator about 5 rows above the bottom, and I could not drag it any further. In the simulator, dragging again does reach the new end.

Impact

Minor bug or occasional failure

While following a running turn on mobile, the newest tool calls are the ones that go out of view.

Version or commit

Reproduced on main @ 4ee6bfd. Also seen on T3 Code iOS 2.0.0 (103).

Environment

Reproduced: iPhone 17 Pro Max simulators on iOS 27.2 and iOS 26.5, development client, isolated local server with a scripted fake agent (no model calls) that streams reasoning and a tool call about every 3 s. Also seen: iPhone 17 Pro Max, iOS 27.2 (24B5089g), T3 Code 2.0.0 (103), Claude turn running for about 7 minutes.

Screenshots, recordings, or supporting files

All project and thread data in the recording is synthetic.

work-group-follow.mp4

Source pointers

The follow rule is shouldFollowThreadWorkGroupAppend in thread-feed-live-follow.ts, used by ThreadWorkGroupList in thread-work-log.tsx. Why it does not fire here has not been investigated. #9359 and #10212 fixed earlier sizing bugs in the same component.

Activity

  1. added
    bugSomething is broken or behaving incorrectly.
    needs-triageIssue needs maintainer review and initial categorization.
    on Oct 4, 2026
  2. juliusmarminge commented on Oct 4, 2026

    @juliusmarminge
    Member

    Note

    Grok responding on behalf of Julius.

    Triage

    Thanks for the careful measurements, @nekohasekai. They made the follow path much easier to trace. #9359 and #10212 already fixed height and clipping in this list. The follow behavior is a separate problem.

    What I found

    I checked this against main (4ee6bfd50e).

    • ThreadWorkGroupList decides whether to follow inside the LegendList totalSize listener. It only calls scrollToEnd when shouldFollowThreadWorkGroupAppend returns true.
    • That callback is stored on a ref, and the ref is updated in the parent's useLayoutEffect. LegendList emits totalSize from its own useLayoutEffect, and child layout effects run before the parent's. So the listener still sees the previous render's activities.
    • On the append that crosses the end, the current and previous row arrays are the same pre-append list, so the list doesn't scroll. It still records the new content height.
    • On the next append, the offset is already about one row from the end. A row is 28px plus a 1px gap, and the predicate only follows within 1px, so following stays off from then on.
    • That matches your numbers. Five new rows add 145px: the content grows from 2116 to 2261 and the end moves from 1048 to 1193, but the offset stays where it was.
    • Web picks the follow during render from the pre-layout entries, then sets maintainScrollAtEnd. The mobile list never sets maintainScrollAtEnd and depends on a single scrollToEnd call instead.
    • I couldn't tell from the source alone whether the scroll range also failed to grow on the physical device, where a drag wouldn't go any further.

    Likely fix area

    • onContentSizeChange in apps/mobile/src/features/threads/thread-work-log.tsx. One option is to make the follow decision from the activities of the render that added the rows, before the new content height is recorded.
    • Another option is to match web: set maintainScrollAtEnd for that append instead of calling scrollToEnd after totalSize.

    A maintainer will decide on the fix direction.

  3. added
    via-triageFiled through npx t3 triage
    and removed
    needs-triageIssue needs maintainer review and initial categorization.
    on Oct 4, 2026
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

    bugSomething is broken or behaving incorrectly.via-triageFiled through npx t3 triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions