Repository navigation
Fix Qt overdraw/paint cache, compact marquee tabs, and multi-file pickers - #2345
Merged
Merged
Conversation
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
Fixes Android/Qt message-view overdraw & parallel-path rendering glitches, speeds up Qt scroll paint frames, makes session tabs compact with marquee banner scrolling on long names, and enables multi-file selection in both Qt file pickers.
Numbers first (unprofiled
tools/qt_scroll_profile.pyvs9db246834)wheel: frame median0.171 ms -> 0.126 ms(-26%), p950.425 ms -> 0.315 ms(-26%), latency median0.551 ms -> 0.411 ms(-25%)arrival: frame median0.561 ms -> 0.466 ms(-17%), p951.114 ms -> 0.805 ms(-28%),reader_jump_px_max = 0pageup: frame median1.253 ms -> 0.796 ms(-36%), p958.932 ms -> 7.651 ms(-14%), latency p95219.8 ms -> 192.2 ms(-13%)tools/qt_inherit_ratchet.py:0 / 0 / 0 / 0 / 0(Qt-only:47, zero new bare Qt classes)REL_IMPORTS=0; focused pytest: 79 passed in 4.59s1. Android overdraw & parallel-path rendering fixes
src/toad/qt/virtual_scroll.py(VirtualRowCanvas.invalidate_row_height): stopped overwriting_heights[row] = -1mid-frame (which collapsed a freshly rendered row to 0 px in anypaintEventfiring before the 16 ms_viewport_update_timerflushed, shifting lower rows over staleWA_OpaquePaintEventpixels). Dirty rows now stay in_dirty_heightsand drain atomically indo_layout().src/toad/qt/virtual_scroll.py(RowDocumentStore._measure_slice+apply_measured_rows): batched row measurements and applied them insidekeeping_end()/holding_position()(and flushed_flush_reader_scroll()first inQtHistoryWindow.apply_measured_rows), instead of mutating_heightsbeforeholding_position()snapshotted the anchor offset.src/toad/qt/history.py(HistoryRowDelegate.paint_row/paint_pictures): clipped non-final arriving rows (arrival.offset_y != 0 and row + 1 < count) to their own layout slot so the+36 pxarrival slide never paints over sibling rowrow + 1.src/toad/qt/history.py(HistoryRowDelegate.link+QtHistoryWindow.acquire_links): madelink()a no-op whenLinkContextis unchanged (stopping parallelacquire_linksfrom wiping_row_sizesand flashing an already-loaded conversation) and cached settledapp.renderer.linksso subsequent tabs start with resolved references instead of drawing once and re-rendering.src/toad/qt/history.py(paint-frame cache): deferreddevice.palette()copy to tile-miss rasterization, cached_backing_format_cache, and switchedQtStickyHeader.draw_pinnedfromwindow.font().key()towindow.rows._font_spec(window.font()).2. Compact tabs + banner marquee (
src/toad/motion.py,src/toad/client/name_wave.py,src/toad/qt/name_wave.py,src/toad/qt/window.py)#commsdrops from 117 px to 89 px;toad-qtfrom 109 px to 82 px;TAB_GAP = 4, compact QSS padding4px 2px 4px 6px).min(MAX_TITLE_CHARS, strip_width // 3)synced on resize/layout so narrow Android screens consistently fit at least three tabs across the strip.MarqueeSweep/TAB_MARQUEE(toad.motion) andTitleMarquee(toad.client.name_wave) inherited byQtTabMarquee: starts one bar-level marquee animation onAnimationClockonly while at least one tab overflows, pauses 1.0 s before scrolling at 28 px/s with seamless wrap-around, and repaints only overflowing tabs whose pixel offset moved.3. Universal multi-file pickers (
src/toad/qt/file_pickers.py)open_file_dialogfromExistingFiletoExistingFiles(AndroidAttachChooser.javaalready forwardedEXTRA_ALLOW_MULTIPLEand unpackedClipData, andopen_file_dialogalready iteratedselectedUrls()).ExtendedSelection+ multi-attach inQtPathSearch.Verification
REL_IMPORTS=0QT_QPA_PLATFORM=offscreen PYTHONPATH=src:. python tools/qt_inherit_ratchet.py->0 / 0 / 0 / 0 / 0(Qt-only: 47)pytest -p no:xdist tests/model/test_android_perf_ux_arrivals.py tests/model/test_android_resync_lazy_load_catchup.py tests/model/test_qt_history_width.py tests/textual/test_name_wave_repaint.py->79 passedtools/qt_scroll_profile.py-> faster across all scenarios,reader_jump_px_max = 0