fix(coordinator): build all split panes through one path so a new tab's inspector renders#1713
Merged
Merged
Conversation
…'s inspector renders
1c77c80 to
0073ac3
Compare
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.
Problem
The row detail (inspector) panel stays blank when a table is opened in a second native window tab. Selecting any row in that tab shows nothing; the panel only fills in once the inspector is manually toggled. Opening the same table as the first tab works fine.
Root cause
MainSplitViewControllerbuilt its three panes in two places that had to be kept in sync by hand:viewDidLoadbuilt the sidebar and detail panes from theirbuildX()views, but hardcoded the inspector to aColor.clearplaceholder, deferring the real inspector to a laterrebuildPanes()call.rebuildPanes()(only called from the session-config path) built all three for real.When a table opens as a second tab (joining an existing tab group), the session is already available at
viewDidLoad, so the session-config path early-returns via itsisContentViewEquivalentguard andrebuildPanes()never runs. The inspector host is left asColor.clear. The pane is visible (its split item isn't collapsed, restored from the per-connection split autosave) but hosts nothing, so row selections updateRightPanelState.inspectorContextwith no view mounted to render them.The first tab works because at its
viewDidLoadthe session isn't ready, sorebuildPanes()runs later and installs the real inspector.Fix
Make
rebuildPanes()the single source of truth for pane content.viewDidLoadnow builds only the split structure (hosting controllers with neutral placeholders, split items, autosave, collapse state) and then callsrebuildPanes()to install all content. BecauseviewDidLoadalways calls it, every pane (including the inspector) always gets its real view, regardless of whether the session was ready at load. A pane can no longer be left as a placeholder, and the two build paths can't drift again.This also removes the duplicated sidebar/detail/inspector build calls and sidebar-state wiring that previously lived in both methods.
How it was found
Added temporary
OSLogtracing across the selection -> inspector-context -> view-render chain and reproduced with two tabs. The logs showed the new tab'sRightPanelState.inspectorContextupdating on every click while itsUnifiedRightPanelViewnever rendered andrebuildPanes()never ran for that window. The tracing has been removed.Testing
The failing value (
Color.clearplaceholder vs the hostedUnifiedRightPanelView) is wrapped in an opaqueAnyViewand not introspectable, and a UI test would depend on a live connection, native tab-grouping, and per-connection inspector autosave state, none deterministic in CI. Verified manually: open a table, open a second table in a new tab, select a row -> the detail panel now shows the row immediately.