fix(paddle-card): Release nav buttons during play so users can exit#75
Open
posthog[bot] wants to merge 1 commit into
Open
fix(paddle-card): Release nav buttons during play so users can exit#75posthog[bot] wants to merge 1 commit into
posthog[bot] wants to merge 1 commit into
Conversation
…n exit PaddleCard::handleButtonPress consumed BUTTON_UP and BUTTON_DOWN whenever the game was in StartScreen, Playing, Paused, or ServeDelay state, swallowing the events before CardNavigationStack could use them to scroll to another card. This trapped the user inside the game once it started — they could not navigate away, which a user reported as being "stuck". Mirror the FlappyHogCard pattern: only consume Up/Down while the game is actively being played (GameState::Playing, where they drive the paddle). In every other state let Up/Down fall through to CardNavigationStack so the user can always exit. Center remains owned by PaddleCard for start/pause/resume/ restart; navigation never uses center, so consuming it is safe. Introduced in c88bd01 (Paddle IP compliance pass). Generated-By: PostHog Code Task-Id: bb75f66f-cae8-440b-8de6-61a727af6754
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
A user playing DeskHog's built-in Paddle game reported being stuck — once the game started, the up/down buttons no longer scrolled to other cards, so there was no way to exit back to the rest of the UI.
Root cause
PaddleCard::handleButtonPress(src/ui/PaddleCard.cpp) returnedtrueforBUTTON_CENTER,BUTTON_UP, andBUTTON_DOWNwhenever the game was inStartScreen,Playing,Paused, orServeDelay. ReturningtruetellsCardNavigationStackthe event was handled, so it never gets a chance to use Up/Down to scroll to the next/previous card (CardNavigationStack::handleButtonPressonly navigates onBUTTON_UP/BUTTON_DOWNwhen the active card returnsfalse).The adjacent
GameOver/StartScreenbranch already released Up/Down for navigation, but that release was never extended to the active-play states.FlappyHogCarddoes not have this issue — it returnsfalseand lets navigation through.Introduced in
c88bd01(Paddle IP compliance pass).Fix
Mirror the FlappyHog pattern:
GameState::Playing, where they drive the paddle. InStartScreen,Paused,ServeDelay, andGameOverthey now fall through toCardNavigationStackso the user can always scroll away.To leave mid-game the user presses Center to pause, then Up/Down to navigate out — the intended flow.
Notes
The same signal report also surfaced a "want more game variety" complaint. That's deliberate product scope (the team adds games via the
/examplesflow), not a code defect, so it's intentionally left out of this PR.Addresses PostHog inbox report 019e0482.
🤖 Generated with Claude Code