XGameUi: mask password text entry input #2065

Merged
fuzeofficlal merged 1 commit from upstream-pr/2067 into main 2026-11-25 21:54:22 +00:00
fuzeofficlal commented 2026-11-25 04:20:26 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-25T04:20:26Z.


Closes #881.

Summary

  • Pass scope == PASSWORD (31) from text_entry_async into the host text-entry dialog and add ES_PASSWORD to the EDIT control style in dialog::edit_style so password prompts mask typed characters.

Testing

  • Added xgameui::tests::password_scope_masks_the_edit_control verifying ES_PASSWORD style selection and 0x88 vtable dispatch across plain, URL, and PASSWORD input scopes.
  • cargo test -p victory-hle --locked, cargo clippy --workspace --all-targets --all-features -- -D warnings, and cargo xtask policy.
<!-- greyfinch-sync:Marvisak/VIctory:issue:6597129779 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2067). Originally posted by [fuzeofficlal](https://github.com/fuzeofficlal) on 2026-11-25T04:20:26Z. --- Closes #881. ### Summary - Pass `scope == PASSWORD` (`31`) from `text_entry_async` into the host text-entry dialog and add `ES_PASSWORD` to the `EDIT` control style in `dialog::edit_style` so password prompts mask typed characters. ### Testing - Added `xgameui::tests::password_scope_masks_the_edit_control` verifying `ES_PASSWORD` style selection and `0x88` vtable dispatch across plain, URL, and `PASSWORD` input scopes. - `cargo test -p victory-hle --locked`, `cargo clippy --workspace --all-targets --all-features -- -D warnings`, and `cargo xtask policy`.
catminou4 commented 2026-11-25 05:05:55 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-25T04:26:29Z.

Review: COMMENTED


Static review only: victory-hle is Windows-only — nothing compiles or runs on macOS; source review of the diff.

XGameUi password text-entry input masked — privacy fix for chat/password UI paths.

<!-- greyfinch-sync:Marvisak/VIctory:review:6051850974 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2067#pullrequestreview-6051850974). Originally posted by [catminou4](https://github.com/catminou4) on 2026-11-25T04:26:29Z. **Review:** COMMENTED --- Static review only: victory-hle is Windows-only — nothing compiles or runs on macOS; source review of the diff. XGameUi password text-entry input masked — privacy fix for chat/password UI paths.
DenRakEiw commented 2026-11-25 05:05:55 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by DenRakEiw on 2026-11-25T04:56:58Z.

Review: APPROVED


Verified locally merged onto origin/main (940d32f, Windows 11 x64, Rust 1.98.1 MSVC):

  • cargo test -p victory-hle --lib xgameui:: — 4 passed, 0 failed
  • cargo clippy -p victory-hle --all-targets — 0 warnings
  • cargo xtask policy — ok (183 files ok)

Clean password masking for XGameUi text entry input with unit test coverage. Looks good.

AI-assisted (Gemini 4 Neon).

<!-- greyfinch-sync:Marvisak/VIctory:review:6052066949 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2067#pullrequestreview-6052066949). Originally posted by [DenRakEiw](https://github.com/DenRakEiw) on 2026-11-25T04:56:58Z. **Review:** APPROVED --- Verified locally merged onto `origin/main` (`940d32f`, Windows 11 x64, Rust 1.98.1 MSVC): - `cargo test -p victory-hle --lib xgameui::` — 4 passed, 0 failed - `cargo clippy -p victory-hle --all-targets` — 0 warnings - `cargo xtask policy` — ok (`183 files ok`) Clean password masking for `XGameUi` text entry input with unit test coverage. Looks good. AI-assisted (Gemini 4 Neon).
jeremygold02 commented 2026-11-25 05:06:18 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by jeremygold02 on 2026-11-25T04:23:56Z.


Triage verdict — Keep as the current implementation of #881 (cf0edf0)

Evidence

  • @fuzeofficlal and @NATON4’s earlier #1027 use the same masking mechanism: carry the Password scope into the Win32 dialog and set ES_PASSWORD. #1027 closed without merging. #370 covered the length limit and is already in main. This branch preserves that limit and adds vtable-level checks for plain, URL, and Password scopes. Current patch · Earlier patch

Checks and limits

  • Compared the actual patches and their test coverage. The live-control masking and async result checks in #881 were run on @BastienRodz’s earlier branch. This PR’s added tests verify scope routing and edit styles without opening a dialog. Prior live-control verification

Next step

  • Retain this PR as the active fix and preserve credit for @NATON4’s earlier implementation and @BastienRodz’s report. Keep the existing scope and length coverage together.

This verification was AI-assisted.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7152806316 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2067#issuecomment-7152806316). Originally posted by [jeremygold02](https://github.com/jeremygold02) on 2026-11-25T04:23:56Z. --- **Triage verdict — Keep as the current implementation of #881** (`cf0edf0`) **Evidence** - @fuzeofficlal and @NATON4’s earlier #1027 use the same masking mechanism: carry the Password scope into the Win32 dialog and set `ES_PASSWORD`. #1027 closed without merging. #370 covered the length limit and is already in `main`. This branch preserves that limit and adds vtable-level checks for plain, URL, and Password scopes. [Current patch](https://github.com/Marvisak/VIctory/pull/2067/files) · [Earlier patch](https://github.com/Marvisak/VIctory/pull/1027/files) **Checks and limits** - Compared the actual patches and their test coverage. The live-control masking and async result checks in #881 were run on @BastienRodz’s earlier branch. This PR’s added tests verify scope routing and edit styles without opening a dialog. [Prior live-control verification](https://github.com/Marvisak/VIctory/issues/881#issuecomment-7132945015) **Next step** - Retain this PR as the active fix and preserve credit for @NATON4’s earlier implementation and @BastienRodz’s report. Keep the existing scope and length coverage together. This verification was AI-assisted.
Marvisak commented 2026-11-25 11:05:18 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T10:24:48Z.


Automated triage for the maintainers.

Looks mergeable. In victory-hle/src/modules/xgameui.rs, text_entry_async now passes scope == PASSWORD (the constant already in main, used by max_length_for) down to dialog::ask. A new dialog::edit_style then adds ES_PASSWORD to the edit control, so password prompts are masked. The length limit and cancel behaviour are unchanged. The new test checks the style bits and that the scope is routed through the 0x88 slot for plain, URL and password scopes. CI is passing.


Generated by Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7159659307 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2067#issuecomment-7159659307). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T10:24:48Z. --- <!-- victory-triage v1 head=cf0edf00c708f1bffd178b12cd6b630c240acfe8 verdict=merge-candidate at=2026-11-25T10:24:42Z --> Automated triage for the maintainers. Looks mergeable. In `victory-hle/src/modules/xgameui.rs`, `text_entry_async` now passes `scope == PASSWORD` (the constant already in main, used by `max_length_for`) down to `dialog::ask`. A new `dialog::edit_style` then adds `ES_PASSWORD` to the edit control, so password prompts are masked. The length limit and cancel behaviour are unchanged. The new test checks the style bits and that the scope is routed through the 0x88 slot for plain, URL and password scopes. CI is passing. --- _Generated by [Claude Code](https://claude.ai/code)_
upstream-sync closed this pull request 2026-11-25 22:03:24 +00:00
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
Marvisak/VIctory!2065
No description provided.