Repository navigation
Run a transaction's follow-up work as effects ordered by what they read - #197
Merged
Merged
Conversation
…hrough the transaction
…e order of their declared reads
…ing ChangeSurface and the effect phases
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.
Why
The work that follows a desktop transaction's changes (layout, column counts, MCP indicators, selection, camera, hover, persistence) was spread over three places: the fields of
ChangeSurface, a hand-ordered enum of effect phases, and a fixed sequence of steps at the end oftransact. None of them said what a step depends on, so a new step had to be placed by hand in each of them, and a wrong phase only showed up as a panic at runtime.Summary
ADR 0043 records the decision and lists every feature of the new scheduler with the case that needs it.
Measure(target), that names work still to do. The glossary defines effect, system effect, mark, rank, and rank batch.transactinstalls for one transaction. Marking only appends, and a mark outside a transaction panics.Measureclimbs bottom-up andPlacedescends top-down without a hand-written phase.UpdateHoverandSynchronizeCamera, are marked automatically after a kind they read was handled, so they run only when something they depend on changed.ChangeSurfaceand the steps at the end oftransactare gone. The host effects (persisting the configuration, MCP root changes, the window's fullscreen state) are effects too. Fullscreen is now requested as a state instead of a toggle.Details
These behaviors change, as the ADR's consequences list:
Validation
massive-desktoptests pass, including six new tests of the scheduler core and a new system test for the camera catching up after a gesture. That test caught a regression during the port: a release that changed nothing left the camera where the press had frozen it.Note
This was created with AI assistance.