fix(platform-apple): refuse split-view-exit when app fills lit panel

KH
4d ago
+74-6

Summary

Fixes #5105. swipe split-view-exit previously dispatched a drag from display center to the left edge even when a single app already filled the lit panel, turning into an unintended pan on app content.

  • packages/platform-apple/src/foldable/split-view.ts: appleSplitViewRunnerPlan accepts readAppWindowFrame and refuses split-view-exit with UNSUPPORTED_OPERATION (reason: 'split_view_unavailable', dispatched: 'no') when the app window frame fills plan.viewport.
  • packages/platform-apple/src/interactions.ts: passes readAppWindowFrame via gestureViewport (includesKeyboard: true).
  • packages/platform-apple/src/foldable/split-view.test.ts: added unit tests for full-panel refusal and active Split View exit.

Before / after

  • Before: swipe split-view-exit with one full-screen app dispatches a pan gesture across the app.
  • After: swipe split-view-exit refuses before any touch with UNSUPPORTED_OPERATION (split_view_unavailable, dispatched: 'no'); active Split View still exits.

Validation

Tested at 5a0dad534e on 59a640c08d:

  • vitest run --project unit-core on split-view, gestures, interaction-gesture-viewport, foldable runner requests, interactions, and index-runner-requests: 6 files, 46 tests passed.
  • tsc -b tsconfig.typecheck.json examples/sdk/tsconfig.json: passed.
  • oxlint . --deny-warnings and oxfmt --check: passed.

CI obligations: unit-core and Apple smoke lanes. Risks: none known.