Skip to content

Replace THREAD_SIDEBAR_PANELS tuple and spec_key strings with ThreadSidebarPanel DeclaredFamily - #2264

Merged
trissim merged 1 commit into
mainfrom
refactor/thread-sidebar-panel-family
Nov 24, 2026
Merged

trissim merged 1 commit into
mainfrom
refactor/thread-sidebar-panel-family

Conversation

@trissim

@trissim trissim commented Nov 24, 2026

Copy link
Copy Markdown

Closes the sole SSOT-critical NRA semantic-descent boundary on src/toad/{qt,client} (MEMB-1, MEMB-2, MEMB-4) and hoists repeated setWindowFlags(Qt.WindowType.Widget) (Pattern 59: Sibling Override Step):

  • src/toad/thread_sidebar_declarations.py: replace THREAD_SIDEBAR_PANELS tuple literal, ThreadSidebarPanelSpec, spec_for(key: str), and panel_specs_for_view(*, is_session: bool) with ThreadSidebarPanel(DeclaredFamily, affix="SidebarPanel") + DmSidebarPanel capability base and five declarative members (CoordinationSidebarPanel, CommsSidebarPanel, PlanSidebarPanel, ProjectSidebarPanel, ContextSidebarPanel). ThreadSidebarPanelBody now binds panel_type: ClassVar[type[ThreadSidebarPanel]] directly instead of a string spec_key.
  • src/toad/widgets/session_thread_panels.py, src/toad/qt/{coordination_panel,thread_comms_panel,plan_panel,project_panel,context_panel,placement}.py: delete all 10 spec_key = "..." string literals, key ThreadSettingsPane bodies and controls directly by ThreadSidebarPanel member classes, and iterate ThreadSidebarPanel.members_with(ThreadSidebarPanel).
  • src/toad/qt/session_panel.py + context_panel.py, plan_panel.py, thread_comms_panel.py: hoist self.setWindowFlags(Qt.WindowType.Widget) once into SessionPanel.__init__, deleting all 3 repeated sibling calls (NRA d380271da0).
  • tests/guards/test_shared_frontend_members.py: add test_thread_sidebar_panel_family_owns_both_frontends_panels.

Verified:

  • NRA (da434f76) on touched sidebar panel modules: 0 SSOT-critical semantic-descent boundary groups (down from 1).
  • toad.qt.android.load_client() cold-start: 1757 modules, agent_comms.comms=False, packaging=False.
  • tools/qt_inherit_ratchet.py: 0 / 0 / 0 / 0 / 0; tools/shadow_check.py: 0; tools/guarded_imports.py: 0.
  • tests/guards/test_shared_frontend_members.py + test_qt_members_are_not_shadowed.py: 11 passed (4.08s).

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