Skip to content

[Network] Bind the NWBrowser waiting state. Fixes #26790 - #26870

Open
rolfbjarne wants to merge 1 commit into
mainfrom
dev/rolf/nw-browser-waiting-state
Open

rolfbjarne wants to merge 1 commit into
mainfrom
dev/rolf/nw-browser-waiting-state

Conversation

@rolfbjarne

Copy link
Copy Markdown
Member

Add NWBrowserState.Waiting = 4 to match Network.framework's nw_browser_state_waiting. Browsers can enter this state while waiting for connectivity, including after becoming ready; callers can now identify it by name in the state changes handler.

Document the enum and all its states, including the effect of waiting on browse results and the associated error. Add the native enum name and remove the obsolete xtro missing-enum exclusion so the existing enum checks cover the binding.

Fixes #26790

🤖 Pull request created by Copilot

Add the missing browser state value matching Network.framework, and document what waiting means for browse results and the state callback. Cover the native numeric value with a focused regression test so callers can identify it by name.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@rolfbjarne
rolfbjarne requested a review from dalexsoto as a code owner October 14, 2026 15:48
Copilot AI balanced review requested due to automatic review settings October 14, 2026 15:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The new enum-field <remarks> causes Documentation.NoRemarksOnEnumFields to fail.

1 open finding
What changed in this PR

Adds the missing NWBrowserState.Waiting binding and enables native enum validation.

Changes:

  • Adds and documents Waiting = 4.
  • Maps the enum to nw_browser_state_t.
  • Removes the obsolete xtro exclusion.
File Description
src/​Network/​NWEnums.cs Adds the waiting state and documentation.
tests/​xtro-sharpie/​api-annotations-dotnet/​common-Network.ignore Enables native enum validation.

🧠 Review effort: Balanced

Comment thread src/Network/NWEnums.cs
Comment on lines +52 to +53
/// <summary>The browser is waiting for connectivity and will not deliver results until it becomes ready.</summary>
/// <remarks>A browser can enter this state after being ready. The associated error indicates why browsing is unavailable.</remarks>
@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ API diff for current PR / commit

NET (empty diffs)

✅ API diff vs stable

NET (empty diffs)

ℹ️ Generator diff

Generator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes)

Pipeline on Agent
Hash: 2d39e3cb6af24995812124db6a6704ebc5087007 [PR build]

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Network] Bind the waiting state for NWBrowserState

3 participants