Skip to content

fix(ui): keep write geometry through a late scroll echo - #4834

Closed
orangeCatDeveloper wants to merge 1 commit into
apache:mainfrom
orangeCatDeveloper:fix/transcript-scroll-echo-geometry
Closed

fix(ui): keep write geometry through a late scroll echo#4834
orangeCatDeveloper wants to merge 1 commit into
apache:mainfrom
orangeCatDeveloper:fix/transcript-scroll-echo-geometry

Conversation

@orangeCatDeveloper

Copy link
Copy Markdown
Contributor

Summary

A pinned transcript could stop following its tail after content grew below the reader: the storybook smoke for product-shell-official-appshell--tail-follows-growth-outside-turns failed on CI with the view left 509px short of a 600px growth (run 33945967155).

createTranscriptScrollAuthority tells its own write's scroll echo from the reader by offset, and when the echo arrived it also refreshed the remembered scroll geometry. If that echo landed after content had grown but before the ResizeObserver wrote the tail, the growth was absorbed into the baseline, and the next offset move had no growth left to explain it. The band classifier then read a partial move as the reader scrolling away, released the pin, and the observer's write never came. The echo branch now leaves the geometry as the last write recorded it; the observer refreshes it on its own write, and a move the growth explains stays classified as content.

The unit test replays the CI numbers (3523/860 scroller, +600 growth, +91 offset move → 509 from the tail) and fails without the change. The browser-level trigger of that +91 move was not reproduced locally (0/40 story runs at normal speed and under 8× CPU throttling), so this fixes the defect the numbers point at rather than a repro.

Verification

packages/ui unit tests, before:
✖ growth a late echo already sees still explains the offset move after it
ℹ pass 13
ℹ fail 1

packages/ui unit tests, after:
ℹ pass 374
ℹ fail 0

Also ran: biome check on the two files (clean); storybook smoke (290 stories / 316 renders passed). Not run: desktop E2E.

AI use

Select exactly one:

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

Tool(s) and scope: Claude Code — diagnosis from the CI trace numbers, the fix, the test, and this description, under the contributor's direction; the commit carries a Generated-by: Claude Code trailer.

Checklist

  • Tests cover the change and fail without it
  • Lint, format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No

https://claude.ai/code/session_01RLZUUq5ri1bHzydQ7tw32b

@github-actions github-actions Bot added the effort/S Under 100 readable lines label Sep 5, 2026
The echo of the authority's own write refreshed the remembered scroll
geometry. When that echo landed after content had grown but before the
resize observer wrote the tail, the next offset move had no growth left
to explain it and read as the reader scrolling away, so the pin was
released and the tail stopped following.

Generated-by: Claude Code
Claude-Session: https://claude.ai/code/session_01RLZUUq5ri1bHzydQ7tw32b
@orangeCatDeveloper
orangeCatDeveloper force-pushed the fix/transcript-scroll-echo-geometry branch from 4748966 to 5b733ab Compare September 5, 2026 07:26
@orangeCatDeveloper

Copy link
Copy Markdown
Contributor Author

Superseded by #4831, which reproduces the defect at the browser level and identifies the source of the offset move (content-visibility estimates above the viewport resolving while content grows below). Closing to avoid two conflicting fixes to the same file.

@orangeCatDeveloper
orangeCatDeveloper deleted the fix/transcript-scroll-echo-geometry branch September 5, 2026 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/S Under 100 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant