Repository navigation
sidebar drag: a held extent is drawn, not written; kept once on release; layout binds nothing - #2107
Conversation
0894315 to
f236fcc
Compare
|
Rebased onto c4e25bd (f236fcc). One change beyond the rebase, to agree with #2106: #2106's 🤖 Generated with Claude Code |
…se; layout binds nothing Profile of a drag (Qt offscreen, Pixel 8a width, #comms open): every grip move wrote the arrangement into the settings (SidebarLayout.resize -> _store -> objectstate update and invalidation, ~37 ms each) and saved toad.json (SidebarSurface.arranged -> keep_settings); every Qt layout pass re-bound the thread pane, re-presenting its Comms and Context panels, which started Core reads; and every width change re-fitted every channel row's text and re-measured the pages. - SidebarLayout holds a grip's extent in memory (hold / keep_held / drop_held): `placements` draws it, `resting_placements` is what the settings keep. The shared drag rule (SidebarSurface extent_dragged / extent_released) only holds and lays out while held, and on release writes the held extent once and keeps the settings once (or, released at the wall, drops it and folds). - SidebarChromeArrangement: while a hold is on, the conversation keeps the room the kept arrangement gives it, so it is laid out (its rows measured) once, on release, in both frontends. - Qt: a layout pass (rearrange_sidebars) presents the bars and places them, coalesced to one per turn of the event loop, and binds nothing; the thread pane follows the selected page (present_panes), not geometry. A held bar's content keeps its length against the wall, so its rows are fitted once, on release. - qt_drive `drag_speed`: 40 handle moves with #comms open; per-move handling time, the loop's lateness after each move, the release, and a profile (TOAD_DRAG_PROFILE=1). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RnH6dT7wdh7i4tjJZQdFu3
f236fcc to
20fae08
Compare
|
Rebased onto 3712ef8 (20fae08), with one fix.
Probe after the fix:
Checks:
🤖 Generated with Claude Code |
Tristan: "resizing the bar is very, very slow. It was slow in the TUI, and it's also slow on Android and in the GUI."
What a drag cost (profile, Qt offscreen, Pixel 8a width, #comms open, 40 handle moves)
SidebarLayout.resize→_store→store_terminals→ objectstateupdate_parameterand invalidation, 0.70 s over 19 writes (37 ms each, plus 0.54 s of dataclass validation under it)toad.jsonsaveSidebarSurface.arranged→keep_settings_bind_thread_pane, re-presenting the Comms and Context panels, which startedthread_comms_source.relationships(1.54 s) and context refreshesConversationRows.resizeEvent→fit, ~1,100 calls) and re-laid out the pagesFix, at the owners (both frontends through the shared rule)
SidebarLayoutholds a grip's extent (hold/keep_held/drop_held).placementsdraws the held extent andresting_placementsis what the settings keep. Nothing is written during a drag.SidebarSurface.extent_dragged/extent_released):SidebarChromeArrangement: while a hold is on, the conversation keeps the room the kept arrangement gives it, so its rows are measured once, on release, in Qt and the TUI alike.rearrange_sidebars):present_panes), not geometry.CapturedDragalready folds queued moves into the newest one, so slow frames never build a backlog.Before / after, at phone throttle (
systemd-run --user --scope -p CPUQuota=45%), main and branch run back to backThe machine was loaded by other work (load average ~12), so compare within a row, not across runs.
Qt (
qt_drive drag_speed, 40 moves, one 16 ms frame after each):TUI (pilot drag of the resize handle, 40 moves, time to the drawn screen; two interleaved rounds):
remote_core.callandfield_codecdecoding of observations.Checks (final head 0894315 on main 75dc1de)
qt_drive slide: exit 0, with the grip behaviour unchanged (fold at the wall keeps the extent, strip click reopens, strip drag opens, slider to 0 folds). This includes sidebar grips: drag to the wall folds, the strip reopens or drags open; panes and tabs animate #2100 if it lands first.toad.qt→ widgets imports 0.shadow_checkfinds 0.tools/android/check.shexits 0, including the shipped-app run.🤖 Generated with Claude Code
https://claude.ai/code/session_01RnH6dT7wdh7i4tjJZQdFu3