tala: preserve enclosed routes when compound containers move - #2889
Merged
Conversation
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.
Human
AI
When TALA chooses a compound layout, it moves containers as rigid blocks but redraws their internal edges. That can split a clean shared fan into separate branches even though the endpoints and obstacles inside the container have not moved relative to one another.
Preserve eligible enclosed routes from the ordinary layout, translated with their container, after selecting the compound layout. Keep the selected external routes and curve state, then reconsider automatic labels/icons and validate the completed result. Reuse requires the path and its labels to remain enclosed and its endpoints to attach to box borders. A failed optional refinement retains the selected layout; caller cancellation still propagates.
This is the first, independently reviewable route-preservation change. Placement selection and scoring remain unchanged.
Validation
go test -race ./d2layouts/d2talalayout/... -count=1 -timeout=15msuite, andgo vet ./d2layouts/d2talalayout/...pass. New regressions cover shared fans, nested containers, enclosure exclusions, fixed labels/icons, selected external curves, and refinement fallback/cancellation.TestE2Epasses with acceptance disabled: 342 fixtures pass, 1 skips.65a01bdeeb389d9750d39ae3eac6ef948b3112dd: 343 public contexts, 237 private fixture/benchmark input contexts, and 33 featured/blog contexts. Among 578 paired TALA renders, only the three comparisons below change visually. No new execution failures or geometry-audit findings.elk_shimgolden update changes only an edge's label percentage (0→0.32499998807907104) and the generated SVG namespace. Its image is unchanged. Dagre and ELK renders are unchanged.Every visual change
good/stagingregressions/cluster_size_limit_2txtar/azure-again-seed2All 4,035 shape positions and dimensions in the private replay are unchanged, as are all external routes. The screenshots use identical scales within each pair. Azure's existing public icons are embedded for faithful display; anonymization does not alter staging geometry or routes.
Click the screenshot to view all three before/after comparisons at full resolution (3000 × 7332).