Skip to content

Keep channel view and sidebar intact across transient disconnects and wrap error toasts - #2351

Merged
trissim merged 1 commit into
mainfrom
fix/qt-disconnect-black-screen-and-toast-wrap
Nov 28, 2026
Merged

trissim merged 1 commit into
mainfrom
fix/qt-disconnect-black-screen-and-toast-wrap

Conversation

@trissim

@trissim trissim commented Nov 28, 2026

Copy link
Copy Markdown

Fixes the Android/Qt black screen on network disconnect/handoff and vertically clipped error toasts.

Root causes & fixes

  1. Network-handoff OSError retiring tabs (src/toad/client/history_state.py): Added OSError to TRANSIENT_SOURCE_ERRORS (matching ObservationFailureReport in connection.py) so WiFi <-> 5G+ handoffs pause cleanly in WaitingSourceWork instead of retiring the tab into RetiredSourceTranscript and firing a red History error toast.
  2. Synchronous app.source() crashes when opening/refreshing a tab while disconnected (src/toad/client/history.py, src/toad/qt/window.py, src/toad/qt/goal.py, src/toad/qt/thread_view.py, src/toad/client/history_notifications.py, src/toad/widgets/comms_chat.py): WireSource.core now resolves self.access.observation.observed().core dynamically instead of pinning CoreAccess at construction, and QtGoalBar / OneHistoryNotifications / ConversationView.thread_label_read use coordination_root and defer source() into async workers.
  3. Sidebar wiped blank on transient FailedObservation (src/toad/client/sidebar_state.py, src/toad/qt/window.py): Added polymorphic retained_root() / retained_model() on SidebarModelState; FailedSidebarState keeps the last shown SidebarModel and matches serves(path) against its retained root so reconnecting to the same bus does not tear down the sidebar.
  4. Resumable ComposerPlaceholder (src/toad/qt/conversation.py): Restores _composer_reserved and the viewport eventFilter if pool.acquire/build raises instead of stranding a permanently dark box.
  5. Clipped multi-line error toasts (src/toad/qt/float_layer.py): Enabled heightForWidth on NoticeLine, sized QtFloatLayer.place() via layout.totalHeightForWidth(width) instead of adjustSize(), and re-activated layout on dismiss/resize.

Verification

  • pytest tests/model/test_android_resync_lazy_load_catchup.py tests/textual/test_sidebar_failure_lifetime.py tests/textual/test_message_file_chips.py tests/textual/test_older_bus.py: 32 passed.
  • tools/qt_inherit_ratchet.py: 0/0/0/0/0.
  • REL_IMPORTS=0.

@trissim
trissim merged commit 1c56e84 into main Nov 28, 2026
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