Skip to content

Hoist relationship open & wrong-bus checks onto RelationshipPanel; use inspect_owner and wire_revision skip on Qt panels - #2334

Merged
trissim merged 1 commit into
mainfrom
hoist/relationship-panel-open
Nov 27, 2026
Merged

trissim merged 1 commit into
mainfrom
hoist/relationship-panel-open

Conversation

@trissim

@trissim trissim commented Nov 27, 2026

Copy link
Copy Markdown

Summary

Eliminates the Qt/Textual parallel copy of relationship row opening (IMPL-12, paper1 Prop 4.2) and removes manual identity.root_path is None absence probes (IDEN-3, NRA 72bdcf9e99) from both Qt sidebar panels:

  • RelationshipPanel (src/toad/client/relationship_tree_state.py): now owns open_current_relationship and open_relationship_target (re-reading service.relationships, handling stale entries with changed_entry_warning, and checking belongs_to_wire for wrong_bus_warning) through 3 one-line frontend hooks (notify_comms_warning, refresh_after_changed_entry, select_relationship_target).
  • QtThreadCommsPanel (src/toad/qt/thread_comms_panel.py): deleted _open_current, switched _refresh to SessionIdentity.inspect_owner, added wire_revision skip so unchanged observations do not rebuild the QTreeWidget, and re-filters cached _snapshot in memory on search changes (zero Core reads per search keystroke).
  • ThreadCommsSidebar (src/toad/widgets/thread_comms.py): delegates open_target and _navigate_current straight to inherited RelationshipPanel.open_relationship_target / open_current_relationship.
  • QtContextExplorer (src/toad/qt/context_panel.py): replaced if root is None: with SessionIdentity.inspect_owner, matching Textual's ContextExplorer.

Verification

  • REL_IMPORTS=0, qt_inherit_ratchet.py 0/0/0/0/0, shadow_check.py 0, guarded_imports.py 0.
  • NRA ForeignAbsenceProbeDetector: 0 findings across relationship_tree_state.py, qt/thread_comms_panel.py, and qt/context_panel.py (eliminated 72bdcf9e99).
  • Added test_relationship_panel_owns_open_current_and_target_on_both_frontends in tests/guards/test_shared_frontend_members.py verifying shared ownership + detached/stale/wrong-bus/matching-bus flows (57/57 focused tests passing in 0.60s).

…e inspect_owner and wire_revision skip on Qt panels
@trissim
trissim merged commit cf20a6f into main Nov 27, 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