Skip to content

Improve game round decision UI#34

Open
Spbd1 wants to merge 1 commit into
codex/conduct-final-production-readiness-reviewfrom
codex/improve-game-stage-ui/ux
Open

Improve game round decision UI#34
Spbd1 wants to merge 1 commit into
codex/conduct-final-production-readiness-reviewfrom
codex/improve-game-stage-ui/ux

Conversation

@Spbd1

@Spbd1 Spbd1 commented May 11, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Make each round more visual and slower-paced so participants understand tradeoffs before choosing, while preserving existing game calculations and data compatibility.
  • Surface financial and health consequences clearly and memorably using playful, neutral visual metaphors (emoji, gradients, cards) and accessible status indicators.
  • Provide an explicit post-choice feedback step to prevent rushed clicks and avoid double-saving while keeping decision-time measured at first selection.

Description

  • Reworked the round UI in components/HiddenCostGame.tsx to add a large illustrated event card (EventPanel) with emoji metaphors, income and skipping-risk badges, and a friendly layout.
  • Replaced compact status cards with accessible status bars and a progress indicator (StatusBar, ProgressStatus) that include text labels and exact point values in addition to visual bars.
  • Turned each treatment into a visual choice card showing option name, icon, short description, cost, round income, and an "After this choice" preview that uses the existing helpers (getTreatmentCost, getPaidCost, getHealthAfterChoice, ROUND_INCOME_POINTS) for consistent calculations.
  • Added a pending round result flow that saves the round immediately, shows a ResultPanel summarizing the choice and the scoreBefore → scoreAfter and healthBefore → healthAfter changes, disables other choice buttons while pending, and advances only when the participant clicks the continue button; decision time is still recorded at first click and the saved GameRoundData shape is unchanged.

Testing

  • Ran npm run typecheck and there were no TypeScript errors.
  • Ran npm run lint and there were no ESLint warnings or errors.
  • Ran npm run build (Next.js production build) and the app compiled and prerendered successfully.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant