Skip to content

Profiles: Use one drawer lookup for every drawer check - #988

Closed
tobocop2 wants to merge 1 commit into
fix/profile-warning-sourcefrom
refactor/chat-fleet-drawer-lookup
Closed

tobocop2 wants to merge 1 commit into
fix/profile-warning-sourcefrom
refactor/chat-fleet-drawer-lookup

Conversation

@tobocop2

Copy link
Copy Markdown
Owner

Problem

Pressing Tab in chat to move into the fleet drawer still searched the whole screen for the drawer, while every other drawer check had moved to a lookup over the screen's direct children.

Solution

The direct-child lookup now lives with the drawer widgets and every drawer check uses it, including the Tab handler in chat. Behaviour is unchanged.

PR #984 added a direct-child scan in app.py so the fleet and
sessions drawer checks skip screen.query()'s whole-subtree walk.
The chat screen's Tab-into-fleet handler still used query(), so it
paid the same cost the app-level checks were built to avoid.

Move the lookup to widgets/drawer.py, the module both app.py and
chat.py already import from for the Drawer base class, and point
both at the shared helper. No behaviour change.
@tobocop2

tobocop2 commented Oct 3, 2026

Copy link
Copy Markdown
Owner Author

This change is now part of #1003, which collects every Profiles pull request on one branch. Review and merge happen there. The branch stays in place.

@tobocop2 tobocop2 closed this Oct 3, 2026
@tobocop2
tobocop2 deleted the refactor/chat-fleet-drawer-lookup branch November 1, 2026 06:09
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