Fixes the Android predictive back-gesture (edge swipe) not returning from a task detail view to the board, even though the hardware/legacy Back button worked correctly. - Patch the generated Android manifest post-sync to set android:enableOnBackInvokedCallback="true" on the <application> tag, opting into AndroidX's OnBackPressedDispatcher for predictive-back gesture completion (mitigating ionic-team/capacitor-plugins#2418 via the disableBackButtonHandler toggle shipped in @capacitor/app@7.1.0). - Wire the patch script into Capacitor's capacitor:sync:after npm-script hook so it runs automatically after every cap sync (and therefore after cap run android / build:mobile). - Ensure both the back gesture and the hardware Back button funnel through the same AndroidBackButtonManager backButton listener, dispatching the shared fusion:native-back event consumed by the dashboard's nav-history stack. - Add regression coverage: a unit test for the manifest patch script's idempotent opt-in behavior, and a dashboard test asserting the task detail view returns to the board on fusion:native-back. - Document the Android manifest patch rationale and the unchanged dashboard-side invariant in packages/mobile/README.md. Files changed: .../__tests__/TaskDetail.swipe-back.test.tsx | 13 +++ packages/mobile/README.md | 31 +++++++ packages/mobile/capacitor.config.ts | 13 +++ packages/mobile/package.json | 2 + packages/mobile/scripts/patch-android-manifest.ts | 90 ++++++++++++++++++ packages/mobile/src/__tests__/native-shell.test.ts | 102 +++++++++++++++++++++ 6 files changed, 251 insertions(+) Fusion-Task-Id: FN-7583 Fusion-Task-Lineage: ad0cb02c-6e49-448a-8c93-607cd5ae657b Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
4.4 KiB
4.4 KiB