[PR #4179] [MERGED] fix(maps): keep chat map state out of settings profiles #6270

Closed
opened 2026-10-23 04:08:47 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/4179
Author: @thetopham
Created: 7/27/2026
Status: ✅ Merged
Merged: 7/27/2026
Merged by: @SpicyMarinara

Base: staging ← Head: fix/4176-chat-profile-map-state


📝 Commits (2)

  • 4f457c0 fix(maps): keep chat map state out of profiles
  • b0a2588 Merge branch 'staging' into fix/4176-chat-profile-map-state

📊 Changes

2 files changed (+73 additions, -1 deletions)

View changed files

📝 e2e/core-flows.e2e.ts (+68 -0)
📝 packages/shared/src/types/chat-preset.ts (+5 -1)

📄 Description

Linked issue

Part of #4176

Why this change

  • Hierarchical Maps stores each chat's map in metadata, but Roleplay Settings Profiles were allowed to capture that map state. A saved/starred profile from the Falmart chat therefore copied the whole map into every new RP that used the profile, even though the linked lorebook was character-scoped and not global.
  • Sanitizing profiles on read also prevents map state already stored by affected releases from being applied after users update.

What changed

  • Exclude spatialContext, spatialContextHierarchyProfile, and spatialMapGenerationPreferences from reusable chat settings profiles.
  • Add a focused Playwright regression proving Maps can remain enabled in a profile without carrying Falmart or any other chat's saved map into a fresh RP.

Validation

  • pnpm --filter @marinara-engine/shared lint

  • PLAYWRIGHT_CLIENT_PORT=5186 PLAYWRIGHT_SERVER_PORT=7976 pnpm exec playwright test e2e/core-flows.e2e.ts --project=desktop-chromium --grep 'settings profiles cannot carry Hierarchical Maps state'

  • git diff --check

  • pnpm check passes locally

  • Container (Docker / Podman) built and ran without issue

  • Ran the app, clicked through the changes manually

  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)

  • Above manual verification completed (describe below)

  • Read and followed CONTRIBUTING.md

Manual verification notes

  • Reproduced the original inheritance on Engine 2.3.5+4d2b049033ed with Hierarchical Maps 1.1.8: applying a starred Roleplay Settings Profile containing Falmart/Special Region made those locations appear in a newly created RP.
  • Maintainer verification: save/star a settings profile from a chat with a map, create another RP that uses it, and confirm Maps remains enabled but starts with No map yet.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Translated docs on the docs-i18n branch updated to match, or a [docs-i18n] <paths> follow-up issue opened (see CONTRIBUTING.md § Translated documentation)
  • Version/release files updated (only if this PR includes a version bump)

UI evidence (if applicable)

  • No UI layout or copy changed.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/4179 **Author:** [@thetopham](https://github.com/thetopham) **Created:** 7/27/2026 **Status:** ✅ Merged **Merged:** 7/27/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/4176-chat-profile-map-state` --- ### 📝 Commits (2) - [`4f457c0`](https://github.com/Pasta-Devs/Marinara-Engine/commit/4f457c0714d79897e7753b122faff82d15d19410) fix(maps): keep chat map state out of profiles - [`b0a2588`](https://github.com/Pasta-Devs/Marinara-Engine/commit/b0a25882ca9b821b25fd57c07a92c6d666c84537) Merge branch 'staging' into fix/4176-chat-profile-map-state ### 📊 Changes **2 files changed** (+73 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `e2e/core-flows.e2e.ts` (+68 -0) 📝 `packages/shared/src/types/chat-preset.ts` (+5 -1) </details> ### 📄 Description ## Linked issue Part of #4176 ## Why this change - Hierarchical Maps stores each chat's map in metadata, but Roleplay Settings Profiles were allowed to capture that map state. A saved/starred profile from the Falmart chat therefore copied the whole map into every new RP that used the profile, even though the linked lorebook was character-scoped and not global. - Sanitizing profiles on read also prevents map state already stored by affected releases from being applied after users update. ## What changed - Exclude `spatialContext`, `spatialContextHierarchyProfile`, and `spatialMapGenerationPreferences` from reusable chat settings profiles. - Add a focused Playwright regression proving Maps can remain enabled in a profile without carrying Falmart or any other chat's saved map into a fresh RP. ## Validation - `pnpm --filter @marinara-engine/shared lint` - `PLAYWRIGHT_CLIENT_PORT=5186 PLAYWRIGHT_SERVER_PORT=7976 pnpm exec playwright test e2e/core-flows.e2e.ts --project=desktop-chromium --grep 'settings profiles cannot carry Hierarchical Maps state'` - `git diff --check` - [x] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [x] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes - Reproduced the original inheritance on Engine `2.3.5+4d2b049033ed` with Hierarchical Maps `1.1.8`: applying a starred Roleplay Settings Profile containing Falmart/Special Region made those locations appear in a newly created RP. - Maintainer verification: save/star a settings profile from a chat with a map, create another RP that uses it, and confirm Maps remains enabled but starts with **No map yet**. ## Docs and release impact - [x] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Translated docs on the `docs-i18n` branch updated to match, or a `[docs-i18n] <paths>` follow-up issue opened (see CONTRIBUTING.md § Translated documentation) - [ ] Version/release files updated (only if this PR includes a version bump) ## UI evidence (if applicable) - No UI layout or copy changed. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:08:47 +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#6270
No description provided.