fix(libSceWebBrowserDialog): transition to finished on dialog close #7479

Merged
ErenYeager1836 merged 3 commits from upstream-pr/7479 into main 2026-10-19 22:30:11 +00:00
ErenYeager1836 commented 2026-10-18 09:01:13 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ErenYeager1836 on 2026-10-18T09:01:13Z.


What

Transition g_status to COMMON_DIALOG_STATUS_FINISHED in sceWebBrowserDialogClose when called from an initialized or running dialog. Previously sceWebBrowserDialogClose returned 0 without updating g_status, leaving the dialog in the initialized state and preventing sceWebBrowserDialogGetResult from returning the dialog result (COMMON_DIALOG_RESULT_USER_CANCELED). Also extend GuestWebBrowserDialog to verify the state transition and result query when closing from initialized state.

Tested

  • Windows 11, MSVC, GuestWebBrowserDialog passing.
  • Verified with python tools/check_conventions.py --base upstream/main.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4907780739 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7479). Originally posted by [ErenYeager1836](https://github.com/ErenYeager1836) on 2026-10-18T09:01:13Z. --- ### What Transition `g_status` to `COMMON_DIALOG_STATUS_FINISHED` in `sceWebBrowserDialogClose` when called from an initialized or running dialog. Previously `sceWebBrowserDialogClose` returned 0 without updating `g_status`, leaving the dialog in the initialized state and preventing `sceWebBrowserDialogGetResult` from returning the dialog result (`COMMON_DIALOG_RESULT_USER_CANCELED`). Also extend `GuestWebBrowserDialog` to verify the state transition and result query when closing from initialized state. ### Tested - Windows 11, MSVC, `GuestWebBrowserDialog` passing. - Verified with `python tools/check_conventions.py --base upstream/main`. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-18 09:11:59 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-18T09:11:59Z.


Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 8106 docs/dev/debt/libSceWebBrowserDialog.md L5

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 6044 core/libs/tests/GuestWebBrowserDialog.cpp
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6248085705 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7479#issuecomment-6248085705). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-18T09:11:59Z. --- <!-- pr-overlap --> Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in **Depends on**. | Pull request | Conflicting files (lines on `main`) | Same exports | Same new files | |---|---|---|---| | [PR 8106](https://www.github.com/boykopovar/AnyPS5/pull/8106) | `docs/dev/debt/libSceWebBrowserDialog.md` [L5](https://github.com/boykopovar/AnyPS5/blob/eaa5c92386876660cd3db52ae94d6d9c40c64f04/docs/dev/debt/libSceWebBrowserDialog.md#L5) | | | Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap. | Pull request | Shared files not compared | |---|---| | [PR 6044](https://www.github.com/boykopovar/AnyPS5/pull/6044) | `core/libs/tests/GuestWebBrowserDialog.cpp` |
wachi35676 commented 2026-10-18 12:05:51 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by wachi35676 on 2026-10-18T12:05:51Z.


Tested on Windows 11, WinLibs GCC 15.2.0 (MinGW), Release, this PR applied onto main 3e3e8b905: guest_web_browser_dialog passes, and fails on main with only the test change (exit 0xc0000409).

The same question as on #7478 applies here. Open already finishes at once, so the only case that changes is Close with no Open before it. For that case MsgDialog.native, SaveDataDialog.native and ErrorDialog return NOT_RUNNING or INVALID_STATE, following shadPS4's sceMsgDialogClose. Please cite a source, or note the choice as unverified in the module's debt entry.

AI-assisted: yes (Claude Code); results above were run on this machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6249707811 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7479#issuecomment-6249707811). Originally posted by [wachi35676](https://github.com/wachi35676) on 2026-10-18T12:05:51Z. --- Tested on Windows 11, WinLibs GCC 15.2.0 (MinGW), Release, this PR applied onto `main` `3e3e8b905`: `guest_web_browser_dialog` passes, and fails on `main` with only the test change (exit `0xc0000409`). The same question as on #7478 applies here. `Open` already finishes at once, so the only case that changes is `Close` with no `Open` before it. For that case MsgDialog.native, SaveDataDialog.native and ErrorDialog return NOT_RUNNING or INVALID_STATE, following shadPS4's `sceMsgDialogClose`. Please cite a source, or note the choice as unverified in the module's debt entry. AI-assisted: yes (Claude Code); results above were run on this machine.
ErenYeager1836 commented 2026-10-18 12:19:53 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ErenYeager1836 on 2026-10-18T12:19:53Z.


Thanks for the review, @wachi35676! Added a note in docs/dev/debt/libSceWebBrowserDialog.md documenting that transitioning to FINISHED on Close before Open follows the Signin/NetCtlAp/PlayerSelection convention and remains unverified on real hardware. Testing was verified under MinGW-w64 GCC (WinLibs).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6249837678 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7479#issuecomment-6249837678). Originally posted by [ErenYeager1836](https://github.com/ErenYeager1836) on 2026-10-18T12:19:53Z. --- Thanks for the review, @wachi35676! Added a note in docs/dev/debt/libSceWebBrowserDialog.md documenting that transitioning to FINISHED on Close before Open follows the Signin/NetCtlAp/PlayerSelection convention and remains unverified on real hardware. Testing was verified under MinGW-w64 GCC (WinLibs).
adriadam10 commented 2026-10-19 22:32:47 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-19T22:32:47Z.


Thanks for the fix. Close now moves the dialog to finished, as sceSigninDialogClose does, and the test fails without the change.

Added on your branch:

  • Removed the BOM you introduced at the top of docs/dev/debt/libSceWebBrowserDialog.md and restored the existing Silent stubs line to its original text (backticks included); only the new sceWebBrowserDialogClose line stays, with backticks.

Close-before-Open stays listed as unverified in the debt entry; merged.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6278832338 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7479#issuecomment-6278832338). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-19T22:32:47Z. --- Thanks for the fix. `Close` now moves the dialog to finished, as `sceSigninDialogClose` does, and the test fails without the change. Added on your branch: - Removed the BOM you introduced at the top of `docs/dev/debt/libSceWebBrowserDialog.md` and restored the existing Silent stubs line to its original text (backticks included); only the new `sceWebBrowserDialogClose` line stays, with backticks. Close-before-Open stays listed as unverified in the debt entry; merged.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!7479
No description provided.