[GH-ISSUE #2141] [Issue]: Game mode — a failed turn shows no inline Retry button (generation-error event never dispatched) #1052

Closed
opened 2026-10-21 05:25:48 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @Romuromylus on GitHub (Jun 4, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2141

Originally assigned to: @cha1latte on GitHub.

Summary

Severity: major. The in-game Retry affordance for a failed turn is dead code: GameSurface listens for marinara:generation-error to set generationFailed and show an inline Retry button, but nothing in the refactor ever dispatches that event. A failed game turn surfaces only a toast, leaving no in-surface way to regenerate.

Expected behavior

As in main: when a generation fails, the runner dispatches marinara:generation-error, GameSurface sets generationFailed=true, and the inline Retry button appears; clicking it regenerates the GM turn from history.

Actual behavior

The listener exists (GameSurface.tsx:4584) but there is no dispatchEvent(new CustomEvent("marinara:generation-error")) anywhere in the refactor src. The failure path only calls showGenerationFailureToast, so generationFailed never becomes true and the inline Retry button (gated on it) never renders.

Steps to reproduce

  1. Start a game session and send a player turn.
  2. Force the GM generation to fail (e.g. invalid connection / network error).
  3. Refactor: only a toast appears; no inline Retry button. Main: the Retry button appears and regenerates the turn.

Impact area

  • Game mode
  • Runtime systems: generation, world-state, visuals, tracker, or haptics

Environment

  • Branch or commit: refactor @ 14894608
  • Run mode: Tauri desktop
  • Compared against: main @ c49f1d95 (legacy web app)

Regression notes

Worked in the legacy web app.

  • main: dispatched at packages/client/src/hooks/use-generate.ts:1600 and :1645; listener GameSurface.tsx:4490.
  • refactor: listener src/features/modes/game/components/GameSurface.tsx:4584; no dispatcher exists (failure path: src/features/runtime/generation/hooks/use-generate.ts:1665-1670, toast only).
Originally created by @Romuromylus on GitHub (Jun 4, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2141 Originally assigned to: @cha1latte on GitHub. ## Summary **Severity: major.** The in-game Retry affordance for a failed turn is dead code: `GameSurface` listens for `marinara:generation-error` to set `generationFailed` and show an inline Retry button, but nothing in the refactor ever dispatches that event. A failed game turn surfaces only a toast, leaving no in-surface way to regenerate. ## Expected behavior As in main: when a generation fails, the runner dispatches `marinara:generation-error`, `GameSurface` sets `generationFailed=true`, and the inline Retry button appears; clicking it regenerates the GM turn from history. ## Actual behavior The listener exists (`GameSurface.tsx:4584`) but there is no `dispatchEvent(new CustomEvent("marinara:generation-error"))` anywhere in the refactor `src`. The failure path only calls `showGenerationFailureToast`, so `generationFailed` never becomes true and the inline Retry button (gated on it) never renders. ## Steps to reproduce 1. Start a game session and send a player turn. 2. Force the GM generation to fail (e.g. invalid connection / network error). 3. Refactor: only a toast appears; no inline Retry button. Main: the Retry button appears and regenerates the turn. ## Impact area - [x] Game mode - [x] Runtime systems: generation, world-state, visuals, tracker, or haptics ## Environment - Branch or commit: `refactor` @ `14894608` - Run mode: Tauri desktop - Compared against: `main` @ `c49f1d95` (legacy web app) ## Regression notes Worked in the legacy web app. - main: dispatched at `packages/client/src/hooks/use-generate.ts:1600` and `:1645`; listener `GameSurface.tsx:4490`. - refactor: listener `src/features/modes/game/components/GameSurface.tsx:4584`; no dispatcher exists (failure path: `src/features/runtime/generation/hooks/use-generate.ts:1665-1670`, toast only).
bsakaguchi 2026-10-21 05:25:48 +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#1052
No description provided.