Skip to content

Wake paused wire history on CoordinationObserved, fix Qt jump_to_latest MRO, and disable sticky tree selection - #2254

Merged
trissim merged 1 commit into
mainfrom
fix/android-wire-resume-and-tree-selection
Nov 24, 2026
Merged

trissim merged 1 commit into
mainfrom
fix/android-wire-resume-and-tree-selection

Conversation

@trissim

@trissim trissim commented Nov 24, 2026

Copy link
Copy Markdown

Summary

Fixes two live Android/Qt regressions reported by Tristan plus a shadowed MRO defect in QtHistoryWindow:

  1. Channel/DM tabs no longer wedge in WorkingTranscript after an Android background/foreground disconnect (src/toad/client/prepared_pages.py, src/toad/client/history.py, src/toad/client/history_state.py, src/toad/qt/window.py):

    • WaitingSourceWork.observe() previously called view.thread_scope.observe(...) for every history. On channel/DM wire views, view.thread_scope is NoTranscript, whose observe() returns an empty ResourceRelease() and subscribes to nothing — so any transient CoordinationReadUnavailable left history._source_state stuck in WorkingTranscript forever, swallowing every subsequent show_sent / CoordinationObserved refresh into operation.owed and leaving sent messages stuck in Submitting until tab close/reopen.
    • Added PreparedPageSource.observe_availability(view, access, resume) (base delegates to view.thread_scope.observe), overridden by WirePageBuffer.observe_availability to subscribe to CoordinationObserved on access.events.
    • QtToadApp.application_state_changed now also calls coordination_access.check_route() and workspace_sessions.selected.reload() on ApplicationActive so returning from Android background recovers immediately.
  2. Fixed QtHistoryWindow MRO shadowing ReaderPlacement (src/toad/qt/history.py):

    • ShowsLatestJumpBar / ReaderWindow were listed ahead of ReaderPlacement, shadowing jump_to_latest (and forcing a one-line self.anchor(True) override that skipped multi-page request_latest).
    • Moved ReaderPlacement ahead of ShowsLatestJumpBar (matching Textual's Window) and deleted the redundant override.
  3. Cleared sticky green tree-item selection highlight on tap/drag (src/toad/qt/window.py):

    • ConversationRows inherited QTreeWidget's default SingleSelection with no reader of Qt's selection model, leaving tapped/dragged channel and thread items highlighted solid green until another row was tapped.
    • Set NoSelection + NoFocus on ConversationRows (itemClicked and HeldRowMenu long-press continue to work without selection).

Evidence

  • tools/qt_inherit_ratchet.py, tools/shadow_check.py, tools/guarded_imports.py: all 0.
  • tests/guards/test_shared_history_change.py + tests/model/test_qt_channel_activity_sidebar.py: 7 passed in 0.31s.

@trissim
trissim merged commit de16d0a into main Nov 24, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant