Background
#230 added support for shared wins (ties) in the golf frontend. The backend now sends a joined display winner string (e.g. "alice & bob") plus a typed winners: string[] list. To stay compatible with servers that predate the winners list, the frontend keeps a fallback to the old name === winner string compare.
Cleanup once the backend rollout is complete
When every deployed golf server reliably sends the winners list, the legacy fallback can be removed:
src/apps/golf/components/GolfGame.tsx — in isGameWinner(), drop the name === winner fallback branch and rely solely on winners membership.
src/hooks/useGolfGame.ts — consider whether winner (the display string) is still needed alongside winners, or whether the UI can derive its display text from winners directly.
src/plugins/golfNetworkPlugin.ts / src/utils/networkAdapter.ts — make winners a required (non-optional) argument on the onGameEnded callback signature once it's always present.
- Update the
gameEnded tests that exercise the "legacy server omits the list" path (golfNetworkPlugin.gameEnded.test.ts, useGolfGame.gameEnded.test.tsx).
Blocked on
Backend shared-wins rollout reaching all environments.
🤖 Generated with Claude Code
https://claude.ai/code/session_01A8ftoV23UzNjLxoyaFQpoW
Background
#230 added support for shared wins (ties) in the golf frontend. The backend now sends a joined display
winnerstring (e.g."alice & bob") plus a typedwinners: string[]list. To stay compatible with servers that predate thewinnerslist, the frontend keeps a fallback to the oldname === winnerstring compare.Cleanup once the backend rollout is complete
When every deployed golf server reliably sends the
winnerslist, the legacy fallback can be removed:src/apps/golf/components/GolfGame.tsx— inisGameWinner(), drop thename === winnerfallback branch and rely solely onwinnersmembership.src/hooks/useGolfGame.ts— consider whetherwinner(the display string) is still needed alongsidewinners, or whether the UI can derive its display text fromwinnersdirectly.src/plugins/golfNetworkPlugin.ts/src/utils/networkAdapter.ts— makewinnersa required (non-optional) argument on theonGameEndedcallback signature once it's always present.gameEndedtests that exercise the "legacy server omits the list" path (golfNetworkPlugin.gameEnded.test.ts,useGolfGame.gameEnded.test.tsx).Blocked on
Backend shared-wins rollout reaching all environments.
🤖 Generated with Claude Code
https://claude.ai/code/session_01A8ftoV23UzNjLxoyaFQpoW