Skip to content

Drop Textual UI imports from Qt/Android cold start - #2255

Merged
trissim merged 2 commits into
mainfrom
perf/qt-drop-textual-session-scope
Nov 24, 2026
Merged

trissim merged 2 commits into
mainfrom
perf/qt-drop-textual-session-scope

Conversation

@trissim

@trissim trissim commented Nov 24, 2026

Copy link
Copy Markdown

Summary

Cuts 68 eager modules (50 textual.* + all toad.widgets.*, toad.screens.*, toad.frame_presentation, and toad.session_scope) out of toad.qt.android.load_client():

  1. toad.qt.bound_view and toad.client.view_binding_protocols now import toolkit-neutral toad.client.session_scope.SessionScope instead of Textual's toad.session_scope (which eagerly pulled toad.widgets.side_bar, sidebar_viewport, comms_menu, and toad.screens.modal).
  2. Moved Cascade and ARRIVAL (pure ui_theme.effects declarations) from Textual's toad.frame_presentation to shared toad.motion, updated toad.qt.history, toad.widgets.transcript_history, and tests to import ARRIVAL from toad.motion directly (no compatibility re-export). Cuts textual.app, textual.screen, textual.widgets, textual.command, and textual.css.stylesheet out of Qt/Android cold start.
  3. Removed unnecessary textual.widget.Widget and unused textual.content.Content imports from toad.sidebar_placement (using local StyledControl / _ControlStyles Protocols) and toad.setting_choices (making NavigationBarPosition.around generic [W]).

Evidence

  • toad.qt.android.load_client() on Core 2c59c91cfc39:
    • Total loaded modules: 2060 -> 1992 (-68 modules)
    • textual.* modules: 158 -> 108 (-50 modules)
    • Loaded toad.widgets.*, toad.screens.*, toad.frame_presentation, toad.session_scope: [] (0)
  • tools/qt_inherit_ratchet.py, tools/shadow_check.py, tools/guarded_imports.py: all 0.
  • Focused tests (test_qt_channel_activity_sidebar.py, test_view_actions_panel.py, test_interactive_dialog.py, test_arrival_fade.py): 11/11 passed.

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