Repository navigation
Conversation
There was a problem hiding this comment.
The change looks sound. A scroll toward the top inside the runway asks for the next older page. Paging goes on without another scroll only while the reader keeps moving up (advanced plus the runway probe), so one wheel notch loads at most one page. Only a lower offset counts as moving toward the top, so a page landing (which pushes the offset down) can't chain loads.
I ran timeline-history.spec.ts in headless Chromium. The new e2e test fails on the base and passes on this branch; the rest of the spec gives the same results on both (two tests fail the same way on both, from this environment). The history-machine unit tests pass and tsc -b is clean.
Public API: unchanged (all internal to packages/app).
No blocking concerns. One small edge: historyTop isn't reset when the session changes, so a detached reader restored onto a hash could get one extra page.
Related: #56285
There was a problem hiding this comment.
The new commit fixes the stale historyTop point from my earlier review. Resetting it when a scroller is attached means the previous timeline's scroll position can't count as a scroll toward the top in the next one. Nothing new to raise; timeline unit tests pass. Public API: unchanged.
9af02f2 to
5dd7a46
Compare
There was a problem hiding this comment.
This is a rebase onto a newer dev: the PR's own patch is unchanged and there is nothing new to raise. On top of #66034 the timeline unit tests and the timeline-history e2e spec still pass, including the new runway test (the one remaining e2e failure also fails on the base here). Public API: unchanged.
The warm-up of "pages the timeline from the composer and the transcript ..." pressed PageUp once and waited for scrollTop to drop. With history that loads before the reader reaches the top (#66033), that PageUp lands inside the distance in which the next older page is requested. The page lands above the view and raises scrollTop, so the offset goes 3,136 -> 2,386 -> 4,387 and the wait never ends, although the view paged as it should. The warm-up now uses the test's own `paged` helper and waits until the first row below the header has moved down the screen, as the measured steps after it already do.
The warm-up of "pages the timeline from the composer and the transcript ..." pressed PageUp once and waited for scrollTop to drop. With history that loads before the reader reaches the top (#66033), that PageUp lands inside the distance in which the next older page is requested. The page lands above the view and raises scrollTop, so the offset goes 3,136 -> 2,386 -> 4,387 and the wait never ends, although the view paged as it should. The warm-up now uses the test's own `paged` helper and waits until the first row below the header has moved down the screen, as the measured steps after it already do. (cherry picked from commit 8b159f8)
The warm-up of "pages the timeline from the composer and the transcript ..." pressed PageUp once and waited for scrollTop to drop. With history that loads before the reader reaches the top (#66033), that PageUp lands inside the distance in which the next older page is requested. The page lands above the view and raises scrollTop, so the offset goes 3,136 -> 2,386 -> 4,387 and the wait never ends, although the view paged as it should. The warm-up now uses the test's own `paged` helper and waits until the first row below the header has moved down the screen, as the measured steps after it already do. (cherry picked from commit 8b159f8)
…-page-size #66033 dropped the page that follows a scroll made while one was loading (�dvanced). This branch keeps it: here it is what tells a moving reader's page from a resting one's, and the larger pages depend on it.
How it works
dev. Only the scroll that asks changed:onHistoryScrollininteraction.ts.Why this rule
The rule with the distance set by a lab switch, against
devfor 200 px. Real session (6,193 messages, pages of about 3,000 px), headless wheel, old timeline, two runs for each cell. A burst is 1,800 px in 450 ms. The count is bursts that sat at offset 0 while a page was loading. These runs are from the head before this one, which also sent the next page after a scroll made while one was loading (see "Removed").dev)Real sessions, this pull request against
dev, interleavedFrozen lab: the session's pages are replayed from a snapshot, and the server adds the delay to each older page. Counts are bursts that sat at offset 0 while a page was loading, of 17 to 25; or older pages that were still loading when the reader reached the top. This head: 3 or 4 runs for each cell.
dev: 3 runs.devolddevnewdevRemoved
advanced, and therunwayprobe). The head before this one sent the next page as soon as one landed, when the reader had scrolled toward the top meanwhile and still had less than the runway above.Not changed
dev(2 to 5 of 17). Those runs delayed pages in a route through the test driver, which stretched under load. Every number above is from the frozen lab.ebe9c2c77a) withdevat5b66287cad. It was stopped after 8 pairs: nine benches shared the slot.strobe · exp_e41378 · packages/app/perf/timeline.bench.ts · generated
No answer yet
Scroll history: Main-thread work per 2.7 s run: no answer, stopped after 8 pairs.
Different screens: the builds did not all show the same screen, so part of the difference may be the screen.
Stopped early: the results cover only the pairs that finished.
Details · metrics, pairs, profiles, method
Metrics
−10,000 µs (warned)
−110,000 to +10,000 µs
Likely range: 98.4% confidence for the main metric (checked at 8, 12, 18, 26, 40 pairs, 95% over all of them), 96.1% for the others. Change: the pairs' typical change (Hodges–Lehmann: the median of the averages of every two pairs' changes).
Pairs
Each pair launched both builds fresh, in alternating order (AB or BA). Change: the main metric. Other apps' CPU: other processes on the measured CPUs, % of one core, bold from 25%; 3 other processes ≥ 5%, busiest 651% of a core.
How it was measured
5b66287cad, chore(codemode): bump psychoscript to 0.3.0HEAD@ebe9c2c77a, fix(app): load older history before the reader reaches the topAlso measured, not tested
0 µs (warned)
−30,000 to +10,000 µs
−1,000 µs (warned)
−6,000 to +1,000 µs
−7,000 µs (warned)
−16,000 to +1,000 µs
0 µs (warned)
−80,000 to +170,000 µs
0 MB
−3 to +4 MB
0 MB
−0.3 to +0.3 MB
−4 MB
−19 to +13 MB
−0.8 MB
−2.2 to +0.4 MB
0 µs (warned)
−1,200,000 to 0 µs
Rerun · command and recordings
strobe bench packages/app/perf/timeline.bench.ts \ --base 5b66287cad \ --head HEAD \ --filter "scroll history" \ --headlessstrobe report experiment exp_e41378 --openrec_f48a78(5b66287, pair 1),rec_08b00a(HEAD@ebe9c2c77a, pair 1)strobe · exp_e41378 · end of generated report