fix(studio): flip per-slot binding presentation on bindings[…] edit acks#113
Merged
Conversation
… acks After the popover's bind/unbind gesture, the acked edits landed in the overlay mirror immediately, but per-slot binding presentation (authored vs default origin, the Unbind affordance) was only derived from the synced slot tree during apply_tree_entry — so it lagged the passive project-read cadence by up to tens of seconds. Binding a slot to the same channel as its declared default was the worst case: the graph looks unchanged and only the origin flips, so nothing on screen moved. Fact derivation now reads through the pending-edit mirror: a new BindingFactOverrides folds the overlay mirror's bindings[...] entries (shadowed by the local edit buffer; Failed entries skipped) into the synced authored facts, and ProjectController re-derives the whole tree's binding presentation after every applied project view and after every acked mutation that touched a bindings path (or cleared the overlay/artifact wholesale). Covered by two controller tests (bind-to-declared-default and unbind, scripted acks, no refresh in between) and one end-to-end test driving the exact popover action sequence against the real in-process server. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Summary
apply_tree_entry), while ackedbindings[…]edits live in the overlay mirror until the next passive read.BindingFactOverrides(inslot_binding_fact.rs) folds the overlay mirror'sbindings[…]entries — shadowed by the local edit buffer,Failedentries skipped — into the synced authored facts.ProjectController::refresh_binding_presentationre-derives the whole tree's presentation (authored facts + graph-default overlay) after every applied project view and after every acked mutation that touched abindings[…]path (or cleared the overlay/artifact wholesale, which can drop such entries). Unbind is symmetric: the acked entry removal drops the authored fact and the declared default refills immediately.fixture.input, no backing slot row) build authored-vs-default from the binding-graph snapshot, which still refreshes passively.Validation
acked_bind_gesture_reads_authored_before_any_refresh: declared-default wiring ontime, popover gesture to the same channel, scripted acks, no refresh → origin flips to authored, Unbind offered.acked_unbind_restores_default_presentation_before_any_refresh: one ackedRemoveValueon the entry → default-origin presentation returns instantly.bind_and_unbind_gestures_present_authored_state_from_acks_alone: drives the exact popover action sequence through the studio actor against the real in-processLpServer, asserting authored/unbound presentation from the acks alone (noRefreshProjectin between).cargo test -p lpa-studio-core(455 passed),cargo test -p lpa-studio-web(117 passed),just checkgreen.Contribution Terms
By opening this pull request, I confirm that I have the right to submit these
changes and agree to the contribution terms in
CONTRIBUTING.md.🤖 Generated with Claude Code