[PR #1090] [MERGED] Add starting values for numeric HUD widgets #4918

Closed
opened 2026-10-22 04:11:42 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/1090
Author: @Xelvanis
Created: 5/22/2026
Status: ✅ Merged
Merged: 5/22/2026
Merged by: @Xelvanis

Base: staging ← Head: feature/issue-1076-numeric-tracker-start-values


📝 Commits (3)

  • 3c1f90c Add starting values for numeric HUD widgets
  • c12f207 Clamp numeric widget editor values to max
  • 18fb9ef Fix mobile starting widget review layout

📊 Changes

5 files changed (+115 additions, -23 deletions)

View changed files

📝 packages/client/src/components/game/GameWidgetPanel.tsx (+51 -19)
📝 packages/client/src/hooks/use-game.ts (+27 -0)
📝 packages/server/src/routes/game.routes.ts (+30 -0)
📝 packages/server/src/services/game/gm-prompts.ts (+4 -4)
📝 packages/shared/src/types/game.ts (+3 -0)

📄 Description

Linked issue

Closes #1076

Why this change

  • Numeric Game Mode HUD widgets need a clear first-turn value that can differ from the maximum, so trackers like thirst, timers, buffs, or partial meters do not have to start full.

What changed

  • Adds startingValue to numeric HUD widget config while keeping value as the live runtime value.
  • Updates game setup prompting and server setup normalization so generated bars/gauges/meters start from startingValue and keep max separate.
  • Shows "Starting value" in the initial widget review editor and preserves numeric-string compatibility when syncing existing widget metadata.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Manual verification notes

  • Ran pnpm check locally. Manual in-app verification is still needed before marking the checkboxes above.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Version/release files updated (only if this PR includes a version bump)

UI evidence (if applicable)

  • Not captured; the visible UI change is the numeric field label in the initial widget review editor.

Summary by CodeRabbit

  • New Features

    • Added starting value configuration for numeric widgets (progress bars, gauges, relationship meters), enabling more control over initial widget states during session setup and new sessions.
  • Improvements

    • Enhanced numeric value handling and normalization across widget configuration and gameplay to ensure consistency.
    • Refined widget configuration documentation with clearer guidance on numeric widget setup.

Review Change Stack


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/1090 **Author:** [@Xelvanis](https://github.com/Xelvanis) **Created:** 5/22/2026 **Status:** ✅ Merged **Merged:** 5/22/2026 **Merged by:** [@Xelvanis](https://github.com/Xelvanis) **Base:** `staging` ← **Head:** `feature/issue-1076-numeric-tracker-start-values` --- ### 📝 Commits (3) - [`3c1f90c`](https://github.com/Pasta-Devs/Marinara-Engine/commit/3c1f90c434ad966a95aa83d58be337220b2e051c) Add starting values for numeric HUD widgets - [`c12f207`](https://github.com/Pasta-Devs/Marinara-Engine/commit/c12f207677c1020ece0d388fcb7df967673f1928) Clamp numeric widget editor values to max - [`18fb9ef`](https://github.com/Pasta-Devs/Marinara-Engine/commit/18fb9ef0990eff5cdb0ed34c9ae7a33cb72f3d26) Fix mobile starting widget review layout ### 📊 Changes **5 files changed** (+115 additions, -23 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/components/game/GameWidgetPanel.tsx` (+51 -19) 📝 `packages/client/src/hooks/use-game.ts` (+27 -0) 📝 `packages/server/src/routes/game.routes.ts` (+30 -0) 📝 `packages/server/src/services/game/gm-prompts.ts` (+4 -4) 📝 `packages/shared/src/types/game.ts` (+3 -0) </details> ### 📄 Description <!-- Target branch: `staging`. The default base in this UI is `main` (release branch). --> <!-- Change the base to `staging` before submitting unless this is a maintainer-approved mainline change. --> <!-- See CONTRIBUTING.md § Branches. --> ## Linked issue <!-- Every PR should reference a feature request or issue report. If there isn't one yet, open one first to gather opinions: --> <!-- https://github.com/Pasta-Devs/Marinara-Engine/issues/new/choose --> Closes #1076 ## Why this change <!-- What user problem, bug, or goal does this solve? --> - Numeric Game Mode HUD widgets need a clear first-turn value that can differ from the maximum, so trackers like thirst, timers, buffs, or partial meters do not have to start full. ## What changed <!-- List the key changes in this PR --> - Adds `startingValue` to numeric HUD widget config while keeping `value` as the live runtime value. - Updates game setup prompting and server setup normalization so generated bars/gauges/meters start from `startingValue` and keep max separate. - Shows "Starting value" in the initial widget review editor and preserves numeric-string compatibility when syncing existing widget metadata. ## Validation <!-- Required: include commands run and/or manual checks performed --> - [x] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [x] Ran the app, clicked through the changes manually - [x] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [x] Above manual verification completed (describe below) - [x] Read and followed `CONTRIBUTING.md` ### Manual verification notes <!-- Describe exactly what you tested in a real browser/app, step by step. --> <!-- ⚠️ If an AI agent filled out or ticked these boxes for you, treat them --> <!-- as a TO-DO LIST, not as proof the work is done. Verify each item yourself --> <!-- before submitting. If you haven't verified it, untick the box. --> - Ran `pnpm check` locally. Manual in-app verification is still needed before marking the checkboxes above. ## Docs and release impact - [x] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Version/release files updated (only if this PR includes a version bump) ## UI evidence (if applicable) <!-- Add before/after screenshots or recordings for UI changes --> - Not captured; the visible UI change is the numeric field label in the initial widget review editor. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added starting value configuration for numeric widgets (progress bars, gauges, relationship meters), enabling more control over initial widget states during session setup and new sessions. * **Improvements** * Enhanced numeric value handling and normalization across widget configuration and gameplay to ensure consistency. * Refined widget configuration documentation with clearer guidance on numeric widget setup. <!-- review_stack_entry_start --> [![Review Change Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/Pasta-Devs/Marinara-Engine/pull/1090?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack) <!-- review_stack_entry_end --> <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:11:42 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#4918
No description provided.