[GH-ISSUE #198] [Issue]: World Maps node placement differs between editor and RP/Game #102

Closed
opened 2026-10-20 17:24:23 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @thetopham on GitHub (Aug 2, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/198

Originally assigned to: @thetopham on GitHub.

Summary

World Maps uses different canvas dimensions and coordinate behavior in the map editor versus the RP/Game map. Locations arranged over a background image in the editor can therefore appear in different positions when the map is viewed during chat.

Changing the browser scale or available interface width also changes the editor canvas aspect ratio and background crop, further shifting the apparent placement.

Affected package

World Maps (hierarchical-maps)

Expected behavior

The editor and RP/Game views should project the background image and location coordinates through the same canonical canvas geometry.

Resizing the browser or interface should scale the complete map uniformly without changing the relationship between locations and landmarks in the background image.

The arrangement canvas may offer manual zoom or scaling controls, but those controls should not alter the saved coordinate projection or aspect ratio.

Actual behavior

The editor's map canvas changes shape based on the available browser/interface width. RP/Game renders the map through a differently sized canvas, so object-cover crops the background differently and saved percentage coordinates no longer line up with the same landmarks.

RP/Game also applies a location safe-area clamp that the editor does not apply, causing an additional placement difference near the edges.

Steps to reproduce

  1. Enable World Maps in a Roleplay or Game chat.
  2. Add a background image to a location whose child presentation is set to Map.
  3. Open the map editor and use Arrange map to position child locations over recognizable landmarks.
  4. Resize the browser/interface or change browser zoom.
  5. Return to the Roleplay/Game map view.
  6. Compare the location markers with their positions in the editor.

Environment

  • Marinara Engine version: Unknown
  • Package version: Unknown
  • Install type: Unknown
  • OS + version: Unknown
  • Browser or app shell: Unknown

Logs, screenshots, or video

No screenshot or video was provided. A recording comparing the editor and RP/Game views at two browser widths would help confirm the exact visible repro.

Additional context

Source inspection of the current staging package found:

  • LocalMapCanvas.tsx uses a fluid-width canvas with min-h-[22rem] and places locations directly at their saved 0–100% coordinates.
  • GameWorldMap.tsx uses fixed h-52 / h-56 canvases and clamps displayed coordinates to 14–86%.
  • Both surfaces render the background with object-cover, so their different aspect ratios produce different crops.

Suggested acceptance criteria:

  • Editor and RP/Game use the same canonical aspect ratio and coordinate transform.
  • Background crop and object-position match across both surfaces.
  • The same location coordinates appear over the same background landmarks.
  • Any safe-area policy is shared by the editor and runtime.
  • Browser resizing or zoom scales the canvas without changing its projection.
  • Manual editor zoom/pan does not modify saved location coordinates.
  • Verify desktop and mobile layouts with wide, square, and portrait source images.

No live browser reproduction was performed during this triage.

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @thetopham on GitHub (Aug 2, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/198 Originally assigned to: @thetopham on GitHub. ## Summary World Maps uses different canvas dimensions and coordinate behavior in the map editor versus the RP/Game map. Locations arranged over a background image in the editor can therefore appear in different positions when the map is viewed during chat. Changing the browser scale or available interface width also changes the editor canvas aspect ratio and background crop, further shifting the apparent placement. ## Affected package World Maps (`hierarchical-maps`) ## Expected behavior The editor and RP/Game views should project the background image and location coordinates through the same canonical canvas geometry. Resizing the browser or interface should scale the complete map uniformly without changing the relationship between locations and landmarks in the background image. The arrangement canvas may offer manual zoom or scaling controls, but those controls should not alter the saved coordinate projection or aspect ratio. ## Actual behavior The editor's map canvas changes shape based on the available browser/interface width. RP/Game renders the map through a differently sized canvas, so `object-cover` crops the background differently and saved percentage coordinates no longer line up with the same landmarks. RP/Game also applies a location safe-area clamp that the editor does not apply, causing an additional placement difference near the edges. ## Steps to reproduce 1. Enable World Maps in a Roleplay or Game chat. 2. Add a background image to a location whose child presentation is set to Map. 3. Open the map editor and use **Arrange map** to position child locations over recognizable landmarks. 4. Resize the browser/interface or change browser zoom. 5. Return to the Roleplay/Game map view. 6. Compare the location markers with their positions in the editor. ## Environment - Marinara Engine version: Unknown - Package version: Unknown - Install type: Unknown - OS + version: Unknown - Browser or app shell: Unknown ## Logs, screenshots, or video No screenshot or video was provided. A recording comparing the editor and RP/Game views at two browser widths would help confirm the exact visible repro. ## Additional context Source inspection of the current `staging` package found: - `LocalMapCanvas.tsx` uses a fluid-width canvas with `min-h-[22rem]` and places locations directly at their saved 0–100% coordinates. - `GameWorldMap.tsx` uses fixed `h-52` / `h-56` canvases and clamps displayed coordinates to 14–86%. - Both surfaces render the background with `object-cover`, so their different aspect ratios produce different crops. Suggested acceptance criteria: - Editor and RP/Game use the same canonical aspect ratio and coordinate transform. - Background crop and `object-position` match across both surfaces. - The same location coordinates appear over the same background landmarks. - Any safe-area policy is shared by the editor and runtime. - Browser resizing or zoom scales the canvas without changing its projection. - Manual editor zoom/pan does not modify saved location coordinates. - Verify desktop and mobile layouts with wide, square, and portrait source images. No live browser reproduction was performed during this triage. ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [x] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-20 17:24:23 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@thetopham commented on GitHub (Aug 2, 2026):

Reopening after manual review of the exact package installed from Agents staging.

Owner: @thetopham

Confirmed reproduction:

  • Marinara Engine 2.4.1+32222f581d61
  • World Maps 1.2.8, installed and ready
  • Arrange map is present after entering a location whose child presentation is Map
  • The selected child-map background returns successfully and decodes at 1184 × 888
  • The installed-package editor canvas renders at only 725 × 3, so the artwork and map appear absent

Root cause: LocalMapCanvas relies on the Tailwind utility aspect-[16/9], but package-owned source is not scanned into the host Engine stylesheet. The feature package injects explicit 16:9 CSS for the runtime canvas only, not [data-marinara-maps-editor-canvas]. Existing artifact coverage checks only the runtime rule.

Repair scope:

  • add explicit packaged 16:9 geometry for the editor canvas;
  • assert that rule exists in the exact artifact;
  • exercise the installed package and prove the editor canvas has measurable 16:9 browser geometry;
  • keep editor and Roleplay/Game projection behavior aligned.

A draft PR will be opened against staging for review.

<!-- gh-comment-id:5160593515 --> @thetopham commented on GitHub (Aug 2, 2026): Reopening after manual review of the exact package installed from Agents `staging`. Owner: @thetopham Confirmed reproduction: - Marinara Engine `2.4.1+32222f581d61` - World Maps `1.2.8`, installed and ready - **Arrange map** is present after entering a location whose child presentation is **Map** - The selected child-map background returns successfully and decodes at `1184 × 888` - The installed-package editor canvas renders at only `725 × 3`, so the artwork and map appear absent Root cause: `LocalMapCanvas` relies on the Tailwind utility `aspect-[16/9]`, but package-owned source is not scanned into the host Engine stylesheet. The feature package injects explicit 16:9 CSS for the runtime canvas only, not `[data-marinara-maps-editor-canvas]`. Existing artifact coverage checks only the runtime rule. Repair scope: - add explicit packaged 16:9 geometry for the editor canvas; - assert that rule exists in the exact artifact; - exercise the installed package and prove the editor canvas has measurable 16:9 browser geometry; - keep editor and Roleplay/Game projection behavior aligned. A draft PR will be opened against `staging` for review.
Author
Owner

@thetopham commented on GitHub (Aug 2, 2026):

completed

<!-- gh-comment-id:5160806850 --> @thetopham commented on GitHub (Aug 2, 2026): completed
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-Agents#102
No description provided.