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
Drive splash permission pills via observable state, not identity churn
The permission pills read non-observable system APIs (CustomColorPickSession
.isAvailable / AXIsProcessTrusted), so a 1-second poll bumped permissionTick and
an .id(permissionTick) on permissionArea forced the subtree to rebuild each tick
to pick up a change. That tore down and recreated the Grant buttons once a second
for the whole time the splash was open; a button press whose mouseDown/mouseUp
straddled one of those identity resets could be swallowed — on the exact flow that
unblocks the Pro picker.
Mirror the two permission checks into @State instead, refreshed by the same poll
and notifications. SwiftUI coalesces equal writes, so a re-render happens only when
a permission actually flips, the pills keep a real SwiftUI dependency (fixing the
original stale-pill bug the intended way), and the subtree keeps stable identity —
removing the swallow hazard by construction.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
0 commit comments