fix(sidebar): let the object selection follow the database being browsed again - #2560
Merged
Merged
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
mainis red. The three failing cases inDatabaseTreeObjectGroupHierarchyTestscame in with #2556 and are failing on every run since, including 33057688123 onmain's own head:Cause
Sidebar selection adoption matched in two steps: by table object, then scoped to the database on screen. #2556 moved
WindowSidebarState.selectedTablesto carryDatabaseTreeTableRefso the staged Truncate and Drop queue could stop keying on a bare name, and the first step became a whole-reference comparison. A reference pins the database it was picked in, so browsing elsewhere left the tree with nothing selected, and a multi-selection stopped adopting the active database's rows.Fix
Match on the object, keep the database scope that already sits on the next line.
selectedTablesstill carries full references, which is what the queue needs; only the adoption comparison changes.Both behaviours are already pinned by the suite that has been failing: "Selection adoption distinguishes identical objects across databases" and "A multi-selection adopts only rows in the active database".
Verified
verify.sh test DatabaseTreeObjectGroupHierarchyTests SidebarOutlineScaffoldTests SidebarHostingCellTests: 15 executed, 15 passed.The three UI test jobs fail on
mainas well, on the tab-drag reorder and "The sample database never finished opening". Those are not this.The same commit is on #2559, which is where the fix was written; this PR carries it alone so
maindoes not have to wait for that feature.