Repository navigation
Fix ChannelPrompt pruning race, PanelMenu eviction leak, and stale PanelMenu tests - #2337
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes two real lifecycle races exposed when updating the stale pre-
#2250SideBarCollapsibleand pre-served_toolsTextual tests onmain:Prompt.sync_session/watch_agent_infoteardown race (src/toad/widgets/prompt.py:1075-1084,:1323-1325):AwaitRemove.prunesets_pruning = Truewhile removing child widgets (PromptTextArea) before the parentChannelPromptfinishes unmounting. Guardingsync_sessionandwatch_agent_infoonnot self._pruningstops_observed_activity_changedfrom raisingNoMatches: No nodes match 'PromptTextArea' on ChannelPrompt()during removal.PanelMenueviction worker & panel retention (src/toad/widgets/side_bar.py:1342-1357,src/toad/widgets/session_thread_sidebar.py:105-107):PanelMenu.open_selectionlaunches a"configuration-panels"worker holdingself.entries/self.pages/self.pickeroptions (all 5 panel widgets).PanelMenu.stop_configuration_loadcancels it on unmount andPanelMenu.release()(called fromSessionThreadSidebar.evict) cancels, awaits, and clearsentries,pages, andpickeroptions so evicted panel graphs are deterministically garbage-collected.PanelMenu/served_tools/ currentActionMenu&ActiveSidebarPlacementcontracts:select_thread_panel(ui, sidebar, widget_type)helper intests/support/textual_steps.pyand migratedreveal_project_tree,test_prompt_completion.py,test_sidebar_retirement.py,test_context_tree_keeps_overlapping_annotations.py,test_hint_input_and_filters.py,test_sidebar_pointer_focus.py, andtest_thread_relationship_sidebar.pyoff the removedThreadSidebarSideBarCollapsiblelayout.agent_comms.transport.tools.served->agent_comms.transport.served_tools.servedintest_thread_relationship_sidebar.py,test_message_file_chips.py, andtest_older_bus.py.Verification
test_prompt_completion.py,test_sidebar_retirement.py,test_context_tree_keeps_overlapping_annotations.py,test_hint_input_and_filters.py,test_sidebar_pointer_focus.py,test_thread_relationship_sidebar.py,test_message_file_chips.py,test_older_bus.py): 21/21 passed.REL_IMPORTS=0,qt_inherit_ratchet0/0/0/0/0,shadow_check0,guarded_imports0.