Repository navigation
Keep the space between a wrapped diagram label's lines in its part's name - #6059
Merged
Merged
Conversation
…name A diagram drawn narrow wraps a box's label across lines, and Pele sets each line in a `tspan` of its own. The part's label was the box's `textContent`, which runs the lines together, so "Start request" named its Respond control "Respond to Startrequest" and its Comment target "Startrequest". The label now reads each `text` line by line (`wordsOf`), with a space where a line wraps, and leaves out a `title` tooltip that `textContent` also took in. `test_a_visual_action_follows_its_own_scroller_even_when_the_target_is_gone` narrows the diagram and pressed the Respond control at once, on whichever drawing stood then. On this Mac's efficiency cores, in 18 concurrent copies at main, 2 timed out because the narrow drawing had already renamed the control, and 5 reported the ResizeObserver loop that failed the macOS nightly run in #6048, when the test widened the diagram again. In those frames the comment box's placement, re-solved inside the box-motion observer's delivery (box-motion.js, `placedParts`), changed the box's width, which the box's other observers then missed. The test now waits for the narrow drawing and checks that it wrapped the label. Without the label fix it times out at the press; with it, 18 of 18 copies pass, and 11 of 11 under `--cpu-throttle 10`, with no loop reported. Refs #6048
leaf-agent
approved these changes
Nov 15, 2026
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.
A diagram drawn narrow wraps a box's label across lines, with each line in a
tspanof its own.lf-diagramnamed each part from the box'stextContent, which runs the lines together, so on a phone-width column "Start request" became the Respond control "Respond to Startrequest" and the Comment target "Startrequest". The label now reads the box's text line by line (wordsOf), with a space where a line wraps. It also stops taking in a node's tooltip<title>, whichtextContentincluded.This is behind one of #6048's macOS nightly failures.
test_a_visual_action_follows_its_own_scroller_even_when_the_target_is_gonenarrows the diagram and pressed the Respond control on whichever drawing stood at that moment. In 18 concurrent copies on this Mac's efficiency cores at main, 2 timed out because the narrow drawing had already renamed the control, and 5 reported the ResizeObserver loop the nightly run saw, when the test widened the diagram again. The test now waits for the narrow drawing and checks that it wrapped the label: 18 of 18 copies pass, and 11 of 11 under--cpu-throttle 10. Without the label fix it times out at the press.Not fixed here: the loop itself is a product race this PR leaves alone. When a part of the open comment box changes size in the same frame as the box's anchor moves, box-motion's ResizeObserver (
placedParts) re-solves the placement inside its delivery, the new room changes the box's width (--lf-float-w), and the box's own observers miss that change until the next frame. A probe that grows a control in the box and widens the diagram in one task raises the loop 3 of 3 times, and 0 of 3 with the two a frame apart. The test no longer makes the two coincide, since it now presses on a settled drawing; the fix belongs in how the comment box's placement lands, which is a separate change.The diagram and visual-part tests in
test_render_reactions.py,test_render_gate.py(both tiers) andjourneys/test_render_aim.pypass (18).max-sixty asked for fixes to the macOS-only test failures; they haven't read this yet.
Refs #6048