[PR #1677] [MERGED] Fix game item-use feedback #5205

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

📋 Pull Request Information

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

Base: refactor ← Head: fix/issue-1594-item-use-feedback


📝 Commits (2)

  • 9ae7887 Fix game item use feedback
  • 9f4e261 Merge upstream refactor into item use feedback fix

📊 Changes

2 files changed (+255 additions, -53 deletions)

View changed files

📝 src/features/modes/game/components/GameInventory.tsx (+16 -7)
📝 src/features/modes/game/components/GameSurface.tsx (+239 -46)

📄 Description

Linked issue

Closes #1594

Why this change

  • Non-combat inventory item Use previously closed the inventory and sent a transient player turn, but it did not give durable feedback that the item action was queued or clarify whether the item stayed in inventory when the GM did not emit an inventory remove tag.

What changed

  • Added a dedicated non-combat inventory Use handler in GameSurface.
  • Routed item-use turns through the normal game turn path instead of calling sendMessage inline.
  • Added pending item-use state and typed inventory notifications for queued, kept, consumed, gain, loss, and error feedback.
  • Kept non-combat inventory consumption driven by GM inventory tags such as [inventory: action="remove" item="Test"].
  • Left combat item-use behavior unchanged, aside from rendering its notification through the typed notification path.

Refactor impact

Primary owner:

  • game mode

Impact areas reviewed:

  • GameInventory Use button async/pending behavior
  • GameSurface non-combat turn submission
  • GM inventory tag application
  • Combat inventory item use
  • Inventory notification rendering

Boundary notes:

  • Feature-lane change only. No src/engine, src/shared/api, src-tauri, schema, dependency, storage, or prompt changes.
  • Actual non-combat item consumption remains owned by GM inventory tags; this PR does not consume items immediately on click.

Pressure points touched:

  • GameSurface

Validation

  • pnpm check passes locally
  • pnpm typecheck passes locally
  • pnpm build passes locally
  • pnpm check:architecture passes locally
  • pnpm check:docs passes locally
  • cargo check --manifest-path src-tauri/Cargo.toml --workspace passes locally
  • Rust clippy/tests were run for Rust behavior changes
  • Browser or Tauri app manual verification completed
  • Playwright, screenshot, or recording evidence added for UI changes
  • Remote runtime smoke checked when relevant

Manual verification notes

  • Codex ran git diff --check.
  • Codex ran pnpm typecheck.
  • Codex ran pnpm build; build passed with the existing Vite large chunk warning.
  • Codex ran pnpm check, including line endings, architecture, frontend typecheck, Rust check, and docs check.
  • Codex ran the local proof gate with scratch/bugfix-verification.json.
  • Codex used a Playwright browser harness against the real GameInventory component to verify pending, kept, and consumed item-use feedback states.
  • Codex app-smoked the web shell, but real game-chat item-use e2e was blocked locally because creating a game chat in web-shell mode requires Remote Runtime configuration.
  • Human follow-up: verify the same item-use path in a configured Remote Runtime or Tauri game session with a real GM response.

Docs and release impact

  • No docs changes needed
  • Updated README.md
  • Updated CONTRIBUTING.md
  • Updated docs/developer/
  • Updated repo skills or AGENTS.md
  • Confirmed this PR does not restore old staging/package-workspace/release claims

UI evidence

  • Local Playwright evidence was captured under scratch/issue-1594-inventory-harness-after.png; it is not embedded here because it is a local scratch artifact.
  • Real app e2e screenshot evidence still needs a configured Remote Runtime or Tauri session.

🔄 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/1677 **Author:** [@cha1latte](https://github.com/cha1latte) **Created:** 5/30/2026 **Status:** ✅ Merged **Merged:** 5/30/2026 **Merged by:** [@cha1latte](https://github.com/cha1latte) **Base:** `refactor` ← **Head:** `fix/issue-1594-item-use-feedback` --- ### 📝 Commits (2) - [`9ae7887`](https://github.com/Pasta-Devs/Marinara-Engine/commit/9ae7887bbf8521b0817bff14dbd030f38dd6ebcb) Fix game item use feedback - [`9f4e261`](https://github.com/Pasta-Devs/Marinara-Engine/commit/9f4e26194462578eb55f1da55d6062448dab6a73) Merge upstream refactor into item use feedback fix ### 📊 Changes **2 files changed** (+255 additions, -53 deletions) <details> <summary>View changed files</summary> 📝 `src/features/modes/game/components/GameInventory.tsx` (+16 -7) 📝 `src/features/modes/game/components/GameSurface.tsx` (+239 -46) </details> ### 📄 Description <!-- Target branch: `refactor`. Change the base to `refactor` before submitting unless a maintainer explicitly asked for another base. --> <!-- Keep all checkboxes unchecked until a human has actually verified them. --> ## Linked issue Closes #1594 ## Why this change - Non-combat inventory item Use previously closed the inventory and sent a transient player turn, but it did not give durable feedback that the item action was queued or clarify whether the item stayed in inventory when the GM did not emit an inventory remove tag. ## What changed - Added a dedicated non-combat inventory Use handler in `GameSurface`. - Routed item-use turns through the normal game turn path instead of calling `sendMessage` inline. - Added pending item-use state and typed inventory notifications for queued, kept, consumed, gain, loss, and error feedback. - Kept non-combat inventory consumption driven by GM inventory tags such as `[inventory: action="remove" item="Test"]`. - Left combat item-use behavior unchanged, aside from rendering its notification through the typed notification path. ## Refactor impact Primary owner: - game mode Impact areas reviewed: - `GameInventory` Use button async/pending behavior - `GameSurface` non-combat turn submission - GM inventory tag application - Combat inventory item use - Inventory notification rendering Boundary notes: - Feature-lane change only. No `src/engine`, `src/shared/api`, `src-tauri`, schema, dependency, storage, or prompt changes. - Actual non-combat item consumption remains owned by GM inventory tags; this PR does not consume items immediately on click. Pressure points touched: - `GameSurface` ## Validation - [ ] `pnpm check` passes locally - [ ] `pnpm typecheck` passes locally - [ ] `pnpm build` passes locally - [ ] `pnpm check:architecture` passes locally - [ ] `pnpm check:docs` passes locally - [ ] `cargo check --manifest-path src-tauri/Cargo.toml --workspace` passes locally - [ ] Rust clippy/tests were run for Rust behavior changes - [ ] Browser or Tauri app manual verification completed - [ ] Playwright, screenshot, or recording evidence added for UI changes - [ ] Remote runtime smoke checked when relevant ### Manual verification notes - Codex ran `git diff --check`. - Codex ran `pnpm typecheck`. - Codex ran `pnpm build`; build passed with the existing Vite large chunk warning. - Codex ran `pnpm check`, including line endings, architecture, frontend typecheck, Rust check, and docs check. - Codex ran the local proof gate with `scratch/bugfix-verification.json`. - Codex used a Playwright browser harness against the real `GameInventory` component to verify pending, kept, and consumed item-use feedback states. - Codex app-smoked the web shell, but real game-chat item-use e2e was blocked locally because creating a game chat in web-shell mode requires Remote Runtime configuration. - Human follow-up: verify the same item-use path in a configured Remote Runtime or Tauri game session with a real GM response. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated `README.md` - [ ] Updated `CONTRIBUTING.md` - [ ] Updated `docs/developer/` - [ ] Updated repo skills or `AGENTS.md` - [ ] Confirmed this PR does not restore old staging/package-workspace/release claims ## UI evidence - Local Playwright evidence was captured under `scratch/issue-1594-inventory-harness-after.png`; it is not embedded here because it is a local scratch artifact. - Real app e2e screenshot evidence still needs a configured Remote Runtime or Tauri session. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:14:12 +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#5205
No description provided.