refactor(ios): trim the alert path's forwarding and duplicate constructors
Merged
TH
1mo ago+21+21+01234567890123456789-69-69-01234567890123456789
Summary
A cleanup of the iOS alert path with no behavior change. 3 files, +21 / ā69 (net ā48).
snapshot-alert.ts: each admission branch now calls its narrowed runtime operation directly. The four forwarding functions are removed. The four separately typed admission branches stay, so capability narrowing is unchanged.RunnerTests+Alert.swift: the tworunnerAlert(...)constructors are now one. It takes the resolved actions and an optional window.RunnerTests+Alert.swift: the enabled and hittable button reads use the existingsafelyhelper instead of a bespoke ObjC exception wrapper. Small scope expansion: the audit named only the enabled read; the hittable probe used the same wrapper. A caught exception is now also logged under its tag.RunnerTests+SystemModal.swift: removed the redundant action-type check. Its only caller queries descendants only byactionableTypes.
Validation
At 3cc11f8a30:
pnpm check:affected --run --head HEAD: all runnable checks passed (exactCommit=true).snapshot-alert.test.ts: 7/7 passed.- Runner
build-for-testing: iOS and macOS, normal and unit-test variants, all succeeded. - Alert unit tests on an iPad (A16) simulator, method-level
-only-testingfor every test inRunnerTests+Alert*,+SystemModalTests,+BlockingSystemModal*: 41 executed (the 42nd is tvOS/macOS-only), 1 skipped (capture-only), 39 passed. The 1 failure,testAlertActivationConfirmsBeforeDeadlineWithoutHandlingTheNotificationBanner("needs notification authorization"), fails the same way on an origin/main build on the same simulator, so it comes from the simulator's state.
š¤ Generated with Claude Code