fix: redraw views that read a value through an object they observe - #2944
Merged
Merged
Conversation
…on the objects that publish them
… the wide query was typed
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.
Follow-up to #2940. Two more of
main's red UI tests, and the rest of the #2874 observation audit: views that read a value through an object they observe.One pattern left from the macOS 13 port
@Published var child: SomeObservableObjectpublishes only when the reference is replaced, never when a value inside the child changes. Observation trackedparent.child.valueread in a body;ObservableObjectdoes not. #2940 covered properties with no@Publishedand objects nothing observed. This covers the nested case.tabExecutionthrough a weak reference, which cannot be@ObservedObjectTabExecutionObservationholds the coordinator weakly and relaystabExecutionalone, not the cursor updates the coordinator also publishes on every keystrokeonChangefor the sidebar selection and for the inspector's view mode read values held byWindowSidebarStateandRowInspectorState, which the view does not observeonValueChange(of:in:)observes the object inside the modifier, so its other changes redraw only the modifierFor the main window, both sidebar layouts open a clicked table from the outline itself, so I did not reproduce a visible symptom there. The change puts back what that
onChangerelied on before the port.Checked and left alone: the other nested reads are inside action closures, or sit in a view that is redrawn with a parent observing the same object (
MainEditorContentViewtakes closures fromMainContentView, which observestoolbarState).ImportDialogreads its service'sisImportingwithout observing it, but the progress sheet covers that button for the whole import.None of this shipped, since #2874 is unreleased, so there is no CHANGELOG entry.
ColumnJumpUITestsThe jump works. The test did not.
isHittableon a grid header never becomes true. After the jump,col_60sat at x 1795 to 1880 inside a grid spanning 959 to 1881, and XCUITest still reported it not hittable.HeaderSortUITestshit the same thing in test: fix the three tests that are red on main #2676. The test now checks the header frame's centre against the grid's frame.col_60header and no panel on Command Shift J, which is what a query that lost its first keystrokes produces. It goes throughtypeQuerynow, which confirms the text arrived.Verification
ConnectionFormChildObservationTests(fails 3 of 3 without the coordinator change),TabExecutionObservationTests,ObservedValueChangeTests. The last one hosts a view and also asserts that the read-through form misses the change, so the passing case is not vacuous.RedisConnectionModeUITests,ColumnJumpUITests(twice),ConnectionFormTransportUITests,JSONRowInspectorUITests,InspectorEditReachesGridUITests,EditorTabReorderUITests,EditorTabKeepOpenUITests,DataGridReloadViewportUITests.ConnectionFormTransportUITests.testChoosingATransportReplacesThePreviousOnesFieldsfailed once on "Typing should reach the chooser's search field", which is before the form exists. It then passed two runs in a row.Crash reports from UI shards
QueryInsightsTabUITestscrashes the app on the macOS 26 runner right after Database > Query Insights, in every run since #2874, and passes on macOS 27. XCTest reports only "crashed in " and attaches no report, so there is nothing to read. A failed shard now uploadsTablePro*from bothDiagnosticReportsfolders asmacos-ui-crash-reports-<shard>. This run should produce the first one.