|
| 1 | +# PR_26163_064-user-controls-controller-dropdown-selection |
| 2 | + |
| 3 | +## Branch Validation |
| 4 | + |
| 5 | +- PASS: Current branch is `main`. |
| 6 | +- PASS: Expected branch is `main`. |
| 7 | +- Evidence: `git branch --show-current` returned `main`. |
| 8 | + |
| 9 | +## Requirement Checklist |
| 10 | + |
| 11 | +- PASS: Read `docs_build/dev/PROJECT_INSTRUCTIONS.md` before implementation. |
| 12 | +- PASS: Replaced detected-controller row selection with `[ Refresh Devices ] [ Controller Dropdown ] [ Create User Control Profile ]` in `account/user-controls.html`. |
| 13 | +- PASS: Controller Dropdown contains only currently detected controllers; placeholder remains `Choose a game controller`. |
| 14 | +- PASS: Refresh Devices updates the dropdown list; Playwright clicks Refresh after exposing test gamepads and validates the dropdown options. |
| 15 | +- PASS: Detection creates zero profiles; Playwright validates `player_controller_profiles` remains empty after detection/refresh. |
| 16 | +- PASS: Removed detected-controller profile-style rows from the profile table. |
| 17 | +- PASS: Create User Control Profile uses the selected dropdown controller. |
| 18 | +- PASS: Create User Control Profile creates exactly one new editable unsaved profile. |
| 19 | +- PASS: Save persists the created profile. |
| 20 | +- PASS: Selected Device radios exist only on actual profiles and default profiles. |
| 21 | +- PASS: Default Profile retains a radio. |
| 22 | +- PASS: User-created profiles retain radios. |
| 23 | +- PASS: Scope stayed limited to account/user-controls controller selection and profile generation flow plus targeted tests/reports. |
| 24 | + |
| 25 | +## Search Evidence |
| 26 | + |
| 27 | +- PASS: `rg -n "detectedDeviceSelectionChoice|renderDetectedDeviceRow|data-account-user-controls-detected-device=|Select a detected game controller row|Detected Inputs|Create my profile to customize" account/user-controls-page.js account/user-controls.html tests/playwright/tools/InputMappingV2Tool.spec.mjs` returned no matches. |
| 28 | +- PASS: `rg -n "data-account-user-controls-device|data-account-user-controls-add-profile|data-account-user-controls-refresh|selected controller dropdown device" account/user-controls.html account/user-controls-page.js tests/playwright/tools/InputMappingV2Tool.spec.mjs` shows the active dropdown workflow in HTML, JS bindings, and Playwright coverage. |
| 29 | + |
| 30 | +## Changed Files |
| 31 | + |
| 32 | +- `account/user-controls.html` |
| 33 | +- `account/user-controls-page.js` |
| 34 | +- `tests/playwright/tools/InputMappingV2Tool.spec.mjs` |
| 35 | +- `docs_build/dev/reports/playwright_v8_coverage_report.txt` |
| 36 | +- `docs_build/dev/reports/PR_26163_064-user-controls-controller-dropdown-selection.md` |
| 37 | +- `docs_build/dev/reports/codex_changed_files.txt` |
| 38 | +- `docs_build/dev/reports/codex_review.diff` |
| 39 | + |
| 40 | +## Impacted Lane |
| 41 | + |
| 42 | +- Account/User Controls runtime lane. |
| 43 | +- Targeted Account/User Controls Playwright lane. |
| 44 | +- Required legacy workspace command: `npm run test:workspace-v2`. |
| 45 | + |
| 46 | +Note: `npm run test:workspace-v2` is a legacy command name retained by repo scripts; this PR uses user-facing Account/User Controls language. |
| 47 | + |
| 48 | +## Skipped Lanes |
| 49 | + |
| 50 | +- Full samples smoke: SKIP. Safe because this PR changes only account user-controls UI/runtime behavior and targeted Playwright tests; no sample JSON, sample loader, or game runtime sample path changed. |
| 51 | +- Engine input lane: SKIP. Safe because `src/engine/input` was consumed but not modified. |
| 52 | +- Toolbox Controls lane: SKIP. Safe because Toolbox > Controls files were not modified. |
| 53 | + |
| 54 | +## Testing Performed |
| 55 | + |
| 56 | +- PASS: `node --check account/user-controls-page.js` |
| 57 | +- PASS: `node --check tests/playwright/tools/InputMappingV2Tool.spec.mjs` |
| 58 | +- PASS: `git diff --check -- account/user-controls.html account/user-controls-page.js tests/playwright/tools/InputMappingV2Tool.spec.mjs` |
| 59 | +- PASS: `rg -n "<style| on[a-z]+=" account/user-controls.html` returned no inline style/event handler matches. |
| 60 | +- PASS: `npx playwright test tests/playwright/tools/InputMappingV2Tool.spec.mjs --grep "User Controls owns physical input mapping accordions and profiles|selected controller dropdown device" --reporter=line` passed 2 tests. |
| 61 | +- PASS: `npm run test:workspace-v2` passed; workspace-contract lane reported 5 passed. |
| 62 | + |
| 63 | +## Playwright Result |
| 64 | + |
| 65 | +- PASS: Targeted Account/User Controls Playwright checks passed. |
| 66 | +- PASS: Required `npm run test:workspace-v2` passed. |
| 67 | + |
| 68 | +## V8 Coverage |
| 69 | + |
| 70 | +- PASS: `docs_build/dev/reports/playwright_v8_coverage_report.txt` includes changed runtime JavaScript coverage. |
| 71 | +- PASS: `(92%) account/user-controls-page.js - changed runtime JS file with browser V8 coverage`. |
| 72 | + |
| 73 | +## ZIP Artifact |
| 74 | + |
| 75 | +- PASS: Repo-structured delta ZIP produced at `tmp/PR_26163_064-user-controls-controller-dropdown-selection_delta.zip`. |
| 76 | + |
| 77 | +## Manual Validation Steps |
| 78 | + |
| 79 | +1. Open `/account/user-controls.html` while signed in. |
| 80 | +2. In Game Controllers, verify the workflow row reads Refresh Devices, Controller dropdown, Create User Control Profile. |
| 81 | +3. Connect or expose a game controller and click Refresh Devices. |
| 82 | +4. Confirm the dropdown updates with detected controller names and no detected-controller rows appear in the profile table. |
| 83 | +5. Select one controller from the dropdown. |
| 84 | +6. Click Create User Control Profile. |
| 85 | +7. Confirm exactly one editable unsaved profile appears for the selected controller. |
| 86 | +8. Click Save and confirm the saved profile persists and gains its Selected Device radio. |
| 87 | + |
| 88 | +## Samples Validation Decision |
| 89 | + |
| 90 | +- SKIP: Full samples smoke was not run because no samples, sample JSON, sample loader, or production game runtime behavior changed. |
0 commit comments