[GH-ISSUE #664] [Issue]: Custom HUD widget game setup can drop widgets or block Start Game #314

Closed
opened 2026-10-20 17:27:33 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @cha1latte on GitHub (May 11, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/664

Originally assigned to: @Romuromylus on GitHub.

Summary

Starting a game with Custom HUD Widgets enabled can fail in two related ways depending on the generated game setup blueprint: invalid generated blueprints silently drop HUD widgets, while valid generated blueprints can make the Start Game button appear to do nothing because the widget prep modal is not rendered.

Reporter/source: Discord report from jasonwocky, May 10, 2026.

Expected behavior

Game setup with Custom HUD Widgets enabled should reliably proceed into HUD widget preparation/startup. If the generated blueprint does not satisfy the schema, the app should either recover, constrain generation enough to avoid invalid blueprints, or expose the invalid JSON plus parsed.error.issues so the user can fix it manually.

Actual behavior

Two related failure modes were reported:

  1. The game setup response sometimes produces blueprints that do not satisfy blueprintSchema.safeParse() in game.routes.ts. When parsing fails, the Start Game button still works, but no HUD widgets appear and the rest of the blueprint does not seem to continue through the flow.
  2. When the game setup response does satisfy the blueprint schema, the Start Game button does not work. The reporter traced this to handleStartNewSession in GameSurface.tsx, where it calls setPrepareWidgetsOpen and returns, apparently intending to open GameWidgetSessionPrepModal. The modal is not present because the render conditional around line 7131, sessionStatus === "ready" && !introPresented, evaluates true and takes the render path without the modal.

Reported schema failures include array length constraints not being followed for pressureClocks, factions, questSeeds, and encounterPrinciples, plus max constraints such as a pressure clock step count higher than 12. The reporter noted that gm-prompts.ts says "Prefer" 0-1 pressure clock, 0-2 factions, 0-3 quest seeds, and 0-2 encounter principles, but the prompt language may be too soft and the pressure clock max of 12 may not be specified to the model.

Steps to reproduce

  1. Run Marinara Engine from latest main at commit dcb2f64d4f1a5bdc73ef863f70f9857488325bb8.
  2. Start setting up a game with Custom HUD Widgets enabled.
  3. Generate game setup responses until one of the following occurs:
    • The generated blueprint violates the blueprint schema, such as too many pressureClocks, factions, questSeeds, or encounterPrinciples, or a pressure clock step count above 12.
    • The generated blueprint satisfies the schema.
  4. For the invalid blueprint case, click Start Game and observe that no HUD widgets appear.
  5. For the valid blueprint case, click Start Game and observe that the widget prep modal does not open / Start Game does not proceed.

Marinara Engine version

Latest main, commit dcb2f64d4f1a5bdc73ef863f70f9857488325bb8.

Install type

Source. Reporter originally installed with the default Windows method, then updated by pulling latest code with Git.

OS + version

Windows 11.

Browser or app shell

Chrome.

Screenshots or video

Not provided. The report came from Discord text with code-path details, not uploadable screenshot/video evidence.

Logs

Not provided.

Reporter inspected parsed.error.issues from blueprintSchema.safeParse() and observed failures involving array length constraints and max constraints, including a pressure clock step count higher than 12.

Additional context

The reporter suggested either strengthening setup prompts so generated JSON adheres to the blueprint constraints, or presenting the bad JSON plus parsed.error.issues so users can manually correct the generation.

Relevant code paths mentioned in the report:

  • game.routes.ts, around line 2866: blueprintSchema.safeParse()
  • gm-prompts.ts: setup prompt constraint wording
  • GameSurface.tsx, handleStartNewSession
  • GameSurface.tsx, around line 7131: sessionStatus === "ready" && !introPresented
  • GameWidgetSessionPrepModal

Template check

  • I provided the required summary, behavior, reproduction, and environment details.
  • If this is a visual/UI bug, blank screen, layout issue, mobile/responsive issue, incorrect image or sprite, broken animation, or unexpected error state, I attached screenshots or video.
Originally created by @cha1latte on GitHub (May 11, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/664 Originally assigned to: @Romuromylus on GitHub. ### Summary Starting a game with Custom HUD Widgets enabled can fail in two related ways depending on the generated game setup blueprint: invalid generated blueprints silently drop HUD widgets, while valid generated blueprints can make the Start Game button appear to do nothing because the widget prep modal is not rendered. Reporter/source: Discord report from `jasonwocky`, May 10, 2026. ### Expected behavior Game setup with Custom HUD Widgets enabled should reliably proceed into HUD widget preparation/startup. If the generated blueprint does not satisfy the schema, the app should either recover, constrain generation enough to avoid invalid blueprints, or expose the invalid JSON plus `parsed.error.issues` so the user can fix it manually. ### Actual behavior Two related failure modes were reported: 1. The game setup response sometimes produces blueprints that do not satisfy `blueprintSchema.safeParse()` in `game.routes.ts`. When parsing fails, the Start Game button still works, but no HUD widgets appear and the rest of the blueprint does not seem to continue through the flow. 2. When the game setup response does satisfy the blueprint schema, the Start Game button does not work. The reporter traced this to `handleStartNewSession` in `GameSurface.tsx`, where it calls `setPrepareWidgetsOpen` and returns, apparently intending to open `GameWidgetSessionPrepModal`. The modal is not present because the render conditional around line 7131, `sessionStatus === "ready" && !introPresented`, evaluates true and takes the render path without the modal. Reported schema failures include array length constraints not being followed for `pressureClocks`, `factions`, `questSeeds`, and `encounterPrinciples`, plus max constraints such as a pressure clock step count higher than 12. The reporter noted that `gm-prompts.ts` says "Prefer" 0-1 pressure clock, 0-2 factions, 0-3 quest seeds, and 0-2 encounter principles, but the prompt language may be too soft and the pressure clock max of 12 may not be specified to the model. ### Steps to reproduce 1. Run Marinara Engine from latest `main` at commit `dcb2f64d4f1a5bdc73ef863f70f9857488325bb8`. 2. Start setting up a game with Custom HUD Widgets enabled. 3. Generate game setup responses until one of the following occurs: - The generated blueprint violates the blueprint schema, such as too many `pressureClocks`, `factions`, `questSeeds`, or `encounterPrinciples`, or a pressure clock step count above 12. - The generated blueprint satisfies the schema. 4. For the invalid blueprint case, click Start Game and observe that no HUD widgets appear. 5. For the valid blueprint case, click Start Game and observe that the widget prep modal does not open / Start Game does not proceed. ### Marinara Engine version Latest `main`, commit `dcb2f64d4f1a5bdc73ef863f70f9857488325bb8`. ### Install type Source. Reporter originally installed with the default Windows method, then updated by pulling latest code with Git. ### OS + version Windows 11. ### Browser or app shell Chrome. ### Screenshots or video Not provided. The report came from Discord text with code-path details, not uploadable screenshot/video evidence. ### Logs Not provided. Reporter inspected `parsed.error.issues` from `blueprintSchema.safeParse()` and observed failures involving array length constraints and max constraints, including a pressure clock step count higher than 12. ### Additional context The reporter suggested either strengthening setup prompts so generated JSON adheres to the blueprint constraints, or presenting the bad JSON plus `parsed.error.issues` so users can manually correct the generation. Relevant code paths mentioned in the report: - `game.routes.ts`, around line 2866: `blueprintSchema.safeParse()` - `gm-prompts.ts`: setup prompt constraint wording - `GameSurface.tsx`, `handleStartNewSession` - `GameSurface.tsx`, around line 7131: `sessionStatus === "ready" && !introPresented` - `GameWidgetSessionPrepModal` ### Template check - [ ] I provided the required summary, behavior, reproduction, and environment details. - [ ] If this is a visual/UI bug, blank screen, layout issue, mobile/responsive issue, incorrect image or sprite, broken animation, or unexpected error state, I attached screenshots or video.
bsakaguchi 2026-10-20 17:27:33 +07:00
  • closed this issue
  • added the
    bug
    label
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#314
No description provided.