Skip to content

test(desktop): settle prompt-rail scroll jumps - #3863

Closed
liugddx wants to merge 1 commit into
apache:mainfrom
liugddx:fix/3862-prompt-rail-tail-mount
Closed

test(desktop): settle prompt-rail scroll jumps#3863
liugddx wants to merge 1 commit into
apache:mainfrom
liugddx:fix/3862-prompt-rail-tail-mount

Conversation

@liugddx

@liugddx liugddx commented Aug 26, 2026

Copy link
Copy Markdown
Member

Summary

Make prompt-rail test scrolling deterministic for the turn virtualizer.

  • explicitly dispatches the transcript scroll notification after assigning scrollTop;
  • waits two painted frames before the caller asserts the mounted turn window;
  • keeps the exact tail-mount, eviction, focus-return, and selection-collapse assertions unchanged.

Why

scrollTranscriptTo previously only assigned scrollTop. A programmatic assignment did not provide a deterministic observation/paint boundary for the virtualizer, so the eviction scenario could wait ten seconds for turn-prompt-rail-120 while the mounted window remained stale.

This reproduced on an unrelated #3789 head in run 32930874507. That PR has no Desktop/UI diff.

The spec already used notifyTranscriptScrolled and waitForPaintedFrames later in the same eviction journey. This change moves that existing boundary into the shared scroll helper so every top/bottom setup has deterministic semantics.

Verification

  • npm run lint
  • npm run format:check
  • npx knip --workspace apps/desktop
  • git diff --check

The local Windows full build currently reproduces unrelated current-main Runtime Host type failures, while the exact main push CI is green. The authoritative Desktop e2e evidence for this test-only change is therefore the hosted Linux/xvfb test check on this PR.

AI use

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool and scope: Codex analyzed the hosted trace, reused the spec's existing scroll notification and paint helpers, and ran the listed local gates.

Fixes #3862.

Checklist

  • Existing assertions cover the failed boundary without being weakened
  • Lint, format, Desktop knip, and diff checks pass locally
  • Hosted test passes on exact head 52e9a6024, including the full Desktop e2e suite

Does this PR entail a change in behavior?

  • Yes
  • No - this changes only Desktop e2e synchronization.

@liugddx

liugddx commented Aug 26, 2026

Copy link
Copy Markdown
Member Author

@Astro-Han Hosted exact-head est is green, including the full Desktop e2e suite. The change only reuses the spec's existing scroll notification and painted-frame helpers; all exact tail-mount, eviction, focus, and selection assertions remain unchanged. Please review when available.

@Astro-Han Astro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed this head and found no blocking issues.

Adds notifyTranscriptScrolled after scrollTranscriptTo to ensure virtualizer observes programmatic scroll; hosted test: SUCCESS (32932185830).

No P0-P3.

简体中文该头无阻断。

Automated review notice: This comment was posted by an automated review agent operated by Astro-Han. It is not an independent human review and does not replace one.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants