dialog: print the text of user message dialogs #2287

Open
github-bot wants to merge 1 commit from github-bot/gh-2287 into main AGit
Owner

@⁠Nawid3333 on GitHub · 2026-11-15 15:24 UTC · original
Nawid3333:dialog/msg-dialog-user-text → main · +84 −0 · 3 files · 1 commits · open

Problem

Kyty does not draw message dialogs, so when a game reports an error through a user message dialog (MsgDialogOpen with mode 1), nobody sees the text. The game then waits behind the dialog, and the stop looks like an emulator hang. Ghost of Yōtei (PPSA26344) started without its base-game entitlement does this: it opens such a dialog and stays on its loading spinner (#2204).

Change

  • MsgDialogOpen: for a user message dialog with a message, it prints Message dialog: <text> to the console and the log. Other modes and a missing message print nothing. The dialog status and result are unchanged.
  • UserMessageText reads the text through MsgDialogUserMessageParam (button type, message pointer, buttons pointer, 24 reserved bytes; 48 bytes, checked with a static_assert like the file's other dialog structs).

Tests

  • save_data_dialog_tests, TestMsgDialogUserText: a user message, the progress bar mode with the same message parameter set, a null message, and a null user message parameter. The test's own copy of the guest structs asserts the offsets (mode 0x38, user_msg_param 0x40, msg 8).
  • It fails when UserMessageText returns no text, and when it ignores the mode.
  • Fork CI (run): builds on Windows, Linux and macOS; save_data_dialog passes in the Windows job (the Linux and macOS jobs do not run this suite).

In a game

Ghost of Yōtei 01.008.000, Windows 11, RTX 5070, tested by @⁠yuca-a in #2204 with a fork build that has this change (its dialog.cpp differs from this PR only by the static_assert). Started without --addcont GHOST2BASE000000, the console shows:

Message dialog: Unable to launch: missing base entitlement. Please contact PlayStation Support.

With --addcont the same build gets past this point to the brightness and difficulty screens (comment).

Written with Claude Code (AI): Claude Code wrote the change and the test and ran them; Claude (Opus) reviewed the diff.

**@⁠Nawid3333** on GitHub · 2026-11-15 15:24 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/2287) `Nawid3333:dialog/msg-dialog-user-text` → `main` · +84 −0 · 3 files · 1 commits · open ## Problem Kyty does not draw message dialogs, so when a game reports an error through a user message dialog (`MsgDialogOpen` with mode 1), nobody sees the text. The game then waits behind the dialog, and the stop looks like an emulator hang. Ghost of Yōtei (PPSA26344) started without its base-game entitlement does this: it opens such a dialog and stays on its loading spinner (#2204). ## Change - `MsgDialogOpen`: for a user message dialog with a message, it prints `Message dialog: <text>` to the console and the log. Other modes and a missing message print nothing. The dialog status and result are unchanged. - `UserMessageText` reads the text through `MsgDialogUserMessageParam` (button type, message pointer, buttons pointer, 24 reserved bytes; 48 bytes, checked with a `static_assert` like the file's other dialog structs). ## Tests - `save_data_dialog_tests`, `TestMsgDialogUserText`: a user message, the progress bar mode with the same message parameter set, a null message, and a null user message parameter. The test's own copy of the guest structs asserts the offsets (`mode` 0x38, `user_msg_param` 0x40, `msg` 8). - It fails when `UserMessageText` returns no text, and when it ignores the mode. - Fork CI ([run](https://github.com/Nawid3333/KytyPS5/actions/runs/43727303403)): builds on Windows, Linux and macOS; `save_data_dialog` passes in the Windows job (the Linux and macOS jobs do not run this suite). ## In a game Ghost of Yōtei 01.008.000, Windows 11, RTX 5070, tested by @⁠yuca-a in #2204 with a fork build that has this change (its `dialog.cpp` differs from this PR only by the `static_assert`). Started without `--addcont GHOST2BASE000000`, the console shows: ``` Message dialog: Unable to launch: missing base entitlement. Please contact PlayStation Support. ``` With `--addcont` the same build gets past this point to the brightness and difficulty screens ([comment](https://git.gtahub.st/github/KytyPS5--KytyPS5/issues/2204)). Written with Claude Code (AI): Claude Code wrote the change and the test and ran them; Claude (Opus) reviewed the diff.
Kyty does not draw message dialogs, so a game's error message stayed
invisible. Ghost of Yotei opens one ("Unable to launch: missing base
entitlement") and then waits behind its loading spinner.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:18:08 +00:00
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-11-15 15:28 UTC · original · edited 2026-11-17 23:25 UTC

Explain Change →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Run configuration

Commits

Reviewing files that changed from the base of the PR and between b5e7ad964f4027a3fcd21890a95adbb6961a5770 and af1f115002.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
Walkthrough

The dialog library adds a user-message parameter layout and a function that returns the message text when the dialog uses user-message mode and the required pointers are non-null. MsgDialogOpen writes non-empty extracted text to the console and log. Tests check parameter offsets and verify the extraction results for user-message mode and null or progress-bar cases.

Suggested reviewers: nmzik

Change: Feature

Merge Risk: Minimal · previous review b5e7a

The change prints the text of user message dialogs to the console and log, and leaves dialog status and results unchanged. No merge-blocking risk was identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: user message dialog text is now printed to the console and log. It is specific and matches the changeset (MsgDialogOpen prints text for mode 1 via UserMessageText).
Description check Passed The description explains the problem (message dialogs are not drawn, so the game appears to hang), the change (console and log output for user message dialogs, the MsgDialogUserMessageParam read, and …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description explains the problem (message dialogs are not drawn, so the game appears to hang), the change (console and log output for user message dialogs, the MsgDialogUserMessageParam read, and a static_assert), the added test, and a real-game validation. It directly relates to the changeset.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

**@⁠coderabbitai[bot]** on GitHub · 2026-11-15 15:28 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/2287#issuecomment-6896862135) · edited 2026-11-17 23:25 UTC <!-- coderabbit-ai-generated:v1 --> <!-- This is an auto-generated comment: summarize by coderabbit.ai --> <!-- review_stack_entry_start --> <a href="https://app.coderabbit.ai/change-stack/KytyPS5/KytyPS5/pull/2287?scope=ghh_OusAJGA4HG8ljoOV0wJvVx8NmnZIjc2DdjmxOu0xZWA&amp;cs_source=review_comment"><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-stack-buttons-v1/explain-change-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-stack-buttons-v1/explain-change.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-stack-buttons-v1/explain-change.svg" alt="Explain Change →" height="32"></picture></a> <!-- review_stack_entry_end --> <!-- This is an auto-generated comment: skip review by coderabbit.ai --> > [!IMPORTANT] > ## Review skipped > > Review was skipped as selected files did not have any reviewable changes. > > > > > > <details> > <summary><strong><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/cog-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/cog.svg" width="16" height="16" align="absmiddle" alt=""></picture> Run configuration</strong></summary> > <dl> > <dd> > <br> > > - **Source mode**: Auto > - **Repository**: [KytyPS5/KytyPS5](<https://github.com/KytyPS5/KytyPS5>) > - **Branch**: [main](<https://github.com/KytyPS5/KytyPS5/tree/main>) > - **File**: [.coderabbit.yaml](<https://github.com/KytyPS5/KytyPS5/blob/2638b1b07613dc32a4708d2cd61a75711b84b6cf/.coderabbit.yaml>) > - **Commit**: [2638b1b](<https://github.com/KytyPS5/KytyPS5/commit/2638b1b07613dc32a4708d2cd61a75711b84b6cf>) > - **Layers**: Repository YAML > - **Review profile**: CHILL > - **Plan**: Advanced > - **Run ID**: `ca701e13-45b7-4012-8b75-186121340cf9` > > </dd> > </dl> > </details> > > <details> > <summary><strong><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/git-commit-horizontal-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/git-commit-horizontal.svg" width="16" height="16" align="absmiddle" alt=""></picture> Commits</strong></summary> > <dl> > <dd> > <br> > > Reviewing files that changed from the base of the PR and between b5e7ad964f4027a3fcd21890a95adbb6961a5770 and af1f1150021b9b37c145e4e8ef8aa7d1f871aa87. > > </dd> > </dl> > </details> > > You can disable this status message by setting the `reviews.review_status` to `false` in the CodeRabbit configuration file. > > Use the checkbox below for a quick retry: > - [ ] <!-- {"checkboxId":"e9bb8d72-00e8-4f67-9cb2-caf3b22574fe"} --> Trigger review <!-- end of auto-generated comment: skip review by coderabbit.ai --> <!-- walkthrough_start --> <details> <summary><strong>Walkthrough</strong></summary> <dl> <dd> <br> The dialog library adds a user-message parameter layout and a function that returns the message text when the dialog uses user-message mode and the required pointers are non-null. `MsgDialogOpen` writes non-empty extracted text to the console and log. Tests check parameter offsets and verify the extraction results for user-message mode and null or progress-bar cases. **Suggested reviewers:** `nmzik` </dd> </dl> </details> <!-- walkthrough_end --> <!-- change_assessment_start --> <!-- change_assessment_commit:"b5e7ad964f4027a3fcd21890a95adbb6961a5770" --> <!-- change_assessment_priority:{"version":1,"urgency":"p2","manual":false} --> **Change:** Feature <!-- change_assessment_end --> <details> <summary><strong>Merge Risk:</strong> <strong><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/risk-unassessed-16.svg" width="16" height="16" align="absmiddle" alt=""></picture> Minimal</strong> · previous review <code>b5e7a</code></summary> <dl> <dd> <br> <!-- final_review_risk_start --> <!-- final_review_risk_label **Merge Risk:** **⚪ Minimal** · up to `b5e7a` --> <!-- final_review_risk_coverage:{"sourceCommitId":"b5e7ad964f4027a3fcd21890a95adbb6961a5770","coveredCommitId":"b5e7ad964f4027a3fcd21890a95adbb6961a5770","kind":"reviewed"} --> The change prints the text of user message dialogs to the console and log, and leaves dialog status and results unchanged. No merge-blocking risk was identified. <!-- final_review_risk_end --> </dd> </dl> </details> <!-- pre_merge_checks_walkthrough_start --> <details> <summary><strong>Pre-merge checks: <sup><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-counter-passed-14-v2.svg" width="14" height="14" align="middle" alt="Passed" title="Passed"></picture></sup> 4</strong></summary> <dl> <dd> <br> | Check name | Status | Explanation | | :------------------------ | :--------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Title check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | The title names the main change: user message dialog text is now printed to the console and log. It is specific and matches the changeset (MsgDialogOpen prints text for mode 1 via UserMessageText). | | Description check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | The description explains the problem (message dialogs are not drawn, so the game appears to hang), the change (console and log output for user message dialogs, the MsgDialogUserMessageParam read, and … | | Linked Issues check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | Check skipped because no linked issues were found for this pull request. | | Out of Scope Changes check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | Check skipped because no linked issues were found for this pull request. | <details> <summary><strong>Full details: Description check</strong></summary> <dl> <dd> <br> **Explanation** The description explains the problem (message dialogs are not drawn, so the game appears to hang), the change (console and log output for user message dialogs, the MsgDialogUserMessageParam read, and a static_assert), the added test, and a real-game validation. It directly relates to the changeset. </dd> </dl> </details> </dd> </dl> </details> <!-- pre_merge_checks_walkthrough_end --> <!-- tips_start --> Thanks for using [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=KytyPS5/KytyPS5&utm_content=2287)! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. <details> <summary><strong>Share</strong></summary> <dl> <dd> <br> - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code) </dd> </dl> </details> <!-- tips_end -->
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-11-15 15:28 UTC · original · reviewed

Nitpick comments: 1

tests/SaveDataDialogTests.cpp: 1

171-171: Trivial · Maintainability & Code Quality · Quick win

Add a test for output through MsgDialogOpen.

These assertions call only UserMessageText. If the output block in MsgDialogOpen is removed, the new tests still pass. Add a test that captures output from MsgDialogOpen and checks that user-message text appears, while progress-bar and null-message text do not. Keep the extraction checks. This protects the PR's main behavior. (raw.githubusercontent.com)

Review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 3acafb358f and b5e7ad964f4027a3fcd21890a95adbb6961a5770.

Files selected for processing: 3

  • src/libs/dialog.cpp
  • src/libs/dialog.h
  • tests/SaveDataDialogTests.cpp

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

**@⁠coderabbitai[bot]** on GitHub · 2026-11-15 15:28 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/2287#pullrequestreview-5911486962) · **reviewed** <!-- coderabbit-ai-generated:v1 --> <details> <summary><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/brush-cleaning-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/brush-cleaning.svg" width="16" height="16" align="absmiddle" alt=""></picture> Nitpick comments: 1</summary><blockquote> <dl> <dd> <br> <details> <summary>tests/SaveDataDialogTests.cpp: 1</summary><blockquote> <dl> <dd> <br> `171-171`: **<picture><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/neutral-16.svg" width="16" height="16" align="absmiddle" alt=""></picture> Trivial** · **Maintainability & Code Quality** · **Quick win** **Add a test for output through `MsgDialogOpen`.** These assertions call only `UserMessageText`. If the output block in `MsgDialogOpen` is removed, the new tests still pass. Add a test that captures output from `MsgDialogOpen` and checks that user-message text appears, while progress-bar and null-message text do not. Keep the extraction checks. This protects the PR's main behavior. ([raw.githubusercontent.com](https://raw.githubusercontent.com/KytyPS5/KytyPS5/b5e7ad964f4027a3fcd21890a95adbb6961a5770/tests/SaveDataDialogTests.cpp)) <!-- cr-comment:v1:a420b3ea42f716cfe47abe5c --> </dd> </dl> </blockquote></details> </dd> </dl> </blockquote></details> <h6> <details> <summary><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/info.svg" width="12" height="12" align="absmiddle" alt=""></picture> Review info</summary> <dl> <dd> <br> <details> <summary><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/cog-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/cog.svg" width="16" height="16" align="absmiddle" alt=""></picture> Run configuration</summary> <dl> <dd> <br> - **Source mode**: Auto - **Repository**: [KytyPS5/KytyPS5](<https://github.com/KytyPS5/KytyPS5>) - **Branch**: [main](<https://github.com/KytyPS5/KytyPS5/tree/main>) - **File**: [.coderabbit.yaml](<https://github.com/KytyPS5/KytyPS5/blob/3acafb358f5a136ed7b5ca847476c3ebb2c78750/.coderabbit.yaml>) - **Commit**: [3acafb3](<https://github.com/KytyPS5/KytyPS5/commit/3acafb358f5a136ed7b5ca847476c3ebb2c78750>) - **Layers**: Repository YAML - **Review profile**: CHILL - **Plan**: Advanced - **Run ID**: `efb47189-a3f7-4fbe-822b-169d0b9b07c9` </dd> </dl> </details> <details> <summary><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/git-commit-horizontal-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/git-commit-horizontal.svg" width="16" height="16" align="absmiddle" alt=""></picture> Commits</summary> <dl> <dd> <br> Reviewing files that changed from the base of the PR and between 3acafb358f5a136ed7b5ca847476c3ebb2c78750 and b5e7ad964f4027a3fcd21890a95adbb6961a5770. </dd> </dl> </details> <details> <summary><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/file-plus-corner-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/file-plus-corner.svg" width="16" height="16" align="absmiddle" alt=""></picture> Files selected for processing: 3</summary> <dl> <dd> <br> * `src/libs/dialog.cpp` * `src/libs/dialog.h` * `tests/SaveDataDialogTests.cpp` </dd> </dl> </details> **Included review availability:** This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. </dd> </dl> </details> </h6> <!-- This is an auto-generated comment by CodeRabbit for review status --> <!-- coderabbit-review-publication v1 publication=735138f2-4e68-41ea-8093-cf62063057fb attempt=06c59588-df21-446c-b1ef-c89eb0f01307 batch=1/1 -->
Author
Owner

@⁠Nawid3333 on GitHub · 2026-11-15 15:53 UTC · original

@⁠coderabbitai The print itself is the single Log::WriteToConsoleAndLog call on the text UserMessageText returns, and WriteToConsoleAndLog takes a std::string_view, so there is no formatting step to get wrong. Checking it in the test would mean capturing the process's stdout on Windows, Linux and macOS (and starting the log), which is more code than this change. The line is confirmed in a game run instead (Ghost of Yōtei, quoted in the description), so I'll keep the test on the extraction.

**@⁠Nawid3333** on GitHub · 2026-11-15 15:53 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/2287#issuecomment-6897185191) @⁠coderabbitai The print itself is the single `Log::WriteToConsoleAndLog` call on the text `UserMessageText` returns, and `WriteToConsoleAndLog` takes a `std::string_view`, so there is no formatting step to get wrong. Checking it in the test would mean capturing the process's stdout on Windows, Linux and macOS (and starting the log), which is more code than this change. The line is confirmed in a game run instead (Ghost of Yōtei, quoted in the description), so I'll keep the test on the extraction.
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-11-15 15:54 UTC · original

Tip

For best results, initiate chat on the files or code changes.

@⁠Nawid3333 That makes sense. The test covers extraction and mode handling, and the reported Ghost of Yōtei run provides an end-to-end check of the output. I won’t request a separate output-capture test.

You are interacting with an AI system.

**@⁠coderabbitai[bot]** on GitHub · 2026-11-15 15:54 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/2287#issuecomment-6897188244) <!-- coderabbit-ai-generated:v1 --> <!-- This is an auto-generated reply by CodeRabbit --> > [!TIP] > For best results, initiate chat on the files or code changes. @⁠Nawid3333 That makes sense. The test covers extraction and mode handling, and the reported Ghost of Yōtei run provides an end-to-end check of the output. I won’t request a separate output-capture test. <sub><i>You are interacting with an AI system.</i></sub>
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2287/head:github-bot/gh-2287'
git switch 'github-bot/gh-2287'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2287'
git switch 'github-bot/gh-2287'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2287'
git switch 'github-bot/gh-2287'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2287'
git switch 'main'
git merge --squash 'github-bot/gh-2287'
git switch 'main'
git merge --ff-only 'github-bot/gh-2287'
git switch 'main'
git merge 'github-bot/gh-2287'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.