fix: stabilize Space drag projections#300
Merged
Merged
Conversation
Keep active-window constraints on every drag frame, throttle only secondary peer layout, and preview crowded Space expansion before release. Add unit, performance, and Electron regression coverage for edge jitter, preview ownership, and Child Space expansion.
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.
💡 Change Scope
📝 What Does This PR Do?
Fixes two regressions in Workspace Canvas node/Space interaction:
The drag pipeline now separates per-frame primary constraints from throttled secondary peer/Space layout. Live Space geometry is a reversible UI projection; release still recomputes the authoritative ownership and geometry from durable state.
🏗️ Large Change Spec (Required if "Large Change" is checked)
1. Context & Business Logic
The previous drag throttling skipped the whole projection during slow edge movement, causing raw and constrained positions to alternate. The follow-up live path then intentionally returned unchanged Space geometry, so crowded-Space expansion was invisible until mouseup.
This change runs primary active-window constraints on every coalesced frame, keeps peer/Space reflow in the existing secondary lane, and derives expanded preview frames without persisting them. Capacity lower-bound and postcondition checks avoid the expensive bounded solver for known-overflow layouts.
2. State Ownership & Invariants
spacesRef/ persistence and are written only by the release/finalization path.3. Verification Plan & Regression Layer
pnpm pre-commitexited 0 (237 E2E passed, 47 conditional skips, 3 unrelated flaky cases passed on retry).✅ Delivery & Compliance Checklist
pnpm pre-commitis completely green.CLA.md).DEVELOPMENT.mdarchitectural boundaries.📸 Screenshots / Visual Evidence
The interaction is covered by Electron E2E while the mouse remains held: the DOM Space frame expands before release, persistence remains at its baseline, and release commits the final non-overlapping layout. No review-only media was committed to the repository.