You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
refactor: consolidate the duplicated visual-paint heuristics on the SDK's styleInk #3079
transparent-background logic duplicated again in studio's captions parser and cli's layout-audit
They already disagree: studio counts box-shadow and audio; the sdk counts the element's own text and per-pixel <img> alpha. That drift is the problem — same-looking predicates answering differently.
Direction: sdk as the shared home, studio delegating. The dependency arrow already points that way (studio → sdk), so studio can import but not the reverse.
But not as one predicate. They answer different questions — "is this element worth showing as an editable leaf" versus "is there ink at this exact point". The per-point half is meaningless for studio, and audio is meaningless for the paint query. The shared core is styleInk plus the transparent-colour parse, with each caller keeping its own policy on top.
Easiest first slice: the transparent-colour test. isTransparentColor in the sdk is a pure function with no policy in it, and it is currently duplicated three times with at least one copy that string-matches known spellings rather than reading the alpha (the bug fixed in #3070) — so the duplicates are likely wrong in the same way.
I'd like to take this. I have a tested implementation that moves the pure CSS alpha parser to Core, re-exports the host-facing API from the SDK, delegates Studio and captions to it, and injects the same function into the CLI's standalone browser audit while preserving each caller's policy. I'll open the focused PR shortly with regression tests and build verification.
Closing during backlog triage: this is an internal consolidation note with no user-visible defect attached. Happy to revisit alongside a concrete paint-heuristic bug.
Activity
leorivastech commentedon Aug 8, 2026
I'd like to take this. I have a tested implementation that moves the pure CSS alpha parser to Core, re-exports the host-facing API from the SDK, delegates Studio and captions to it, and injects the same function into the CLI's standalone browser audit while preserving each caller's policy. I'll open the focused PR shortly with regression tests and build verification.
miga-heygen commentedon Sep 16, 2026
Closing during backlog triage: this is an internal consolidation note with no user-visible defect attached. Happy to revisit alongside a concrete paint-heuristic bug.