[PR #811] [MERGED] Add inventory amount controls #4783

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/811
Author: @cha1latte
Created: 5/13/2026
Status: ✅ Merged
Merged: 5/13/2026
Merged by: @cha1latte

Base: main ← Head: feat/issue-794-inventory-amount-controls


📝 Commits (2)

  • 5097f89 Add inventory amount controls
  • c8e979d Add inventory controls UI evidence

📊 Changes

3 files changed (+129 additions, -11 deletions)

View changed files

➕ docs/pr-evidence/issue-794-inventory-amount-controls.png (+0 -0)
📝 packages/client/src/components/game/GameInventory.tsx (+72 -11)
📝 packages/client/src/components/game/GameSurface.tsx (+57 -0)

📄 Description

Linked issue

Closes #794

Why this change

  • Inventory item quantities already supported add/remove behavior internally, but the inventory UI only exposed manual add and remove/delete actions. Users needed direct increment and decrement controls on existing item amounts.

What changed

  • Added compact plus/minus amount controls for the selected inventory item.
  • Wired the plus control through a new inventory increment handler that updates chat metadata and current game-state player inventory.
  • Reused the existing remove-item path for the minus control so decreasing to zero still deletes the item.
  • Added UI evidence for the inventory amount controls.

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

  • Codex ran pnpm check successfully in C:\tmp\Marinara-Engine-issue-794.
  • Codex ran the app locally with the #794 client on http://localhost:5174 and server on http://localhost:7860.
  • Codex seeded a temporary local game chat with Potion x2, opened the Inventory overlay, selected the item, clicked the plus control to increase it to x3, then clicked the minus control to decrease it back to x2.
  • Codex confirmed the server chat metadata returned to [{ "quantity": 2, "name": "Potion" }] after the plus/minus check.
  • Codex captured UI evidence from the real inventory overlay.
  • Codex cleaned up the temporary verification chats afterward.

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)

No docs or release metadata changes needed for this UI control addition.

UI evidence (if applicable)

Inventory amount controls


🔄 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/811 **Author:** [@cha1latte](https://github.com/cha1latte) **Created:** 5/13/2026 **Status:** ✅ Merged **Merged:** 5/13/2026 **Merged by:** [@cha1latte](https://github.com/cha1latte) **Base:** `main` ← **Head:** `feat/issue-794-inventory-amount-controls` --- ### 📝 Commits (2) - [`5097f89`](https://github.com/Pasta-Devs/Marinara-Engine/commit/5097f890c5acb4a233b8e0e0bf879ca869bf0923) Add inventory amount controls - [`c8e979d`](https://github.com/Pasta-Devs/Marinara-Engine/commit/c8e979dd87c5e3941937cadbf02ab1a18f479c42) Add inventory controls UI evidence ### 📊 Changes **3 files changed** (+129 additions, -11 deletions) <details> <summary>View changed files</summary> ➕ `docs/pr-evidence/issue-794-inventory-amount-controls.png` (+0 -0) 📝 `packages/client/src/components/game/GameInventory.tsx` (+72 -11) 📝 `packages/client/src/components/game/GameSurface.tsx` (+57 -0) </details> ### 📄 Description ## Linked issue Closes #794 ## Why this change - Inventory item quantities already supported add/remove behavior internally, but the inventory UI only exposed manual add and remove/delete actions. Users needed direct increment and decrement controls on existing item amounts. ## What changed - Added compact plus/minus amount controls for the selected inventory item. - Wired the plus control through a new inventory increment handler that updates chat metadata and current game-state player inventory. - Reused the existing remove-item path for the minus control so decreasing to zero still deletes the item. - Added UI evidence for the inventory amount controls. ## 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 - Codex ran `pnpm check` successfully in `C:\tmp\Marinara-Engine-issue-794`. - Codex ran the app locally with the #794 client on `http://localhost:5174` and server on `http://localhost:7860`. - Codex seeded a temporary local game chat with `Potion x2`, opened the Inventory overlay, selected the item, clicked the plus control to increase it to `x3`, then clicked the minus control to decrease it back to `x2`. - Codex confirmed the server chat metadata returned to `[{ "quantity": 2, "name": "Potion" }]` after the plus/minus check. - Codex captured UI evidence from the real inventory overlay. - Codex cleaned up the temporary verification chats afterward. ## 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) No docs or release metadata changes needed for this UI control addition. ## UI evidence (if applicable) ![Inventory amount controls](https://raw.githubusercontent.com/cha1latte/Marinara-Engine/c8e979dd87c5e3941937cadbf02ab1a18f479c42/docs/pr-evidence/issue-794-inventory-amount-controls.png) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:10:37 +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#4783
No description provided.