Ensure right panel contents are unloaded when closed #3130
Merged
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.
What's changing
The change in this branch ensures that when the right panel is closed its contents are unloaded.
Why
Fixes #3128
Details
I traced the root cause of the failures described in #3128 to these two lines, which are in the
table show details
test.zui/packages/zui-player/tests/right-click-menus.spec.ts
Lines 87 to 88 in a32bb54
At that spot in the test, it's intending to right-click on the
conn
tile in the query results with intent to select the Show In Detail Pane option from the drop-down menu. However, the changes in #3127 caused a problem with this because, now that we have Inspector-style results in the right panel, that made aconn
gridcell appear in the right panel that wasn't there previously (specifically, the one brought up in the prior testinspector show details
) and hence the test might try to right-click it when the underlyinglocate()
is performed to find theconn
on which to right-click. Since theconn
in the right panel can't be right-clicked, when the test happens to find and try to use that one, the no-op right-click causes the timeout in the test since theShow In Detail Pane
never appears.I verified this theory by trying my own hack fix first, which was to have the prior test (
inspector show details
) click a non-Detail tab in the right panel before closing the panel (I went with Correlations) since this had the effect of sweeping theconn
-in-right-panel out of the way so it would not trip up the next test (table show details
). Indeed, this was effective such that looped repeats of theright-click-menus.spec.ts
tests no longer saw the intermittent failures described in #3128.However, after showing this all to @jameskerr, he saw the cleaner fix would be to make sure the right panel contents are properly unloaded via the change that's now in this branch. Indeed, a looping repeat showed this fix to be effective as well.
Since #3128 prevented some recent advancements in the Zed pointer, I've gone ahead and advanced Zed in this branch as well.