[PR #1631] [MERGED] Triage GameSurface hook dependency warnings #5163

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

📋 Pull Request Information

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

Base: refactor ← Head: chore/eslint-gamesurface-hooks-2026-05-30


📝 Commits (2)

  • d539f3b Triage GameSurface hook dependency warnings
  • b5af3be Use metadata patch helper in GameSurface persistence

📊 Changes

1 file changed (+19 additions, -48 deletions)

View changed files

📝 src/features/modes/game/components/GameSurface.tsx (+19 -48)

📄 Description

Linked issue

Part of #1619

Why this change

  • Clears the remaining react-hooks/exhaustive-deps warnings in GameSurface, the broad game-mode pressure point intentionally left out of PR #1630.

What changed

  • Routes GameSurface metadata persistence through storageApi.patchChatMetadata so delayed callbacks patch the latest stored metadata instead of carrying a render-time fallback object.
  • Updates inventory, Spotify scene track, scene asset, combat snapshot, narration progress, and segment edit/delete persistence paths to use that focused helper.
  • Removes the redundant generateMap.isPending dependency where the mutation object is already tracked.

Refactor impact

Primary owner:

Game mode UI / GameSurface hook hygiene

Impact areas reviewed:

  • Game inventory persistence and journal side effects
  • Spotify scene music persistence
  • Scene asset background/music/ambient persistence
  • Combat snapshot restore/persist cleanup paths
  • Narration segment progress persistence
  • Game segment edit/delete metadata writes
  • Map generation callback dependencies

Boundary notes:

  • No engine, Rust, Tauri command, or remote runtime behavior changed.
  • Uses the existing focused shared storage API wrapper instead of a local metadata merge fallback.
  • Game mode remains the only concrete mode touched; shared mode UI and sibling chat/roleplay owners are not modified.

Pressure points touched:

  • GameSurface only. This PR keeps the change localized to the known broad game UI orchestrator and does not extract or move behavior.

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

  • Failure-path review checked persisted metadata, chat switch/unmount cleanup, delayed timers, segment edit/delete writes, map-generation dependencies, and mode boundaries.
  • Bunny review found the metadata fallback ref could be cleaner and safer as a direct stored-metadata patch; fixed in follow-up commit b5af3be5.
  • pnpm lint:eslint:full-report -- --output .eslint-reports/eslint-full-report-before-gamesurface-hooks.json before the change: 0 errors, 25 warnings across 10 files.
  • pnpm lint:eslint:full-report -- --output .eslint-reports/eslint-full-report-after-gamesurface-hooks-bunny.json after the Bunny fix: 0 errors, 15 warnings across 9 files; GameSurface has 0 remaining warnings. The 15 remaining warnings are the non-GameSurface slice already covered by PR #1630.
  • pnpm lint
  • pnpm typecheck
  • pnpm check:architecture
  • pnpm check:docs
  • pnpm check:unused
  • pnpm build passed; Vite emitted the existing large-chunk warning.
  • pnpm test passed: 80 files, 496 tests.
  • git diff --check passed with the existing CRLF warning for the touched file.

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

No changelog update: this is internal hook-lint cleanup, and this branch does not currently have a CHANGELOG.md file.

UI evidence

N/A; no visible UI changes and no manual app QA was run.

Summary by CodeRabbit

  • Refactor
    • Streamlined the game metadata persistence system to improve reliability when saving inventory changes, music history, combat snapshots, and narration progress.

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/1631 **Author:** [@Xelvanis](https://github.com/Xelvanis) **Created:** 5/30/2026 **Status:** ✅ Merged **Merged:** 5/30/2026 **Merged by:** [@Xelvanis](https://github.com/Xelvanis) **Base:** `refactor` ← **Head:** `chore/eslint-gamesurface-hooks-2026-05-30` --- ### 📝 Commits (2) - [`d539f3b`](https://github.com/Pasta-Devs/Marinara-Engine/commit/d539f3b2a34794a99ec3eb1dbe9ac39eee0b57be) Triage GameSurface hook dependency warnings - [`b5af3be`](https://github.com/Pasta-Devs/Marinara-Engine/commit/b5af3be5528f876229b773e992c498de82b10e71) Use metadata patch helper in GameSurface persistence ### 📊 Changes **1 file changed** (+19 additions, -48 deletions) <details> <summary>View changed files</summary> 📝 `src/features/modes/game/components/GameSurface.tsx` (+19 -48) </details> ### 📄 Description ## Linked issue Part of #1619 ## Why this change - Clears the remaining `react-hooks/exhaustive-deps` warnings in `GameSurface`, the broad game-mode pressure point intentionally left out of PR #1630. ## What changed - Routes GameSurface metadata persistence through `storageApi.patchChatMetadata` so delayed callbacks patch the latest stored metadata instead of carrying a render-time fallback object. - Updates inventory, Spotify scene track, scene asset, combat snapshot, narration progress, and segment edit/delete persistence paths to use that focused helper. - Removes the redundant `generateMap.isPending` dependency where the mutation object is already tracked. ## Refactor impact Primary owner: Game mode UI / `GameSurface` hook hygiene Impact areas reviewed: - Game inventory persistence and journal side effects - Spotify scene music persistence - Scene asset background/music/ambient persistence - Combat snapshot restore/persist cleanup paths - Narration segment progress persistence - Game segment edit/delete metadata writes - Map generation callback dependencies Boundary notes: - No engine, Rust, Tauri command, or remote runtime behavior changed. - Uses the existing focused shared storage API wrapper instead of a local metadata merge fallback. - Game mode remains the only concrete mode touched; shared mode UI and sibling chat/roleplay owners are not modified. Pressure points touched: - `GameSurface` only. This PR keeps the change localized to the known broad game UI orchestrator and does not extract or move behavior. ## Validation - [x] `pnpm check` passes locally - [x] `pnpm typecheck` passes locally - [x] `pnpm build` passes locally - [x] `pnpm check:architecture` passes locally - [x] `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 - Failure-path review checked persisted metadata, chat switch/unmount cleanup, delayed timers, segment edit/delete writes, map-generation dependencies, and mode boundaries. - Bunny review found the metadata fallback ref could be cleaner and safer as a direct stored-metadata patch; fixed in follow-up commit `b5af3be5`. - `pnpm lint:eslint:full-report -- --output .eslint-reports/eslint-full-report-before-gamesurface-hooks.json` before the change: 0 errors, 25 warnings across 10 files. - `pnpm lint:eslint:full-report -- --output .eslint-reports/eslint-full-report-after-gamesurface-hooks-bunny.json` after the Bunny fix: 0 errors, 15 warnings across 9 files; `GameSurface` has 0 remaining warnings. The 15 remaining warnings are the non-GameSurface slice already covered by PR #1630. - `pnpm lint` - `pnpm typecheck` - `pnpm check:architecture` - `pnpm check:docs` - `pnpm check:unused` - `pnpm build` passed; Vite emitted the existing large-chunk warning. - `pnpm test` passed: 80 files, 496 tests. - `git diff --check` passed with the existing CRLF warning for the touched file. ## Docs and release impact - [x] No docs changes needed - [ ] Updated `README.md` - [ ] Updated `CONTRIBUTING.md` - [ ] Updated `docs/developer/` - [ ] Updated repo skills or `AGENTS.md` - [x] Confirmed this PR does not restore old staging/package-workspace/release claims No changelog update: this is internal hook-lint cleanup, and this branch does not currently have a `CHANGELOG.md` file. ## UI evidence N/A; no visible UI changes and no manual app QA was run. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Refactor** * Streamlined the game metadata persistence system to improve reliability when saving inventory changes, music history, combat snapshots, and narration progress. <!-- 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/1631?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:13:51 +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#5163
No description provided.