Auto-collapse problem picker and scroll to selected problem

Merged
8W
5d ago
+163-3

Summary

Manual problem selection previously left the picker expanded, making the selection confirmation harder to see. Collapse the picker after selection, return keyboard focus to its summary, and smoothly scroll the selected problem into view.

Update existing browser tests to reopen the picker before further interactions. Add mouse, Enter, and Space regression coverage for collapse, confirmation text, focus, scrolling, reselection, and deselection.

Validation

  • Latest lobby suite: 245 passed, 0 failed, 0 skipped.
  • ESLint and Prettier passed for both changed files.
  • Git diff whitespace checks passed.
  • The full browser gate reported 1,788 passed, 17 failed, and 36 skipped. The reasons why these tests were failed or skipped are shown below.

Local test limitations

  • 15 C++ tests failed because the installed g++ does not support -std=c++20.
  • 2 floor-capture interruption tests failed on Windows. A separate reproduction confirmed that child.kill("SIGTERM") and child.kill("SIGINT") terminate the process without running its signal handlers.
  • 36 C tests skipped because cc is unavailable.

Closes #505

https://github.com/user-attachments/assets/6a31f955-a131-473f-a44c-f01e3ddbda09


Summary by cubic

Manual problem selection now collapses the picker, returns keyboard focus to its summary, and scrolls the selected problem into view (smoothly, or instantly when reduced motion is set). Previously the picker stayed expanded after selection, which obscured the confirmation text.

Updated existing browser tests to reopen the picker before further interactions. Added regression coverage for mouse, Enter, and Space selection that verifies collapse, confirmation text, focus, scrolling, reselection, and deselection.