Redesign record-game flow (stepped entry) — behavioral#96
Open
b006n97 wants to merge 1 commit into
Open
Conversation
Rework game entry (CreateGame, Game, and the legacy jp/hk game screens) onto a
stepped UI with clearer per-round requirements, and consolidate create routing:
- StepSection / RoundRequirements / TransactionTypeSelector (replacing
TransactionTypeButtonList) / PlayerScoreCard drive the new entry flow;
Footer, PlayerButtonRow, PointsInput, DropdownInput, TableDisplay restyled.
- App.tsx: /games/create/{jp,hk}[/casual] collapse to a single query-param
/games/create page; legacy URLs redirect carrying variant/type.
BEHAVIORAL CHANGES (intentional, confirmed):
- constants.ts default hand: JP_UNDEFINED_HAND {han:-2,fu:10} -> {han:1,fu:30};
HK_UNDEFINED_HAND (-1) renamed/retuned to HK_DEFAULT_HAND (3). Entry now
starts from a valid minimum hand instead of a sentinel.
- assignRoundAction centralizes role-exclusivity (a player can't be winner and
loser at once) across every assignment path.
- getUnmet{Japanese,HongKong}RoundRequirements add soft, non-throwing
validation so the UI can gate Submit; the throwing validators remain the
submit-time safety net.
TESTING GAP: assignRoundAction / isValidHand / getUnmet*RoundRequirements are
pure and unit-testable, but the frontend has no test runner configured. Cover
via a follow-up (add vitest to frontend) or manual QA of deal-in / self-draw /
pao / nagashi / deck-out entry in both variants before release.
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.
Rework game entry (CreateGame, Game, and the legacy jp/hk game screens) onto a stepped UI with clearer per-round requirements, and consolidate create routing:
BEHAVIORAL CHANGES (intentional, confirmed):
TESTING GAP: assignRoundAction / isValidHand / getUnmet*RoundRequirements are pure and unit-testable, but the frontend has no test runner configured. Cover via a follow-up (add vitest to frontend) or manual QA of deal-in / self-draw / pao / nagashi / deck-out entry in both variants before release.