Repository navigation
qt arrivals: rows rise in place and the reader glides; the queue strip opens and closes its height - #2110
Merged
Conversation
trissim
force-pushed
the
fork-qt-arrival-polish
branch
from
November 18, 2026 07:43
19241a0 to
aa0b3ba
Compare
…p opens and closes its height The phone showed messages snapping in, out and back, and the queue strip popping on every send. Measured with a new qt_drive `arrival` scenario (scratch threads only): - A sent row's receipt answers several times just after it lands; each answer is a new preparation key, and the delegate drew the row as plain text, at another height, until the new look was prepared. The delegate now keeps the row's last prepared look meanwhile, and the shared pager's `prepare_fragments` styles rows before they are published. - Arriving rows run the TUI's ARRIVAL cascade on the app's clock, started from `repaint` as Textual starts it, on both publish paths; rows replacing a draft or live block do not. - A following reader glides to arrivals (motion.FOLLOW_ARRIVAL) from where the end was; every Qt follow point defers to the glide. - The queue summary and delivery controls open, close and follow their wrapped height (motion.ROW_REVEAL), turning around instead of hiding and showing again. - tools/glyph_check.py (first step of tools/android/check.sh) refuses an emoji-default code point drawn without U+FE0E. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RnH6dT7wdh7i4tjJZQdFu3
…post fails the walk
On a thread, the scripted sender was an unregistered identity: the bus refused every post
('Sender ... is not registered') and the drive discarded the error, so the thread run
covered only the composer's own sends. The other party in a thread's view is the thread
itself replying to the user; it now posts as that, and a refused post raises.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RnH6dT7wdh7i4tjJZQdFu3
The shipped app exited with SIGSEGV at shutdown (2 of 17 sequential runs), the faulthandler trace in AnimationClock.tick asking RowReveal.animation_visible -> row.isVisible() on a queue row whose C++ side was already destroyed: the window's timer outlives a conversation's widgets. Deterministic probe: a reveal running when its row is destroyed, then a tick: the unfixed code raises 'Internal C++ object already deleted' from the same frame. toad.qt.widget_animation.WidgetAnimation owns this for every widget-bound clock target: the widget's destroyed signal stops the target on the clock, and a destroyed widget is never asked anything. RowReveal, ArrivalGlide and ArrivalFade inherit it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RnH6dT7wdh7i4tjJZQdFu3
trissim
force-pushed
the
fork-qt-arrival-polish
branch
from
November 18, 2026 08:10
aa0b3ba to
5798ecc
Compare
trissim
added a commit
that referenced
this pull request
Nov 18, 2026
… one is named The sidebar is a live list, filled from observations that can arrive after the step that reads it. Scenarios took rows from it with a one-shot next(), which raised StopIteration whenever the row was not drawn yet (history and composer at qt_drive.py:649 today, twice, on main as on branches). Scenario.found(wanted, label, rows) owns every such lookup. It reads the rows again every tenth of a second, through the loop the scenario's steps run on, until a 20 s deadline. Past the deadline it raises LookupError naming the missing row and every row listed. channel_row, thread_row and the new listed_thread wait through it, and channel_listed goes. Every one-shot next() over sidebar or thread rows now goes through found, and so does each scenario that took threads[0], children[0] or thread_rows()[0] from a list that could still be empty, and #2110's ArrivalScenario, which used channel_listed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RnH6dT7wdh7i4tjJZQdFu3
trissim
added a commit
that referenced
this pull request
Nov 18, 2026
…ce; qt_drive waits for sidebar rows (#2112) * open path: the views' settings class is set up after startup; rows measure pending stand-ins - ObjectConfiguration.prepare_settings_type makes the views' lazy settings class, each nested one, and validates one instance, so their annotations resolve once. That is class setup the first view the reader opened used to pay (238 ms median at a phone's speed on the cold #comms open). ApplicationLifetime.start runs it once the restored tabs are up, before the heap settles, in both frontends. - PreparedOnFill.resolved: pyqt-reactive measures a row's final formatting only; what a history row's measurement resolves to may be its pending stand-in, which is estimated instead of laid out (pyqt-reactive#63 calls it; an older delegate fills as before). - qt_drive: FRAME_TIME_OPEN times the open path per action (view configuration, lazy types, the row delegate, settings writes and their snapshot and invalidation); FRAME_TIME_WRITES logs each settings write with the registered states (tools only). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RnH6dT7wdh7i4tjJZQdFu3 * qt_drive: a sidebar row is waited for, with a deadline, and a missing one is named The sidebar is a live list, filled from observations that can arrive after the step that reads it. Scenarios took rows from it with a one-shot next(), which raised StopIteration whenever the row was not drawn yet (history and composer at qt_drive.py:649 today, twice, on main as on branches). Scenario.found(wanted, label, rows) owns every such lookup. It reads the rows again every tenth of a second, through the loop the scenario's steps run on, until a 20 s deadline. Past the deadline it raises LookupError naming the missing row and every row listed. channel_row, thread_row and the new listed_thread wait through it, and channel_listed goes. Every one-shot next() over sidebar or thread rows now goes through found, and so does each scenario that took threads[0], children[0] or thread_rows()[0] from a list that could still be empty, and #2110's ArrivalScenario, which used channel_listed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RnH6dT7wdh7i4tjJZQdFu3 --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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 on the phone: messages "snap in … sometimes come in, come out, come back in", and the queue "pops in, pops out" on send.
What was wrong, measured
tools/qt_drive.py arrivalsends three messages from the composer while a scratch sender (agent-comms send --from scratch-live-pipeline) posts three into#scratch(orTARGET=scratch-live-pipeline). It logs every row-model update by key and text, which rows were drawn plain, the queue rows and viewport height every 16 ms, the scroll position while following, and each arrival-handling call's wall and CPU time.ARRIVALeffect, and a following reader jumped their full height: up to 109 px per send on a thread, 1566 px on main at phone throttle.Changes
QtConversationHistory.prepare_fragments): the shared pager's preparation hook now formats each shown row at the window's width before it is published.HistoryRowDelegate.styled_formatting): a drawn row whose look changes keeps its last prepared formatting until the new one lands, never the plain fallback.ArrivalFade): Qt runs the TUI'sARRIVALcascade (NEW_TEXT) on the app'sAnimationClock. It starts fromrepaint(fragments), where Textual'sEffectPhase.on_new_arrivalstarts it, so both publish paths fade: an edge extended under the reader, andshow_neweston a thread. Rows committed while a draft or live block stood in for them don't fade, since they replace it in place.ArrivalGlide,motion.FOLLOW_ARRIVAL): a following reader glides from where the end was before the arrived rows, measured from their own heights. The three places Qt follows the end (anchorforFollowTailCommit.restore_reader,check_follow,keep_reader) all defer to the glide throughgliding_to_end. A glide never moves up, and a row arriving mid-glide turns it toward the new end. A reader scrolled up is not moved and the shared jump bar shows.RowReveal,motion.ROW_REVEAL): the summary and the delivery controls open and close their height, and the summary follows its wrapped line count, on the clock. A summary that empties and fills again turns around where it is instead of hiding and showing. Show and hide still follow the sharedqueue_summary/offers_send_now.TEXTUAL_ANIMATIONS=none, the clock disabled) lands everything at once.tools/glyph_check.py, run first bytools/android/check.sh): refuses a drawn string literal insrc/toad(docstrings excepted) with a code point that defaults to emoji presentation unless U+FE0E follows it. The five the font work named are ⏪ U+23EA, ⏳ U+23F3, ⚡ U+26A1, ⚫ U+26AB and ❓ U+2753. The check covers the whole BMP Emoji_Presentation=Yes set: ⌚ ⌛ ⏩ ⏪ ⏫ ⏬ ⏰ ⏳ ◽ ◾ ☔ ☕ ♈–♓ ♿ ⚓ ⚡ ⚪ ⚫ ⚽ ⚾ ⛄ ⛅ ⛎ ⛔ ⛪ ⛲ ⛳ ⛵ ⛺ ⛽ ✅ ✊ ✋ ✨ ❌ ❎ ❓ ❔ ❕ ❗ ➕ ➖ ➗ ➰ ➿ ⬛ ⬜ ⭐ ⭕. None of them is declared anywhere Toad draws from today (Toad, ui_theme, agent_comms, textual), so there was nothing to append U+FE0E to, and the check finds 0. It keeps any new one from being declared without U+FE0E. Font loading (toad.qt.glyph_fonts, qt fonts: ship the glyph fonts Toad draws with, ahead of emoji (Android tofu and orange symbols) #2105) is untouched.Evidence
qt_drive.py arrival, Pixel 8a profile, offscreen, live bus, scratch threads only.#scratch#scratch16 / 22 / 43 ms; thread 16 / 17 / 31 msrows_changed12.6 ms,show_pages5.8 msrows_changed3.7 ms,show_pages3.0 msAt phone throttle (
systemd-run --user --scope -q -p CPUQuota=45%), main's longest stall was 503 ms and the branch's 300 ms in the first run. In that run the sender processes shared the app's quota; with the senders in a scope of their own, each arrival-handling call's own CPU on the branch is at most 3.0 ms (show_pages), 3.7 ms (rows_changed), 0.3 ms (keep_reader) and 0.1 ms (repaint). On main,rows_changedreaches 12.6 ms. Wall gaps of about 200 ms happen on both sides and away from any update (205 ms elsewhere vs 201 ms near updates). They are the quota freezing the whole process under background load:keep_reader, at 0.3 ms of CPU, shows 86 ms of wall. So no stall over 50 ms comes from arrival handling. The background load is the frame-stall lane's.Gates, run once on the final head (rebased onto 7752071):
qt_inherit_ratchet: bare Qt 21/21, parallel copies 0.ArrivalFadeis declared Qt-only: it paints the shared cascade frame as QPainter opacity.shadow_check: 0.glyph_check: 0.#scratchthe max was 75 ms, one gap outside arrival handling, whose CPU was at most 4.6 ms per call.tools/android/check.sh(withPYTHONFAULTHANDLER=1): exit 0, through closure, assemble (apk: assemble owns the app folder; leftovers of older builds are removed and excluded #2109's planted leftovers removed), the shipped-app check, and the shipped app run over every view kind and bound key on a scratch bus.Thread replies
The first thread runs showed only the composer's own sends. The bus explains why:
agent-comms history --as scratch-arrival-sender scratch-live-pipelineis empty, and a hand send answers{"error":"Sender 'scratch-arrival-sender' is not registered."}. The scenario's sender was unregistered, and the drive discarded its stderr and exit code. That was a scenario bug, not a Qt history bug. On a thread the other party is the thread itself, so the drive now posts--from scratch-live-pipeline --to user(landed as seq 940 by hand), and a refused post fails the walk.Rerun on the thread:
arrival reply 0/1/2appear in Qt's thread view at 3.97 s and 4.20 s.Shutdown SIGSEGV: found and fixed here
The shipped app (
tools/android/shipped_run.py) exited with SIGSEGV at shutdown, after its last step. faulthandler places it inwindow._tick_animation→AnimationClock.tick→RowReveal.animation_visible(queue_ui.py:116,self.row.isVisible()), on a queue row whose C++ side was already destroyed. The window's clock timer outlives a conversation's widgets, so the cause is this PR's widget-bound clock targets, not main.Counts (
shipped_run.pyonly,PYTHONFAULTHANDLER=1 -X faulthandler):check.shrun and the first loop run).Deterministic probe: a reveal is running when its row's C++ side is destroyed, then the clock ticks.
Internal C++ object (QLabel) already deletedfrom the same frame. At app teardown it reads freed memory instead. In normal use the same path is a tab closing mid-reveal.Fix at one owner:
toad.qt.widget_animation.WidgetAnimation. Every widget-bound clock target binds its widget once. The widget'sdestroyedstops the target on the clock, and a destroyed widget is never asked anything.RowReveal,ArrivalGlideandArrivalFadeinherit it. #2100's targets (TabGrowth,TabGhost,PaneSlide,NameWave) move window-lifetime widgets that die with the clock's own timer, so they keep their current base.Not covered
scratch-live-pipelinehas no live CLI, so CLI draft rows (qt live agent: message composers take input as Textual's (hint, queue, send now); CLI draft as history rows #2083) and live turn blocks (turn presentation: shared turn code names what to show, each frontend draws it; permission review builds again #2101) were not driven live. Their handoff is checked in code:publish_snapshotpublishes the committed page and then clears the draft with no await between, so Qt paints no frame with neither row, and committed rows replacing a draft or live block do not fade.▼(no emoji form) is why a tapped row looks grey. qt fonts: ship the glyph fonts Toad draws with, ahead of emoji (Android tofu and orange symbols) #2105's bundled symbol fonts ahead of emoji are that fix. This desktop Qt cannot paint the phone's COLRv1 emoji font, so the orange was shown by font choice, not pixels.🤖 Generated with Claude Code
https://claude.ai/code/session_01RnH6dT7wdh7i4tjJZQdFu3