[GH-ISSUE #484] [Issue]: Setting a destination on the map doesn't move the party — marker stays at the old location #218

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

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

Summary

In Game Mode, clicking a node and confirming Set destination writes the move to the server but the party marker on the map stays at the previous location. The GM narrates the move correctly from the user's *moves to X* message text, but the map state never advances, so subsequent turns build their prompts from the old partyPosition.

Expected behavior

After confirming a destination, /api/game/map/move should persist the new partyPosition. The map widget marker should jump to the chosen node, and the next /generate call should see the new position in chat.metadata.gameMap.partyPosition.

Actual behavior

The marker stays at the previous node. The GM still narrates the player walking to the destination (because the user message contains *moves to <label>*), but the map widget never updates, and the next round of prompt building reads the stale partyPosition again.

Steps to reproduce

  1. Open or resume a Game Mode chat with a node-style map and an active scene.
  2. Click an adjacent (or any reachable) node on the map widget.
  3. Click Set destination, then send any message.
  4. Watch the map widget after the GM responds — the marker stays at the old node.

Environment

  • Marinara Engine version: 1.5.8
  • Install type: self-hosted Docker (EasyPanel)
  • OS + version: server Debian/Linux; client Windows 11
  • Browser or app shell: Chromium-based browser

Logs, screenshots, or video

No client-side errors. The DevTools console shows /api/game/map/move succeeding (200) and /api/generate running normally.

Root cause is server-side in packages/server/src/routes/game.routes.ts: the /map/move handler writes the new partyPosition, then runs buildHydratedGameMeta, which calls syncGameMapMetaPartyPosition(meta, currentLocation) where currentLocation is read from the latest gameStateSnapshot.location — and that snapshot still records the previous location until the next /generate run produces a new one. The sync silently snaps partyPosition back to the old node before persistence.

Additional context

  • Bug shipped together with the /map/move handler in #333; not a recent regression in buildHydratedGameMeta itself.
  • A fix PR is on the way that re-applies the user's chosen position on top of the hydrated meta so the explicit move wins.

Template check

  • I DID NOT read this template and provide the requested details.
Originally created by @Romuromylus on GitHub (May 6, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/484 ## Summary In Game Mode, clicking a node and confirming **Set destination** writes the move to the server but the party marker on the map stays at the previous location. The GM narrates the move correctly from the user's `*moves to X*` message text, but the map state never advances, so subsequent turns build their prompts from the old `partyPosition`. ## Expected behavior After confirming a destination, `/api/game/map/move` should persist the new `partyPosition`. The map widget marker should jump to the chosen node, and the next `/generate` call should see the new position in `chat.metadata.gameMap.partyPosition`. ## Actual behavior The marker stays at the previous node. The GM still narrates the player walking to the destination (because the user message contains `*moves to <label>*`), but the map widget never updates, and the next round of prompt building reads the stale `partyPosition` again. ## Steps to reproduce 1. Open or resume a Game Mode chat with a node-style map and an active scene. 2. Click an adjacent (or any reachable) node on the map widget. 3. Click **Set destination**, then send any message. 4. Watch the map widget after the GM responds — the marker stays at the old node. ## Environment - Marinara Engine version: 1.5.8 - Install type: self-hosted Docker (EasyPanel) - OS + version: server Debian/Linux; client Windows 11 - Browser or app shell: Chromium-based browser ## Logs, screenshots, or video No client-side errors. The DevTools console shows `/api/game/map/move` succeeding (200) and `/api/generate` running normally. Root cause is server-side in `packages/server/src/routes/game.routes.ts`: the `/map/move` handler writes the new `partyPosition`, then runs `buildHydratedGameMeta`, which calls `syncGameMapMetaPartyPosition(meta, currentLocation)` where `currentLocation` is read from the latest `gameStateSnapshot.location` — and that snapshot still records the previous location until the next `/generate` run produces a new one. The sync silently snaps `partyPosition` back to the old node before persistence. ## Additional context - Bug shipped together with the `/map/move` handler in #333; not a recent regression in `buildHydratedGameMeta` itself. - A fix PR is on the way that re-applies the user's chosen position on top of the hydrated meta so the explicit move wins. ## Template check - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-20 17:26:26 +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#218
No description provided.