Skip to content

feat(libSceWebBrowserDialog): implement sceWebBrowserDialogOpenForPredeterminedContent - #5904

Merged
adriadam10 merged 2 commits into
boykopovar:mainfrom
pushkarreddyy:feat/libSceWebBrowserDialog-open-predetermined
Oct 16, 2026
Merged

adriadam10 merged 2 commits into
boykopovar:mainfrom
pushkarreddyy:feat/libSceWebBrowserDialog-open-predetermined

Conversation

@pushkarreddyy

Copy link
Copy Markdown
Contributor

What

Implements sceWebBrowserDialogOpenForPredeterminedContent in libSceWebBrowserDialog.prx:

  • Replaces the throwing NotImplemented_nid_no_patch(__func__) stub with the common dialog lifecycle transition matching sceWebBrowserDialogOpen.
  • Validates the dialog initialization status: returns COMMON_DIALOG_ERROR_NOT_INITIALIZED (0x80B80003) if uninitialized, or COMMON_DIALOG_ERROR_BUSY (0x80B80007) if already running.
  • Rejects null parameter pointers with COMMON_DIALOG_ERROR_ARG_NULL (0x80B8000D).
  • Advances the state machine to COMMON_DIALOG_STATUS_FINISHED and returns 0 (COMMON_DIALOG_OK).
  • Extends GuestWebBrowserDialog.cpp to verify uninitialized rejection, null argument rejection, successful state advancement to finished, and user cancelled result reporting.
  • Documents technical debt in docs/dev/debt/libSceWebBrowserDialog.md.

Target context: Minecraft Bedrock (PPSA17221, #5744). The title imports sceWebBrowserDialogOpenForPredeterminedContent from libSceWebBrowserDialog.prx.

Tested

  • Windows 11 (MinGW-w64 GCC 15.2.0, Release).
  • Verified GuestWebBrowserDialog.cpp test suite passes with full lifecycle coverage.
  • Verified python tools/check_conventions.py --base origin/main passes with 0 findings and 0 errors.

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
  • Unblocks: PPSA17221 Minecraft Bedrock (PPSA17221) runs on Windows: boots to a playable world, 0 absent imports #5744
  • GPUs tested: n/a
  • AI-assisted: yes

@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Progress report (c842491 → 7f03455)

📈 System libraries: 88.86% (+0.03%, +1 implemented functions)

✅ 1 implemented
Library Name
libSceWebBrowserDialog sceWebBrowserDialogOpenForPredeterminedContent

@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

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 6361 docs/dev/debt/libSceWebBrowserDialog.md docs/dev/debt/libSceWebBrowserDialog.md
PR 6447 docs/dev/debt/libSceWebBrowserDialog.md

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
PR 6447 core/libs/prx/libSceWebBrowserDialog/Export.cpp
docs/dev/debt/libSceWebBrowserDialog.md

@pushkarreddyy

Copy link
Copy Markdown
Contributor Author

@oneandonlydean @adriadam10 Rebased clean on latest origin/main (8dc92ae) with all CI checks passing green. Implements sceWebBrowserDialogOpenForPredeterminedContent for dialog transitions (PPSA17221). Ready for review when convenient, thanks!

@milescoviello

Copy link
Copy Markdown
Contributor

A second title that stops on this function: Metal Gear Solid 4 (PPSA18194, Master Collection 01.004.003). Its Unity launcher calls it from the manual cover screen, the one with an "Open Online Manual" button hint.

Linux (Ubuntu 24.04, GCC 13.3, Release, RTX 4070 Ti, NVIDIA 595.99), relinked with --to-intel --executable mgs4/mgs4.elf, our fixed pad sequence, on a second launch so the launcher already has its save data:

So finishing at once with the user-canceled result is enough for this launcher. #6092 makes the same change without the null check. I only ran this PR's head.

AI-assisted: yes

@jotitadev jotitadev 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.

Linux run: head eac580a54 merged onto main 44df21632 (clean merge). Adds a Linux run to the Windows one in the description.

Machine: Ubuntu 26.04, Intel i7-8700, GCC 15.2, full build, non-GPU tests (Release, BUILD_TESTING=ON).

  • Build: full build passes.
  • guest_web_browser_dialog: passes with the PR. With only the test change on main it aborts with "sceWebBrowserDialogOpenForPredeterminedContent not implemented".
  • Non-GPU suite (ctest -E "^agc"): no regressions; the only failures are file_writer_binary and file_writer_text, which fail on main on this machine too.

Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.

@pushkarreddyy
pushkarreddyy force-pushed the feat/libSceWebBrowserDialog-open-predetermined branch from eac580a to f033be0 Compare October 16, 2026 15:04
@pushkarreddyy

Copy link
Copy Markdown
Contributor Author

@oneandonlydean @adriadam10 Cleanly rebased on latest main (e0e3ced) with all checks passing green. Ready for review/merge when convenient!

@adriadam10 adriadam10 self-assigned this Oct 16, 2026
pushkarreddyy and others added 2 commits October 16, 2026 20:47
@adriadam10

Copy link
Copy Markdown
Collaborator

Re-checked on current main: build and ctest (33 tests in scope) green, and guest_web_browser_dialog fails without the change. The state/error ordering matches the existing sceWebBrowserDialogOpen.

Added one commit on top: the technical debt line was cut off mid-sentence and didn't say that the real export takes a second argument (the allow-list of up to twenty addresses, per SharpProspero docs/dialogs.md). It is not read here, so no address filtering is modelled; the line now says so.

Merging once CI is green.

@adriadam10
adriadam10 force-pushed the feat/libSceWebBrowserDialog-open-predetermined branch from f033be0 to 7f03455 Compare October 16, 2026 18:54
@adriadam10
adriadam10 merged commit 04a8c2f into boykopovar:main Oct 16, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants