Fix tree disappearing - #3061
Merged
HelioGuilherme66 merged 3 commits intoAug 1, 2026
Merged
Conversation
The Tree is a CustomTreeCtrl, i.e. a wx.ScrolledWindow. AUI reparents the managed window when a floating pane is docked, and on wxGTK a reparented ScrolledWindow permanently stops receiving paint events: the widget keeps its parent, size, visibility and contents, but OnPaint is never called again, in any parent, for the rest of the session. Measured with a paint counter: while floating it kept climbing, and from the first dock onwards it froze and never moved again, including through further float/dock cycles. Refresh(), Update(), Hide/Show, re-Reparent, SendSizeEvent, Freeze/Thaw, Layout, Enable cycling, size toggling and InvalidateBestSize were all tried against a standalone reproducer and none of them revived it. AUI now manages a plain wx.Panel holder with the Tree as its sizer child, so the ScrolledWindow is never reparented. This is the idiom the Files pane already uses (FileExplorer is a wx.Panel wrapping its tree_ctrl), which is why that pane was never affected. self.tree is still the Tree, so the plugin API is unchanged; only the AUI registration points move to the holder, and on_show_tree shows the holder and pane as well so F12 does not reveal the tree inside a still-hidden parent. Also drop the tree rebuilding that hung off UI events: - EVT_SHOW was bound to on_show_tree, which calls populate() and so DeleteAllItems(): the panel merely becoming visible destroyed every node and its handler data. EVT_MOVE did the same on every pane move. Repopulating now happens only on explicit paths (startup, enable(), opening a suite, F12, theme change). - The show_count parity counter existed only to damp that re-entrancy. It made behaviour depend on the parity of all previous calls, which is why the symptom looked intermittent. - on_show_tree populated twice (directly and again via _update_tree), and _update_tree called refresh_view() which populate() already does. - OnFloatDock no longer rebuilds the tree. With the parity counter gone it would repopulate on every float and dock, and refresh_view() re-selects the first datafile node, so docking would have reset the current selection every time. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
RIDE is a wxPython GUI with no in-process automation API, and no unit test covers docking, painting or pane layout -- the areas where its long-standing bugs live. Verifying a UI change meant launching by hand and looking. This adds a driver that runs the real app headlessly (Xvfb + xfwm4 + XTEST input via xdotool) and observes it with screenshots, plus a SKILL.md that documents it. Every command in the skill was executed while writing it. The driver can launch, screenshot, click, send keys, toggle the tree via the View menu, and drag the Test Suites pane between floating and docked using a real stepped drag onto the AUI docking guide. check-tree turns "the panel went blank" into an assertion: it counts unique colours in the tree pane, exiting 0 for RENDERED and 1 for BLANK. Verified in both directions against the blank-on-dock bug -- HEAD~1 reports 2 colours (BLANK), HEAD reports 585 (RENDERED). RIDE_SRC points the driver at another checkout, so an old commit can be run with today's driver to A/B a GUI regression. Traps found while building it, all documented in Gotchas: - Without PYTHONPATH=src, `python -m robotide.__init__` imports the installed package from site-packages, so you silently test released code. The driver logs the resolved robotide path. - A window manager is required; without one AUI floating mini-frames misbehave. - `xdotool key --window` sends a synthetic event that GTK ignores; only XTEST works. The F12 accelerator is unreliable even so, hence toggle-tree. - RIDE captures stdout, so print() inside the app never reaches the terminal. - Runs rewrite ~/.robotframework/ride/settings.cfg; `up` backs it up and `down` restores it. - The floating Files pane overlaps the tree region and leaks colours into check-tree, so it gets parked first. - check-tree cannot distinguish a blank pane from a hidden one, so dock-tree must run immediately before it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
HelioGuilherme66
merged commit Aug 1, 2026
59d5f06
into
robotframework:develop
9 of 10 checks passed
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.
No description provided.