Repository navigation
history: a burst of arrivals shows its latest message, and the pin stacks the others' headers - #2131
Merged
Merged
Conversation
…acks the others' headers Tristan, 2026-11-18: "when there's a lot of messages that come in at once, maybe we should show the headers for all of them, like stacked, and then scroll up and show the most recent one. So it'd be like, three came in, here's the latest." One shared owner, both frontends: - `ArrivalBurst` (history_changes): messages published at the followed end within 4 s of each other are one burst; the pager hands every followed arrival to `PagingWindow.arrivals_followed` on both publish paths (an edge extended, a newest page shown). - `HeaderPin.pin` draws a stack: a "N new" count line, then the header of each earlier burst message whose head is above the top row (the latest 3), then the top row's own header as before. The pin draws the messages' own header blocks; nothing is collapsed or copied. - `PinsMessageHeader`: the reader scrolling up by hand ends the burst (the window's own scrolls only follow down, inside `layout_scroll`); `open_pinned` scrolls a chosen stacked message's head to the top row and ends it. Each window answers only `message_top(key)`. - Textual's `StickyHeader` draws its tuple through `LineBlockRow.drawn_blocks` and opens a clicked header; Qt's pin lays out one document per header and opens a tapped one, passing taps through as before when nothing is stacked. - Textual's `hold_arrival` places the latest shown arrival (from its head when it is taller than the window), not the first. Verified: Qt `arrival` drive at phone speed (BURST=5): one burst of 7, "7 new" over 3 stacked heads, a tap puts the chosen head on the top row; tests/textual/test_arrival_burst_stack.py the same in the terminal. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RnH6dT7wdh7i4tjJZQdFu3
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.
Tristan, 2026-11-18, on bursts of arrivals on Android: "when there's a lot of messages that come in at once, maybe we should show the headers for all of them, like stacked, and then scroll up and show the most recent one. So it'd be like, three came in, here's the latest."
Reading
When several messages arrive together while the reader follows the end:
One owner, both frontends
ArrivalBurst(client/history_changes.py): messages published at the followed end within 4 s of each other are one burst. The shared pager hands every followed arrival toPagingWindow.arrivals_followedon both publish paths (an edge extended, a newest page shown).HeaderPin.pin(pinned, stacked)draws the stack.PinsMessageHeader.repin_headerends the burst when the reader scrolls up by hand (the window's own scrolls only follow down, insidelayout_scroll).open_pinnedjumps to the chosen message and ends the burst.message_top(key)(Textual through its fragment location, Qt through its row rect).StickyHeaderdraws its tuple through a newLineBlockRow.drawn_blockshook.hold_arrivalplaces the latest shown arrival instead of the first.Evidence
arrivaldrive at phone speed (CPUQuota 45%, BURST=5, #scratch): one burst of 7 messages, with "7 new" over 3 stacked heads and the latest on screen. A tap on the first stacked header put its head on the top row (offset 0); following stopped and the burst ended. In the gate run (BURST=3): a burst of 6, 2 stacked, the same tap result.tests/textual/test_arrival_burst_stack.py: the same state and click in the terminal (80×30, scratch workspace bus).Gates (runtime core-11a019b19, Pixel 8a profile, live bus, each drive on its own config and state)
check.sh: exit 0, 0 fatal or traceback lines. The realtoad.jsonwas untouched.test_window_top_edge::test_wheel_up_through_saved_history_never_moves_forwardfails intermittently on main with the same assertion at both sizes.🤖 Generated with Claude Code
https://claude.ai/code/session_01RnH6dT7wdh7i4tjJZQdFu3