Enable viewing other players' Yahtzee scoresheets#243
Enable viewing other players' Yahtzee scoresheets#243mohammad-aloufi wants to merge 10 commits intoXGDevGroup:mainfrom
Conversation
|
Review generated by Claude (Anthropic's coding assistant), posted at the repo owner's request. Thanks for this — being able to inspect any player's sheet is a nice quality-of-life win for Yahtzee. Claude tested the PR end-to-end (real A few things worth discussing. UX concernCommon case is now slower. Pressing
Worth picking one before merging. Picker also blocks all other keybinds while open. Pre-existing behavior — Code-quality issues1. def _handle_transient_display_selection(self, player, selection_id):
super()._handle_transient_display_selection(player, selection_id)
state = self._get_transient_display_state(player)
if not state:
return
if state.kind == "scoresheet_player_select":
...This works today only because the base implementation doesn't mutate state for unknown kinds. If anyone later adds a new kind to the base that does mutate state, the override will dispatch on the wrong state. The robust pattern is to check kind first, handle locally, and delegate to super for unknown kinds: state = self._get_transient_display_state(player)
if state and state.kind == "scoresheet_player_select":
self._close_transient_display(player)
target = self.get_player_by_id(selection_id)
if target:
self._show_player_scoresheet(player, target)
return
super()._handle_transient_display_selection(player, selection_id)2. Brittle blind cast ( 3. 4. 5. Trailing whitespace at lines 554 and 632. Smaller observations6. Spectators still can't view scoresheets. The TestingThe PR description describes manual testing only. Claude wrote 8 targeted tests in |
|
Done.
|
What the code actually does
Test results
Issues1. PR description contradicts the implementationThe summary says "Modified 2. No tests added70 lines of new behavior, zero test coverage. Per 3. Localization gaps
4. Two chord keybinds for one feature is overheadFor screen-reader users, fewer chords is better. The single-keybind design implied by the PR description (one RecommendationPick one design and align code, description, and tests:
Either way, please add tests covering the picker flow, the spectator path, and the Back item. |
|
I can't work with this anymore. Claude just confuses the hell out of me and is wasting my time at this point. It suggested separate keybinds for viewing your own sheet vs getting a list of players to view their sheets which I did implement, and it was a good idea actually. One I should've done from the start. It's also confusing the testing notes that I wrote when I first submitted the PR vs the comments which cover the current progress. Other than that, I should've added tests for sure, but I honestly can't work with this at this point. I won't close the PR from my end, but I won't be updating it either |
|
That is understandable. I’ll see how much I can understand of this manually, and get input from Rory. I’ll ask claude to look at it as a last resort. But it has definitely messed up here. |
Summary
This PR enhances the UX in Yahtzee by allowing players to check the scoresheets of any active participant in the game. Previously, the
ckeybind would automatically jump into displaying the scoresheet of the player whose turn it currently is. This introduces a transient menu when pressingcgiving the flexibility to select and view the detailed scoresheet of any given active player.Changes Made
_action_view_scoresheetto display a transient menu (kind="scoresheet_player_select") populated with all active players in the game instead of instantly rendering a scoresheet._show_player_scoresheethelper method to build and render the target player's metrics._handle_transient_display_selectioninYahtzeeGame.Testing Notes
cat any point during active play and verify that the target player list is shown correctly.