Skip to content

Fix disconnect black screen and stop WireView RPC storm on activity/read ticks - #2362

Merged
trissim merged 1 commit into
mainfrom
fix/disconnect-black-screen-and-rpc-storm
Nov 28, 2026
Merged

trissim merged 1 commit into
mainfrom
fix/disconnect-black-screen-and-rpc-storm

Conversation

@trissim

@trissim trissim commented Nov 28, 2026

Copy link
Copy Markdown

Fixes two live Pixel 8a bugs caught back-to-back (#comms 11398 battery drain + #comms 11842 Screenshot_20261128-014159.png blank black channel view):

  1. Disconnect black screen / blank channel view (IDEN-1) (src/toad/client/connection.py:274,492,892, src/toad/client/prepared_pages.py:625, src/toad/client/history.py:226,756):

    • ReadMarkedHistory._mark_read called self.withdraw_view() (QtConversationHistory.withdraw_view -> self.view.hide(), WireHistory.withdraw_view -> self.view.display = False) whenever source_is_current() returned False. On a network drop, FailedObservation.observes(root) is False, which permanently hid the open ConversationView inside QStackedWidget above the tabs and sidebar bars even after reconnecting.
    • Declared Observation.replaces(root) -> bool (default False for NotObserving / FailedObservation; not self.observes(root) on live Observing), exposed via CoreConnection.route_replaced / ReplaceablePageSource.route_replaced. _mark_read now withdraws a view only when route_replaced() is True (switched to a different live bus).
  2. Battery-melting 15.6 RPC/s storm (11,134 POST /mcp calls in 12 minutes, 3m 34s CPU in RemoteReadProcess + 4m 23s in qtMainLoopThread) (src/toad/client/history.py:345-380,458, src/toad/qt/page.py:36, src/toad/qt/window.py:1557,2100, src/toad/widgets/comms_chat.py:144):

    • WireView._refresh_source watched RosterView() (which inherits ActivityView) instead of RegistrationsView(), firing read_thread_config() (4 HTTP RPCs: comms_reference_names × 2, comms_channel, comms_thread_configuration) on every agent heartbeat/tool tick across the fleet.
    • QtToadApp.stores_changed and CommsChatView._coordination_observed unconditionally reloaded wire views on every CoordinationObserved event, firing comms_conversation_revision, comms_latest_sequence, and comms_wire_revision whenever any field of WireRevision changed (including activity, reads, notifications, goal_execution, expiry_tick), even when bus_seq, bus_changes, history, bus_identity, registry, and catalog were unchanged.
    • Gated read_thread_config on RegistrationsView() (matching connection.py:787 and session_navigation.py:605) and added shared WireView.needs_wire_refresh(announced) + Page.stores_observed(revision) so pure activity/read/notification/expiry ticks fire zero wire RPCs.

@trissim
trissim merged commit 47167dc 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