fix: connector_detached now skips fully dash-hidden connector shafts - #3912
Open
miga-heygen wants to merge 1 commit into
Open
fix: connector_detached now skips fully dash-hidden connector shafts#3912miga-heygen wants to merge 1 commit into
miga-heygen wants to merge 1 commit into
Conversation
connector_detached fired on SVG connector paths that were 100% hidden via stroke-dashoffset/stroke-dasharray draw-on entrances, evaluating rendered/user-space geometry unconditionally. The sibling connector_orphan check already gates on shaftDashHidden(path); add the same gate here, in the same position. Co-Authored-By: Miguel Angel <miguel.sierra@heygen.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
connector_detached(the layout-audit finding for SVG connector paths whose rendered endpoints don't attach to any anchor) evaluated a path's geometry unconditionally — it had no gate forstroke-dashoffset/stroke-dasharraydraw-on visibility. A connector fully hidden behind an un-advanced "draw the line in" dash animation still fired the finding as if it were rendered and visible. The sibling check,connector_orphan, already skips fully dash-hidden shafts via ashaftDashHidden(path)helper — this adds the same gate toconnectorDetachmentIssues, in the same position.Deliberately did not also add the
shaftIsPaintedcheck thatconnector_orphanuses (which additionally coversopacity/display:none/visibility:hidden) — that's a real, separate gap but out of scope for this fix; noted below as a follow-up candidate.Test plan
strokeDasharray/strokeDashoffsetno longer firesconnector_detached, using the exact fixture (now shared via extractedforeignFrameDom/foreignFrameRects/foreignFrameStylesconsts, mirroring this file's existingorphanDomconvention) as the adjacent positive-control test that proves the same fixture does fire when not dash-hidden — isolating the single variable.bunx tsc --noEmit -p packages/cli,oxlint,oxfmt --checkclean on both touched files.packages/clitest suite: 3040 passed, 3 skipped; the only 2 failures are in files unrelated to this change and fail identically on an unmodified checkout (happy-domcollection error, pre-existing sandbox limitation — this PR's own regression test lives in one of the files affected by that same pre-existing limitation and could not be executed locally, only via the real-Chromium harness above).shaftDashHiddenandpathUserEndpointseach independently callpath.getTotalLength(), a redundant SVG geometry query — but this exact double-call pattern already exists today in the siblingconnector_orphancheck this PR intentionally mirrors, so it's not a new inefficiency.