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
Relocate the Apple supports() / unsupportedHint() device closures onto PlatformPlugin.capability.supportsByDefaultverbatim — never flatten the predicate bodies to data (perfect-shape §7: relocate, never flatten).
Current state
Closures are hand-authored in src/core/command-descriptor/registry.ts:41-59: isNotMacOs, isMacOsOrAppleSimulator, isIosMobileSimulator, supportsSynthesisGesture, supportsAndroidOrIosNonTv, and synthesisGestureUnsupportedHint — the last encodes macOS-coordinate-pinch (:53) and tvOS-no-touch (:54-55).
Consumed via the matrix at src/core/capabilities.ts:98 (capability.supports(device)).
The plugin facet capability.supportsByDefault? is declared but unpopulated (src/core/platform-plugin/plugin.ts:48).
Move the closure bodies onto the relevant plugin's capability.supportsByDefault (or keep them on the command facet and flow the platform default through the plugin). Do not rewrite the predicate bodies.
Gate (required before deleting any hand site)
A closure-equivalence parity test: same device → same boolean / same hint string, across the full sample-device matrix (src/__tests__/test-utils/device-fixtures.ts). Keep the command-descriptor/registry.ts closures until the parity test passes.
Relocate the Apple
supports()/unsupportedHint()device closures ontoPlatformPlugin.capability.supportsByDefaultverbatim — never flatten the predicate bodies to data (perfect-shape §7: relocate, never flatten).Current state
src/core/command-descriptor/registry.ts:41-59:isNotMacOs,isMacOsOrAppleSimulator,isIosMobileSimulator,supportsSynthesisGesture,supportsAndroidOrIosNonTv, andsynthesisGestureUnsupportedHint— the last encodes macOS-coordinate-pinch (:53) and tvOS-no-touch (:54-55).src/core/capabilities.ts:98(capability.supports(device)).capability.supportsByDefault?is declared but unpopulated (src/core/platform-plugin/plugin.ts:48).capabilities.ts:94-96readsgetPlugin(...).capability.bucket).Work
Move the closure bodies onto the relevant plugin's
capability.supportsByDefault(or keep them on the command facet and flow the platform default through the plugin). Do not rewrite the predicate bodies.Gate (required before deleting any hand site)
A closure-equivalence parity test: same device → same boolean / same hint string, across the full sample-device matrix (
src/__tests__/test-utils/device-fixtures.ts). Keep thecommand-descriptor/registry.tsclosures until the parity test passes.Refs
perfect-shape.md §6/§7; ADR-0009. (Phase 3 step b.2.)
Part of #972 (Phase 3 — Apple PlatformPlugin).