Skip to content

feat(nsgotest): record the status bar's immersive setting - #2362

Merged
houko merged 1 commit into
nsgo-dev:mainfrom
Laotree:fix/statusbar-immersive
Nov 25, 2026
Merged

houko merged 1 commit into
nsgo-dev:mainfrom
Laotree:fix/statusbar-immersive

Conversation

@Laotree

@Laotree Laotree commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Summary

nsgotest copied the resolved status bar into its model without Immersive, so mobile.Immersive(cx, true) and mobile.Immersive(cx, false) recorded the same StatusBarConfig and a test could not see a game enter or leave full screen.

Add the field and copy it, as the platform hosts receive it.

Fixes #2255.

Targets

  • Shared code (core, base, ui, tsx, the nsgo tool)
  • macOS
  • iOS
  • tvOS
  • watchOS
  • Android
  • Windows
  • Linux
  • Web
  • Mini programs
  • Docs or website only

Screenshots

None; nothing visible changes.

Verification

  • New test TestStatusBarRecordsImmersive presses a view that calls mobile.Immersive and checks App.StatusBar.Immersive goes true and back to false. It does not build on main, where the field does not exist.

  • go tool nsgo test ./nsgotest -count=1: 242 passed, 0 failed, 1 skipped. The existing TestStatusBarRecordsResolvedSettings still holds, the field being false where nothing sets it.

  • go run ./tools/changelog check passes with the new fragment.

  • Not covered: a test for a screen's or a modal's own StatusBar, which the same copy carries. The headless model reports the resolved value, and a screen's layer needs a navigation stack in the fixture; I left that out rather than build one.

  • go tool nsgo check

  • go tool nsgo test

  • go tool nsgo test -target <target> on the targets above

Checklist

  • The title is a Conventional Commit; a squash merge uses it as the commit subject.
  • Docs whose facts change are updated, and a capability users can see has a line in a changelog.d/ fragment, not in CHANGELOG.md. The testing guides do not list StatusBar's fields, so only the fragment changed.
  • New third-party code, assets and dependencies name their source and license. None are added.

🤖 Generated with Claude Code

The model copied the resolved status bar without Immersive, so a test
could not see immersive full screen turn on or off. Copy it and cover
mobile.Immersive with a test.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions github-actions Bot added enhancement New feature or request size/S documentation Improvements or additions to documentation labels Nov 25, 2026
@houko houko self-assigned this Nov 25, 2026

@houko houko left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified against latest main. The headless model preserves ItemStatusBar.Immersive in StatusBarConfig, and the regression covers mobile.Immersive toggling. The targeted nsgotest suite passes.

@houko
houko merged commit 526d249 into nsgo-dev:main Nov 25, 2026
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request size/S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

nsgotest: StatusBarConfig drops Immersive, so tests cannot see mobile.Immersive or a layer's StatusBar.Immersive

2 participants