feat(libSceNKWebKit): implement WKPage remote inspection, pending URL, and configuration accessors #23759

Merged
heditrigui merged 2 commits from upstream-pr/23759 into main 2026-11-25 06:25:19 +00:00
heditrigui commented 2026-11-19 15:59:21 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by heditrigui on 2026-11-19T15:59:21Z.


What

feat(libSceNKWebKit): implement WKPageGetAllowsRemoteInspection, WKPageSetAllowsRemoteInspection, WKPageCopyPendingAPIRequestURL, and WKPageCopyPageConfiguration.

  • WKPageGetAllowsRemoteInspection and WKPageSetAllowsRemoteInspection: query and configure the remote inspection boolean flag on Page.
  • WKPageCopyPendingAPIRequestURL: copies the retained pending API request URL if set, or returns null.
  • WKPageCopyPageConfiguration: copies the retained page configuration if set, or returns null.
  • All accessors validate object arguments through NKWebKit::Cast<NKWebKit::Page>, throwing std::invalid_argument on null references or mismatched type IDs.
  • Added comprehensive unit tests in core/libs/prx/libSceNKWebKit/tests/PageState.cpp testing initial defaults, mutations, round-trips, and invalid argument handling.
  • Added technical debt fragment in docs/dev/debt/changes/feat-nkwebkit-page-remote-inspection-and-pending-url.md.

Tested

  • Pure LF line endings confirmed with git diff --check.
  • Zero comments in code verified with pattern check.
  • Conventions checked with tools/check_conventions.py --base upstream/main (0 errors).
  • Debt fold validated with tools/debt_fold.py --check.
  • Pre-screened against open pull requests with tools/pr_overlap.py (0 collisions).

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)
  • No notes, investigation .md files or images added to the repository
  • 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:5398339265 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/23759). Originally posted by [heditrigui](https://github.com/heditrigui) on 2026-11-19T15:59:21Z. --- ### What feat(libSceNKWebKit): implement `WKPageGetAllowsRemoteInspection`, `WKPageSetAllowsRemoteInspection`, `WKPageCopyPendingAPIRequestURL`, and `WKPageCopyPageConfiguration`. - `WKPageGetAllowsRemoteInspection` and `WKPageSetAllowsRemoteInspection`: query and configure the remote inspection boolean flag on `Page`. - `WKPageCopyPendingAPIRequestURL`: copies the retained pending API request URL if set, or returns null. - `WKPageCopyPageConfiguration`: copies the retained page configuration if set, or returns null. - All accessors validate object arguments through `NKWebKit::Cast<NKWebKit::Page>`, throwing `std::invalid_argument` on null references or mismatched type IDs. - Added comprehensive unit tests in `core/libs/prx/libSceNKWebKit/tests/PageState.cpp` testing initial defaults, mutations, round-trips, and invalid argument handling. - Added technical debt fragment in `docs/dev/debt/changes/feat-nkwebkit-page-remote-inspection-and-pending-url.md`. ### Tested - Pure LF line endings confirmed with `git diff --check`. - Zero comments in code verified with pattern check. - Conventions checked with `tools/check_conventions.py --base upstream/main` (0 errors). - Debt fold validated with `tools/debt_fold.py --check`. - Pre-screened against open pull requests with `tools/pr_overlap.py` (0 collisions). ### 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 - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`) - [x] No notes, investigation `.md` files or images added to the repository - [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
PrivacyOnion commented 2026-11-19 16:20:30 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-19T16:20:30Z.

Review: APPROVED


Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against 2186780156:

  • Conventions: tools/check_conventions.py passed.
  • Build: nkwebkit_pagestate_tests built cleanly.
  • CTest (nkwebkit_pagestate):
    1/1 Test #4684: nkwebkit_pagestate ...............   Passed    0.02 sec
    100% tests passed, 0 tests failed out of 1
    
  • Negative control: with core/libs/prx/libSceNKWebKit/Export.cpp, core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp, core/libs/prx/libSceNKWebKit/include/WebKitValueExports.hpp, core/libs/prx/libSceNKWebKit/src/Configuration.hpp, core/libs/prx/libSceNKWebKit/src/PageState.cpp reverted to main, the new tests do not build/link without the change; restoring it makes them build and pass.
  • Code reading:
    • Verified core/libs/prx/libSceNKWebKit/src/PageState.cpp: CastNKWebKit::Page(pageRef, func) correctly enforces non-null and type checking via throwing std::invalid_argument matching libSceNKWebKit conventions.
    • Verified ToRef(page->pendingAPIRequestURL) and ToRef(page->configuration) in PageState.cpp copy/retain reference counts according to WebKit C API ownership conventions (WKPageCopy... rules).
    • Verified inventory exports and Export.cpp removed the old NotImplemented stubs, moving exact declarations into WebKitValueExports.hpp.
    • Verified Configuration.hpp type definitions and forward ordering: PageConfiguration is defined prior to Page, and fields are correctly initialized.
    • Verified docs/dev/debt/changes fragment format and conventions compliance.
    • Verified core/libs/prx/libSceNKWebKit/tests/PageState.cpp provides full coverage of defaults, mutations, getters, null checks, and invalid type checks.

Looks Good To Me

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5978943809 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/23759#pullrequestreview-5978943809). Originally posted by [PrivacyOnion](https://github.com/PrivacyOnion) on 2026-11-19T16:20:30Z. **Review:** APPROVED --- Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against `2186780156`: - **Conventions**: `tools/check_conventions.py` passed. - **Build**: `nkwebkit_pagestate_tests` built cleanly. - **CTest** (`nkwebkit_pagestate`): ``` 1/1 Test #4684: nkwebkit_pagestate ............... Passed 0.02 sec 100% tests passed, 0 tests failed out of 1 ``` - **Negative control**: with `core/libs/prx/libSceNKWebKit/Export.cpp`, `core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp`, `core/libs/prx/libSceNKWebKit/include/WebKitValueExports.hpp`, `core/libs/prx/libSceNKWebKit/src/Configuration.hpp`, `core/libs/prx/libSceNKWebKit/src/PageState.cpp` reverted to `main`, the new tests do not build/link without the change; restoring it makes them build and pass. - **Code reading**: - Verified core/libs/prx/libSceNKWebKit/src/PageState.cpp: Cast<NKWebKit::Page>(pageRef, __func__) correctly enforces non-null and type checking via throwing std::invalid_argument matching libSceNKWebKit conventions. - Verified ToRef(page->pendingAPIRequestURL) and ToRef(page->configuration) in PageState.cpp copy/retain reference counts according to WebKit C API ownership conventions (WKPageCopy... rules). - Verified inventory exports and Export.cpp removed the old NotImplemented stubs, moving exact declarations into WebKitValueExports.hpp. - Verified Configuration.hpp type definitions and forward ordering: PageConfiguration is defined prior to Page, and fields are correctly initialized. - Verified docs/dev/debt/changes fragment format and conventions compliance. - Verified core/libs/prx/libSceNKWebKit/tests/PageState.cpp provides full coverage of defaults, mutations, getters, null checks, and invalid type checks. Looks Good To Me
MarcZX10 commented 2026-11-20 09:49:00 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-20T09:49:00Z.

Review: COMMENTED


Reviewed — comments

The accessors follow existing page-state and retained-reference patterns, but two changed files were excluded from direct review and no tests were run, so this review is incomplete.

What I ran

Reviewed head 21867801563c24eb7965fb9fd2653ee2ab91c62c using the prepared diff and pinned reader. No commands or tests were run; no merged-preview check was performed.

Results

Check Result Note
Changed code review not run Two files unavailable in the review bundle
Tests not run No test command run
Console behavior not run Not confirmed

Findings

Blocking

None identified in the code inspected.

Non-blocking

None.

Not verified

The full text of core/libs/prx/libSceNKWebKit/Export.cpp and core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp was excluded as too large for the review folder; their removed stubs and declarations were visible in the prepared diff only. The other changed files were read, including all added lines listed in the manifest. No tests, build, or console behavior were verified.

To get this to a good state

Nothing is required. The review remains incomplete because the two excluded files and test results were not verified.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5990702042 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/23759#pullrequestreview-5990702042). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-20T09:49:00Z. **Review:** COMMENTED --- # Reviewed — comments The accessors follow existing page-state and retained-reference patterns, but two changed files were excluded from direct review and no tests were run, so this review is incomplete. ## What I ran Reviewed head `21867801563c24eb7965fb9fd2653ee2ab91c62c` using the prepared diff and pinned reader. No commands or tests were run; no merged-preview check was performed. ## Results | Check | Result | Note | |---|---|---| | Changed code review | not run | Two files unavailable in the review bundle | | Tests | not run | No test command run | | Console behavior | not run | Not confirmed | ## Findings ### Blocking None identified in the code inspected. ### Non-blocking None. ## Not verified The full text of `core/libs/prx/libSceNKWebKit/Export.cpp` and `core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp` was excluded as too large for the review folder; their removed stubs and declarations were visible in the prepared diff only. The other changed files were read, including all added lines listed in the manifest. No tests, build, or console behavior were verified. ## To get this to a good state Nothing is required. The review remains incomplete because the two excluded files and test results were not verified.
MarcZX10 commented 2026-11-22 12:18:56 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-22T12:18:56Z.

Review: COMMENTED


Reviewed — no blocking findings

The inspected implementation and tests show no verified blocking defect; approval is deferred because build and test checks were not run and two changed files were only inspected at the relevant ranges.

What I ran

Reviewed head f6f6cd21b6f1e6962094ec70f74a735f5676dd61 from the prepared bundle and repository source. No commands or tests were run.

Results

Check Result Note
Code inspection passed Accessors, ownership, and tests inspected
Build and tests not run No execution performed
Negative control not run No negative control performed

Findings

Blocking

None verified in the inspected code.

Non-blocking

None.

Not verified

The changed files core/libs/prx/libSceNKWebKit/Export.cpp and core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp were excluded from the review bundle; only the relevant ranges were read through repository access. No build, test, convention, debt-fold, or overlap checks were run. Physical-console behavior was not verified.

Files read: core/libs/prx/libSceNKWebKit/include/WebKitValueExports.hpp, core/libs/prx/libSceNKWebKit/src/Configuration.hpp, core/libs/prx/libSceNKWebKit/src/PageState.cpp, core/libs/prx/libSceNKWebKit/tests/PageState.cpp, core/libs/prx/libSceNKWebKit/src/Object.hpp, core/libs/prx/libSceNKWebKit/CMakeLists.txt, and relevant ranges of core/libs/prx/libSceNKWebKit/Export.cpp and core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp. Also read description.md, commits.md, manifest.json, and diff.patch. No other changed file text was excluded from inspection.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6012160637 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/23759#pullrequestreview-6012160637). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-22T12:18:56Z. **Review:** COMMENTED --- # Reviewed — no blocking findings The inspected implementation and tests show no verified blocking defect; approval is deferred because build and test checks were not run and two changed files were only inspected at the relevant ranges. ## What I ran Reviewed head `f6f6cd21b6f1e6962094ec70f74a735f5676dd61` from the prepared bundle and repository source. No commands or tests were run. ## Results | Check | Result | Note | |---|---|---| | Code inspection | passed | Accessors, ownership, and tests inspected | | Build and tests | not run | No execution performed | | Negative control | not run | No negative control performed | ## Findings ### Blocking None verified in the inspected code. ### Non-blocking None. ## Not verified The changed files `core/libs/prx/libSceNKWebKit/Export.cpp` and `core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp` were excluded from the review bundle; only the relevant ranges were read through repository access. No build, test, convention, debt-fold, or overlap checks were run. Physical-console behavior was not verified. Files read: `core/libs/prx/libSceNKWebKit/include/WebKitValueExports.hpp`, `core/libs/prx/libSceNKWebKit/src/Configuration.hpp`, `core/libs/prx/libSceNKWebKit/src/PageState.cpp`, `core/libs/prx/libSceNKWebKit/tests/PageState.cpp`, `core/libs/prx/libSceNKWebKit/src/Object.hpp`, `core/libs/prx/libSceNKWebKit/CMakeLists.txt`, and relevant ranges of `core/libs/prx/libSceNKWebKit/Export.cpp` and `core/libs/prx/libSceNKWebKit/include/InventoryExports.hpp`. Also read `description.md`, `commits.md`, `manifest.json`, and `diff.patch`. No other changed file text was excluded from inspection. ## To get this to a good state Nothing is required.
MarcZX10 commented 2026-11-22 21:17:31 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-22T21:17:31Z.

Review: COMMENTED


Reviewed — no blocking findings

Nothing blocks this; the points below are optional.

What I ran

Reviewed head 349737019b4ad96c48a6475ec43709abd1c2f03c using the provided PR reader. No commands or automated checks were run.

Results

Check Result Note
Changed code review passed Reviewed all seven changed paths
Automated checks not run Not run during this review

Negative control

Not run; no negative-control change was made.

Findings

Blocking

None.

Non-blocking

None.

Sources

Reviewed the prepared diff and the changed files at the pinned head. Behavior claims are limited to the code shown in those sources.

Not verified

Build, unit tests, and the author-reported checks were not run or independently confirmed. Export.cpp and InventoryExports.hpp were inspected around the changed symbol locations; their full contents were not read.

To get this to a good state

Nothing is required. Optional: run the project checks and PageState tests on this head.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6014577073 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/23759#pullrequestreview-6014577073). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-22T21:17:31Z. **Review:** COMMENTED --- # Reviewed — no blocking findings Nothing blocks this; the points below are optional. ## What I ran Reviewed head `349737019b4ad96c48a6475ec43709abd1c2f03c` using the provided PR reader. No commands or automated checks were run. ## Results | Check | Result | Note | |---|---|---| | Changed code review | passed | Reviewed all seven changed paths | | Automated checks | not run | Not run during this review | ## Negative control Not run; no negative-control change was made. ## Findings ### Blocking None. ### Non-blocking None. ## Sources Reviewed the prepared diff and the changed files at the pinned head. Behavior claims are limited to the code shown in those sources. ## Not verified Build, unit tests, and the author-reported checks were not run or independently confirmed. `Export.cpp` and `InventoryExports.hpp` were inspected around the changed symbol locations; their full contents were not read. ## To get this to a good state Nothing is required. Optional: run the project checks and PageState tests on this head.
MarcZX10 commented 2026-11-22 22:19:03 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-22T22:19:03Z.

Review: APPROVED


Reviewed — looks good

Nothing blocks this change; the reviewed code and tests support merging.

What I ran

Reviewed head 29afc817e6333559850866f6dab734b017cef0eb. No commands or tests were run; review was based on the prepared diff and targeted source reads.

Results

Check Result Note
Changed code review passed Accessors, state, exports, tests, and debt note reviewed
Automated checks not run No test or build command was run

Findings

Blocking

None.

Non-blocking

None.

Not verified

Export.cpp and InventoryExports.hpp were excluded from the prepared review folder because they were too large; their relevant changed ranges were read through the pinned reader. No automated build or tests were run. All changed files listed in the manifest were reviewed at least in the relevant changed ranges.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6014824990 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/23759#pullrequestreview-6014824990). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-22T22:19:03Z. **Review:** APPROVED --- # Reviewed — looks good Nothing blocks this change; the reviewed code and tests support merging. ## What I ran Reviewed head `29afc817e6333559850866f6dab734b017cef0eb`. No commands or tests were run; review was based on the prepared diff and targeted source reads. ## Results | Check | Result | Note | |---|---|---| | Changed code review | passed | Accessors, state, exports, tests, and debt note reviewed | | Automated checks | not run | No test or build command was run | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified `Export.cpp` and `InventoryExports.hpp` were excluded from the prepared review folder because they were too large; their relevant changed ranges were read through the pinned reader. No automated build or tests were run. All changed files listed in the manifest were reviewed at least in the relevant changed ranges. ## To get this to a good state Nothing is required.
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!23759
No description provided.