Improve UI test coverage, fix scene transition bug, add cloud session setup#69
Merged
vicplusplus merged 9 commits intomainfrom Apr 8, 2026
Merged
Conversation
Replace button-existence checks with state-based navigation coverage that validates every UXML button is keyboard-navigable in the correct UI state. Each scene declares its possible states (loading, playing, modal-open, etc.) with expected navigable and background buttons. Per-state tests verify: - Every navigable button exists and is visible - Every background button exists and is visible - No other visible button is uncovered Per-scene tests verify: - Every named Button in the UXML is navigable in at least one state Adding a button to UXML without wiring it into a state declaration now fails the test. This would have caught the screen--hidden CSS bug where the leave-modal was visible during loading. https://claude.ai/code/session_01E9ALXb2KD15KiKgivSPZjM
VictoryController.OnViewLeaderboard() was using SceneNav.Push, which
stacked Leaderboard on top of the finished Game scene. Popping
Leaderboard returned to the dead post-victory Game scene, softlocking.
Fix: Use SceneNav.Replace so Leaderboard takes Game's position in the
stack. Popping now returns to the scene that launched Game (Size Select
or MainMenu). Leaderboard.OnBack() can now use a simple Pop() instead
of the Reset("MainMenu") workaround that was force-reloading MainMenu.
https://claude.ai/code/session_01E9ALXb2KD15KiKgivSPZjM
Extract pure stack logic from SceneNav into SceneNavStack (Domain layer) so transition sequences can be unit-tested without loading real scenes. SceneNav delegates to SceneNavStack for all stack operations. Tests cover every real user flow through the scene graph: Play, Continue, Quick Reset, Victory → Menu, Victory → Leaderboard → Back, and nested Replay paths. Includes a regression test documenting the Push-vs-Replace bug that caused the stale game scene softlock. https://claude.ai/code/session_01E9ALXb2KD15KiKgivSPZjM
CSSResolutionTests verifies that every CSS hidden class (screen--hidden, modal--hidden, lb--hidden, victory--hidden) actually resolves to display:none in each UXML document that uses it. This catches the exact class of bug where a hidden class is used in a document that doesn't import the stylesheet defining it. Also tests responsive CSS selectors: leaderboard compact mode hides inline fav/play buttons when lb-screen--compact is applied, and documents the compact width threshold across standard aspect ratios. https://claude.ai/code/session_01E9ALXb2KD15KiKgivSPZjM
Add .meta files for SceneNavStack.cs, SceneNavStackTests.cs, and CSSResolutionTests.cs. Update pre-commit hook to auto-generate and stage missing .meta files instead of just erroring. https://claude.ai/code/session_01E9ALXb2KD15KiKgivSPZjM
Installs .NET SDK 10.0, restores CSharpier via dotnet tool restore, and configures git hooks path. Runs only in remote (cloud) sessions. Ensures formatting checks and meta file generation work from first commit in any new session. https://claude.ai/code/session_01E9ALXb2KD15KiKgivSPZjM
Runs dotnet/CSharpier install in background while the session starts, reducing startup latency. The container state is cached after install completes so subsequent sessions are instant. https://claude.ai/code/session_01E9ALXb2KD15KiKgivSPZjM
UIState was private but used as a parameter in public test methods, causing CS0051. Changed to public. https://claude.ai/code/session_01E9ALXb2KD15KiKgivSPZjM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Overhaul NavigationCoverageTests with state-based validation. Each scene declares its possible UI states (loading, playing, modal-open, etc.) with expected navigable and background buttons. Per-state tests verify visible buttons match exactly; per-scene tests verify every UXML button is navigable in at least one state. Adding a button to UXML without wiring it into a state declaration fails the test.
Add CSS resolution smoke tests. Verifies that every CSS hidden class (
screen--hidden,modal--hidden,lb--hidden,victory--hidden) actually resolves todisplay: nonein each document that uses it. Would have caught the bug from Fix empty modal blocking game loading screen #67. Also tests responsive CSS selectors (leaderboard compact mode).Fix leaderboard back button returning to stale game scene. Victory → Leaderboard was using
SceneNav.Push, stacking Leaderboard on top of the finished Game scene. Changed toSceneNav.Replaceso Leaderboard takes Game's stack position. Replaced theReset("MainMenu")workaround inOnBack()with a properPop().Add SceneNavStack with unit tests. Extracts pure stack logic from
SceneNavinto a testable domain class. 15 EditMode tests model every real user flow through the scene graph, including a regression test for the stale-game-scene bug.Auto-generate missing .meta files in pre-commit hook. Instead of just erroring, the hook now generates and stages .meta files for new assets automatically.
Add SessionStart hook for cloud sessions. Installs .NET SDK, restores CSharpier, and configures git hooks path. Runs asynchronously so it doesn't block session startup.
Test plan
https://claude.ai/code/session_01E9ALXb2KD15KiKgivSPZjM