Skip to content

fix(desktop): preserve the live tail when returning to a long Graph session #4112

Description

@me2seeks

Problem

Returning to a long Graph-mode session while its latest turn is still running can restore the transcript one turn behind. The scroll container may end up numerically pinned to the bottom, but the virtual window does not include the live tail, so the viewport lands around the previous turn or contains no visible turn content.

Graph mode is enabled, with no operators created (0/0).

Reproduction

  1. Enable Graph mode.
  2. Build a conversation long enough to activate transcript virtualization.
  3. Send another message and leave that turn running.
  4. Switch to another session, then switch back.

Observed

On current main (a94d07732), an isolated Ubuntu Electron E2E reproduced this twice at 1440x900:

  • before switching away: 15 projected turns, at the bottom;
  • immediately after returning: 14 projected turns, 2128 px from the bottom;
  • after arrival settling: the scroller reported bottom position, but no turn was visible and the original live-tail turn was not mounted.

This matches the UI landing around the second-to-last turn.

Expected

Returning to a running session keeps the current live turn in the transcript projection and lands on that turn at the bottom.

Scope and overlap checked

A regression should extend the existing live-conversation remount E2E with long-history virtual-window and visible-tail assertions.

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