Repository navigation
fix(mobile): bound history pages and prevent selection scroll jumps - #607
Merged
Merged
Conversation
huichen
enabled auto-merge (squash)
September 14, 2026 00:04
huichen
added a commit
that referenced
this pull request
Sep 26, 2026
…es it (#865) Three instrument faults, each of which had produced a wrong number: **The harness never installed the live-lane capability flags.** They live in the per-pairing shared runtime, and `coalesce_events()` answers an unknown pairing with a fresh, *disabled* flag rather than an error — so declaring coalescing succeeded, asserted success, and wrote to a throwaway flag while the drain read another. Every "coalesced" reading was the undeclared lane. `E2e::on_broker` now does what the supervisor does before building the transport, and the measurement asserts the flag and that merging actually happened. That also needed the harness's flow control to stop counting messages as events: one merged message stands for `coalescedCount` source events, so decrementing per message left the drain permanently behind and asked for a full merge window almost every event (a 3-minute measurement became hours). `assert_lane` learns the same shape — a merged message keeps its group's *newest* envelope and `idx` and carries the whole group's text, which is how the client reads it (`start = idx - coalescedCount + 1`). **The history measurement was not measuring the phone's page.** `dump_entries` fetched a whole session and let the bridge's 512 KiB budget reduce it, which answers "as many newest exchanges as fit", not the newest `HISTORY_PAGE_USER_EXCHANGES` (3, since #607) the phone asks for — three-fold high on a lean page. The scripted agent now pages like the real one (`paginate_backward`), and `measure-lean-history.py --phone-page N` measures the real page through the shipping trim and budget. Its `--session` flag lets a run name the same sessions the other measurement uses. **The numbers follow.** On the three heaviest runs, the phone's lane is undeclared 70.3 / 66.6 / 60.9 MB → coalesced 3.12 / 2.97 / 2.44 MB → coalesced + lean 0.82 / 0.82 / 0.47 MB. The trim's own contribution is **-72% to -81%**, not the ~-98% a raw-to-lean ratio suggests: that credits the trim with merging it did not do. `CONNECTION.md` now states both steps, and its history figures are the phone's page rather than a whole session.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Validation