Skip to content

test(desktop): make prompt-rail tail mounting deterministic #3862

Closed

Description

@liugddx

Summary

The prompt-rail eviction Desktop e2e can set the transcript to the bottom without causing the turn virtualizer to observe a scroll event. The test then waits for the exact tail turn (turn-prompt-rail-120), but the mounted window remains stale and the assertion times out.

Evidence

An unrelated Windows-storage PR (#3789) failed on exact head b98f3b329 after all build, release-contract, workspace, Eval, Runtime Host, and Windows recovery checks passed:

  • Desktop e2e failure
  • scenario: evicting a turn-owned sibling interaction hands focus back to the transcript
  • expected [data-virtual-turn-id="turn-prompt-rail-120"]: 1
  • observed for 10 seconds: 0

#3789 has no Desktop/UI diff against main.

Cause boundary

scrollTranscriptTo only assigns scroller.scrollTop. The virtualized window is updated through the scroll observation path, but a programmatic assignment does not provide a deterministic event/paint barrier for the test. The same spec already has notifyTranscriptScrolled and waitForPaintedFrames helpers later in the eviction journey.

Expected closure

  • Make scrollTranscriptTo notify the virtualizer explicitly and wait for the resulting painted frames.
  • Preserve the test's exact tail mount, later eviction, focus-return, and selection-collapse assertions.
  • Run the focused prompt-rail spec and full hosted Desktop e2e suite.

Found while validating #3789; the fix must remain in a separate PR.

Activity

  1. liugddx commented on Aug 26, 2026

    @liugddx
    MemberAuthor

    Fix proposed in #3863. The shared prompt-rail scroll helper now explicitly notifies the virtualizer and waits two painted frames before callers assert the mounted window; all exact eviction/focus assertions remain unchanged.

  2. liugddx commented on Aug 26, 2026

    @liugddx
    MemberAuthor

    Fix #3863 is exact-head green in hosted CI, including the full Desktop e2e suite. Keeping this issue open until the PR receives maintainer review and merges.

  3. Astro-Han commented on Aug 28, 2026

    @Astro-Han
    Contributor

    The same tail-mount failure recurred after #3863.

    PR #4090 failed on exact head 89f8a9d89e839afb51c8710e54e03486e7efca45:

    The current helper already assigns scrollTop, dispatches the scroll event, and waits two painted frames—the synchronization added by #3863—so that barrier is not sufficient in every hosted run.

    The prompt-rail fixture contains only plain completed user/assistant turns and does not enter #4090's aborted-turn rendering branch. This therefore does not point to the aborted-status change, but it is an exact recurrence of the symptom tracked here.

    The broader scroll-ownership work is now tracked in #4099 and implemented in #4105. Recording this run here so the original failure mode is not lost after this issue's closure.

    Posted with Codex assistance; @Astro-Han verified the linked run and diagnosis.

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