mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #3565] [MERGED] Add hierarchical maps and spatial context #5995
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#5995
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/3565
Author: @thetopham
Created: 7/13/2026
Status: ✅ Merged
Merged: 7/14/2026
Merged by: @SpicyMarinara
Base:
staging← Head:hierarchical-locations📝 Commits (10+)
6bbc811docs: propose hierarchical spatial contexteb6b7e7docs: add spatial context PRD v34fd752eMerge branch 'staging' into hierarchical-locationsfefcd98docs: detail spatial context implementation plan173d1f0docs: refine hierarchical map implementation plan142bea9feat: add hierarchical spatial core540584ffeat: persist hierarchical spatial context6f5d9bffeat: add hierarchical spatial historyca7aa1cMerge branch 'staging' into hierarchical-locationsb076293feat: project hierarchical spatial context📊 Changes
76 files changed (+12605 additions, -192 deletions)
View changed files
➕
docs/development/hierarchical-locations-prd-v3.md(+1159 -0)📝
e2e/core-flows.e2e.ts(+113 -0)➕
e2e/spatial-context.e2e.ts(+885 -0)📝
package.json(+2 -1)📝
packages/client/src/components/chat/ChatInput.tsx(+30 -8)📝
packages/client/src/components/chat/ChatRoleplayPanels.tsx(+60 -6)📝
packages/client/src/components/chat/ChatRoleplaySurface.tsx(+18 -1)📝
packages/client/src/components/chat/ChatSettingsDrawer.tsx(+13 -0)📝
packages/client/src/components/chat/HomeCreditsModal.tsx(+7 -6)📝
packages/client/src/components/game/GameInput.tsx(+47 -10)📝
packages/client/src/components/game/GameMap.tsx(+136 -20)📝
packages/client/src/components/game/GameSetupWizard.tsx(+171 -9)📝
packages/client/src/components/game/GameSurface.tsx(+180 -34)➕
packages/client/src/components/game/GameWorldMap.tsx(+400 -0)📝
packages/client/src/components/layout/AppShell.tsx(+18 -4)📝
packages/client/src/components/lorebooks/LorebookEditor.tsx(+24 -0)📝
packages/client/src/components/lorebooks/LorebookEntryRow.tsx(+19 -0)➕
packages/client/src/features/spatial-context/SpatialContextSettingsSection.tsx(+84 -0)➕
packages/client/src/features/spatial-context/SpatialMapWorkspace.tsx(+963 -0)➕
packages/client/src/features/spatial-context/components/GameMapBindingsPanel.tsx(+205 -0)...and 56 more files
📄 Description
Linked issue
Closes #3564
Why this change
Roleplay and Game models need stable spatial orientation without injecting an entire world map into every prompt. Creators also need a shared way to define nested regions, buildings, floors, rooms, and local maps while preserving the existing Game grid and node-map systems.
This change introduces a hierarchical spatial-state foundation: persistent current location selects bounded context, and all movement is validated against stable location IDs. It intentionally does not introduce a generic scenario engine, Visual Novel mode support, or a separate action-inference LLM.
What changed
Draft a Hierarchical World Mapchoice and size control to Game setup. Drafting runs only after/game/setuppersists the generated world, keeps setup visibly busy, then hands the result to the normal preview/editor. Skip persists nothing; Apply changes only the working copy; Enable + Save remain explicit before the map can affect turns. A failed draft preserves the created game and points creators back to Chat Settings.castle,busy port, orbeer mugnow resolve to deterministic emoji fallbacks instead of rendering as icon text.lorebookEntryIds, inline attachment controls, lorebook backlinks, missing/excluded-reference warnings, exact-current-location forced activation across Roleplay, Game GM, dry run, and live Peek Prompt, plus deduplication, caps, truncation reporting, Active Context sources, and portability.Automated validation evidence
pnpm exec playwright test e2e/spatial-context.e2e.ts— 13 passed across desktop and mobile; 1 desktop-only binding case intentionally skipped on mobile.pnpm regression— every deterministic regression lane passed; Playwright UI smoke finished with 52 passed and 26 intentional viewport/project skips.pnpm check— Impeccable context guard, workspace TypeScript/ESLint, server/shared builds, client production build, and PWA generation passed.pnpm version:check— all version-bearing files are synchronized at 2.2.2.pnpm credits:check— generated Credits modal is current with 51 contributors.git diff --check— passed before commit.The focused mobile smoke proves the custom music widget remains mounted but hidden inside the map editor, the AI expansion action stays visible, and the widget returns after leaving the editor.
The local runtime used Node 22 and emitted the repository engine warning because the project requests Node 24-26; all commands completed successfully.
Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
Draft a Hierarchical World Mapin Features, choose each size, and verify the map preview appears only after world setup completes.Docs and release impact
UI evidence (if applicable)
Packages E through F.2 include responsive authoring, AI drafting and history-safe expansion, setup-wizard handoff, runtime movement, Game map bindings, location-lore attachments, lore-grounded provenance, and the mobile player collision fix. Screenshots or recordings should be added after manual browser verification.
Summary by CodeRabbit
New Features
Tests
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.