Skip to content

feat(mobile): support immersive full screen - #1141

Merged
houko merged 1 commit into
nsgo-dev:mainfrom
houko:feat/mobile-immersive-1124
Nov 22, 2026
Merged

houko merged 1 commit into
nsgo-dev:mainfrom
houko:feat/mobile-immersive-1124

Conversation

@houko

@houko houko commented Nov 21, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

mobile.Immersive(cx, true) requests immersive full screen for the window. A page or dialog can use StatusBar.Immersive to request or override it while shown. TSX pages, dialogs and nsgo.yaml use the same layered setting.

Android hides both system bars and allows an edge swipe to show them briefly. iOS hides the status bar and asks UIKit to auto-hide the home indicator. Both platforms report the native safe-area insets, including any display cutout.

Refs #1124. The roadmap tracks Android API 28–29, physical iPhone and HarmonyOS follow-up.

Verification on 512bd7ea1

  • Reconciled the Android test protocol with the merged select-tab command. A separate run of internal/platform/android/runtime/build.sh produced byte-identical classes.dex and classes.jar for the current PR head.
  • go tool nsgo check -target android_arm64,ios,ios_simulator,tvos -jobs 2 passed. The focused status-bar layering, permissions, nsgotest and TSX policy tests passed, along with the mobile, TSX bundler and skill tests. Workflow lint passed.
  • TestImmersiveAndroidSystemBars passed on a Pixel 3 XL running Android 12. A separate installed app confirmed both bars were visible normally, hid in immersive mode, appeared after a top-edge swipe, hid again at the transient timeout, and returned after immersive mode ended. Its reported safe area retained a 48.86 dp top cutout, while the bottom inset changed from 48 dp to 0 dp and back to 48 dp.
  • TestImmersiveIOSSystemBars passed on an iPhone 17 simulator running iOS 27.0. It verified UIKit status-bar visibility, the controller’s home-indicator auto-hide preference, and equality between the reported and native safe area in both modes. The physical iPhone’s indicator visibility and gesture behavior still need device verification.

@github-actions github-actions Bot added documentation Improvements or additions to documentation iOS Android core tsx cli ci enhancement New feature or request size/M conflict Conflicts with the base branch; resolve it first labels Nov 21, 2026
@houko
houko force-pushed the feat/mobile-immersive-1124 branch from 9ee1658 to 5a53c6e Compare November 21, 2026 03:29
@github-actions github-actions Bot added conflict Conflicts with the base branch; resolve it first and removed conflict Conflicts with the base branch; resolve it first labels Nov 21, 2026
@houko
houko force-pushed the feat/mobile-immersive-1124 branch from 5a53c6e to a34b024 Compare November 21, 2026 05:10
@github-actions github-actions Bot added conflict Conflicts with the base branch; resolve it first and removed conflict Conflicts with the base branch; resolve it first labels Nov 21, 2026
@houko
houko force-pushed the feat/mobile-immersive-1124 branch from a34b024 to c7e0ffd Compare November 21, 2026 05:52
@github-actions github-actions Bot added conflict Conflicts with the base branch; resolve it first and removed conflict Conflicts with the base branch; resolve it first labels Nov 21, 2026
@houko
houko force-pushed the feat/mobile-immersive-1124 branch from c7e0ffd to e3c6fa5 Compare November 21, 2026 05:59
@github-actions github-actions Bot added conflict Conflicts with the base branch; resolve it first and removed conflict Conflicts with the base branch; resolve it first labels Nov 21, 2026
@houko
houko force-pushed the feat/mobile-immersive-1124 branch from e3c6fa5 to 90d3648 Compare November 21, 2026 06:30
@github-actions github-actions Bot added conflict Conflicts with the base branch; resolve it first and removed conflict Conflicts with the base branch; resolve it first labels Nov 21, 2026
@houko
houko force-pushed the feat/mobile-immersive-1124 branch from 90d3648 to 928c3d8 Compare November 21, 2026 12:08
@github-actions github-actions Bot removed the conflict Conflicts with the base branch; resolve it first label Nov 21, 2026
@houko

houko commented Nov 21, 2026

Copy link
Copy Markdown
Collaborator Author

Reviewed.

  • Read the diff against Phones: immersive full screen, hiding the status and navigation bars #1124's acceptance: the layered Immersive toggle, the Android flag bit and both systemBars() paths (API 30+ and the legacy flags, with the navigation bar shown again only when leaving immersive), and iOS's prefersHomeIndicatorAutoHidden on the root, sheet and embedding controllers.
  • Pixel 3 XL (Android 12): TestImmersiveAndroidSystemBars and the tab bar tests pass. In a scratch app, the toggle hid both bars, an edge swipe showed them transiently, they auto-hid again, and turning it off restored both bars. Env.SafeArea() read T49 B48 normally and T49 B0 while immersive (the cutout stays).
  • iPhone 17 Pro simulator (iOS 27): TestImmersiveIOSSystemBars passes. The scratch app hides the status bar while immersive, and the safe area stays T62 B34.
  • Head 90d3648 passed every check but apple, which failed only in TestASoundDecodesOnceAndPlaysOverlapping with a segfault, the known flake macOS: TestASoundDecodesOnceAndPlaysOverlapping segfaults intermittently in CI #801. That job was rerun. This head is the rebase onto main after fix(android): draw pixel buffers without decoding #1158: CHANGELOG plus a roadmap row (main reworked the table), and classes.dex/jar rebuilt on Studio over the auto-merged Java. It re-passes the Android tests on the Pixel. Per the Android runtime chain rule it merges on the required checks, without waiting for apple / Gallery (macos).

Android: normal, immersive, swipe, auto-hidden, restored

iOS simulator: normal, immersive

@houko
houko enabled auto-merge (rebase) November 21, 2026 12:10
@github-actions github-actions Bot added the conflict Conflicts with the base branch; resolve it first label Nov 21, 2026
@houko
houko force-pushed the feat/mobile-immersive-1124 branch from ab41bbf to 34fecbd Compare November 21, 2026 17:58
@houko

houko commented Nov 21, 2026

Copy link
Copy Markdown
Collaborator Author

Reviewed. Rebased onto main again; main had changed the Android Java runtime (gamepads, services), so classes.dex/classes.jar were rebuilt with build.sh on top of it (the rebuilt dex has both the system-bars test command and main's Gamepads classes) and go vet passes for the touched packages. The earlier android failure (TestPostsRunOnTheAppGraph: test host did not start within 5m) was an emulator launch timeout unrelated to this change.

@houko
houko force-pushed the feat/mobile-immersive-1124 branch from 34fecbd to 125c105 Compare November 21, 2026 18:31
@github-actions github-actions Bot added conflict Conflicts with the base branch; resolve it first and removed conflict Conflicts with the base branch; resolve it first labels Nov 21, 2026
@houko
houko force-pushed the feat/mobile-immersive-1124 branch from 125c105 to d8c77f6 Compare November 21, 2026 18:42
@github-actions github-actions Bot removed the conflict Conflicts with the base branch; resolve it first label Nov 21, 2026
@houko
houko force-pushed the feat/mobile-immersive-1124 branch 3 times, most recently from 512bd7e to 51ca80b Compare November 21, 2026 19:25
@github-actions github-actions Bot added the conflict Conflicts with the base branch; resolve it first label Nov 21, 2026
@houko
houko force-pushed the feat/mobile-immersive-1124 branch from 51ca80b to 02939f9 Compare November 21, 2026 19:32
@github-actions github-actions Bot removed the conflict Conflicts with the base branch; resolve it first label Nov 21, 2026
@houko
houko force-pushed the feat/mobile-immersive-1124 branch from 02939f9 to 75864cb Compare November 21, 2026 19:58
@github-actions github-actions Bot added the conflict Conflicts with the base branch; resolve it first label Nov 21, 2026
@houko
houko force-pushed the feat/mobile-immersive-1124 branch from 75864cb to 60885ff Compare November 21, 2026 20:32
@github-actions github-actions Bot removed the conflict Conflicts with the base branch; resolve it first label Nov 21, 2026
@houko
houko force-pushed the feat/mobile-immersive-1124 branch 4 times, most recently from d616b28 to 1ce43de Compare November 22, 2026 05:19
@github-actions github-actions Bot added the conflict Conflicts with the base branch; resolve it first label Nov 22, 2026
@houko
houko force-pushed the feat/mobile-immersive-1124 branch from 1ce43de to fc31a9a Compare November 22, 2026 08:49
@houko
houko added this pull request to the merge queue Nov 22, 2026
@houko
houko force-pushed the feat/mobile-immersive-1124 branch from fc31a9a to 7f7604d Compare November 22, 2026 14:51
@houko
houko merged commit 444f684 into nsgo-dev:main Nov 22, 2026
14 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Android ci cli conflict Conflicts with the base branch; resolve it first core documentation Improvements or additions to documentation enhancement New feature or request iOS size/M tsx

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant