[GH-ISSUE #2966] [Issue]: GM mode import overwrites manual narration edits and new session creation breaks after branch import #1542

Closed
opened 2026-10-21 05:38:44 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @SpicyMarinara on GitHub (Jun 29, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2966

Originally assigned to: @SpicyMarinara on GitHub.

Summary

In GM mode, imported chats revert manual narration edits made before export, and creating a new session after importing a branch can place the new session in the wrong chat and make existing branches unusable. A separate frontend-only Minified React error #185 also appears when generating a new GM session, especially with large GM files.

Expected behavior

Imported GM chats should preserve manual narration edits. Creating a new session from an imported branch should create it in the intended chat and keep existing branches functional. Generating/switching sessions should not trigger a frontend crash.

Actual behavior

On import, GM mode chats revert narration text back to the original AI output instead of keeping user edits. After exporting a completed session from Chat 1, importing it into a branch in Chat 2, and creating a new session, the new session was generated in Chat 1 instead of Chat 2; Chat 1 branches then became clickable but would not actually switch. Separately, generating or switching to a new session on large GM files triggers Minified React error #185. Silver Wolf reported the same error with frontend-only crashing, plus repeated backend API failures (429s and later "no api connected" errors) shown in PowerShell.

Steps to reproduce

  1. In GM mode, edit narration text in a chat (for example, change "She looks straight ahead" to "She averts her eyes").
  2. Export the chat/session as JSONL and re-import it.
  3. Observe that the imported chat reverts the manual narration edits.
  4. For the branch/session issue, complete a session in Chat 1, export the JSONL, import it into a chat branch in Chat 2, then click to create a new session.
  5. Observe that the new session is created in Chat 1 instead of the intended chat, and Chat 1 branches become unusable for switching.
  6. For the React error, open or generate a new GM session from a large GM file and observe the frontend error.

Environment

  • Marinara Engine version: v2.0.5 reported for the React error; otherwise Not provided in the Discord context.
  • Install type: Not provided in the Discord context.
  • OS + version: Chrome on a Linux virtual machine
  • Browser or app shell: Chrome

Logs, screenshots, or video

Minified React error #185 on switching to/generating new session from large GM files. Silver Wolf also reported PowerShell backend logs showing many failed API calls, including 429 errors and later "no api connected" errors.

Additional context

Leon reported these issues in GM mode. Marinara replied that edits should be preserved on export and would investigate the React error; for the branch/session issue, Marinara suspected exporting/importing may have broken the state, but noted it should not work this way. Silver Wolf said the React error affects only the frontend window and does not crash the backend.

Discord thread: GM mode issues
Discord thread link: https://discord.com/channels/1417099416812392641/1521061798390796379
Requested by: Marinara (marinara_spaghetti, Discord ID 169561011928432653)

Discord thread transcript (6 messages)
[2026-06-29T07:56:32.698Z] Leon: OS: Chrome on a Linux virtual machine

* On import, GM mode chats revert the manual changes made in the AI's narration. So for example if I changed "She looks straight ahead" to "She averts her eyes", it will again be the first one on import.

* Minified React error #185 on switching to/generating new session from large GM files. Reasonably certain wasn't an issue on previous versions.

* After completing a session in Chat 1, I have exported the JSONL file, then imported it into a chat branch in Chat 2. I then clicked to create a new session. (As I wished to  have the new session in a new chat.) The new session instead generated in Chat 1, and all previous chat branches in Chat 1 are now unavailable. (Can be clicked and switched to, but doesn't actually switch.)
[Discord message: https://discord.com/channels/1417099416812392641/1521061798390796379/1521061798390796379]

[2026-06-29T08:08:39.520Z] Marinara: 1. These edits should be preserved upon an export.
2. Will investigate what's causing it.
3. Why didn't you just create a branch manually instead of exporting/importing? I assume that's what broke it. Still, I guess it shouldn't work this way.
[Discord message: https://discord.com/channels/1417099416812392641/1521061798390796379/1521064846903214253]

[2026-06-29T08:10:59.607Z] Silver Wolf: I’m having the exact same Minified React Error #185 when generating a new Game mode Session. On the powershell back end it will give 20  something failed api calls, either 429 errors, or now “no api connected errors.” I have a long list of stuff I tried to address it, if you’re interested?
[Discord message: https://discord.com/channels/1417099416812392641/1521061798390796379/1521065434470678528]

[2026-06-29T08:12:17.377Z] Silver Wolf: Before I had the exact same error, but with no pop up to reload or restart the server before. Interestingly enough, it doesn’t crash the backend, just the frontend on that specific window.
[Discord message: https://discord.com/channels/1417099416812392641/1521061798390796379/1521065760661700648]

[2026-06-29T08:14:46.572Z] Marinara: Gonna look into it.
[Discord message: https://discord.com/channels/1417099416812392641/1521061798390796379/1521066386431017021]

[2026-06-29T08:14:57.335Z] Silver Wolf: Also, I did have it with v2.0.5 before as well. Just now there’s the pop up
[Discord message: https://discord.com/channels/1417099416812392641/1521061798390796379/1521066431574315159]

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 @SpicyMarinara on GitHub (Jun 29, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2966 Originally assigned to: @SpicyMarinara on GitHub. ## Summary In GM mode, imported chats revert manual narration edits made before export, and creating a new session after importing a branch can place the new session in the wrong chat and make existing branches unusable. A separate frontend-only Minified React error #185 also appears when generating a new GM session, especially with large GM files. ## Expected behavior Imported GM chats should preserve manual narration edits. Creating a new session from an imported branch should create it in the intended chat and keep existing branches functional. Generating/switching sessions should not trigger a frontend crash. ## Actual behavior On import, GM mode chats revert narration text back to the original AI output instead of keeping user edits. After exporting a completed session from Chat 1, importing it into a branch in Chat 2, and creating a new session, the new session was generated in Chat 1 instead of Chat 2; Chat 1 branches then became clickable but would not actually switch. Separately, generating or switching to a new session on large GM files triggers Minified React error #185. Silver Wolf reported the same error with frontend-only crashing, plus repeated backend API failures (429s and later "no api connected" errors) shown in PowerShell. ## Steps to reproduce 1. In GM mode, edit narration text in a chat (for example, change "She looks straight ahead" to "She averts her eyes"). 2. Export the chat/session as JSONL and re-import it. 3. Observe that the imported chat reverts the manual narration edits. 4. For the branch/session issue, complete a session in Chat 1, export the JSONL, import it into a chat branch in Chat 2, then click to create a new session. 5. Observe that the new session is created in Chat 1 instead of the intended chat, and Chat 1 branches become unusable for switching. 6. For the React error, open or generate a new GM session from a large GM file and observe the frontend error. ## Environment - Marinara Engine version: v2.0.5 reported for the React error; otherwise Not provided in the Discord context. - Install type: Not provided in the Discord context. - OS + version: Chrome on a Linux virtual machine - Browser or app shell: Chrome ## Logs, screenshots, or video Minified React error #185 on switching to/generating new session from large GM files. Silver Wolf also reported PowerShell backend logs showing many failed API calls, including 429 errors and later "no api connected" errors. ## Additional context Leon reported these issues in GM mode. Marinara replied that edits should be preserved on export and would investigate the React error; for the branch/session issue, Marinara suspected exporting/importing may have broken the state, but noted it should not work this way. Silver Wolf said the React error affects only the frontend window and does not crash the backend. Discord thread: GM mode issues Discord thread link: https://discord.com/channels/1417099416812392641/1521061798390796379 Requested by: Marinara (marinara_spaghetti, Discord ID 169561011928432653) <details> <summary>Discord thread transcript (6 messages)</summary> ```text [2026-06-29T07:56:32.698Z] Leon: OS: Chrome on a Linux virtual machine * On import, GM mode chats revert the manual changes made in the AI's narration. So for example if I changed "She looks straight ahead" to "She averts her eyes", it will again be the first one on import. * Minified React error #185 on switching to/generating new session from large GM files. Reasonably certain wasn't an issue on previous versions. * After completing a session in Chat 1, I have exported the JSONL file, then imported it into a chat branch in Chat 2. I then clicked to create a new session. (As I wished to have the new session in a new chat.) The new session instead generated in Chat 1, and all previous chat branches in Chat 1 are now unavailable. (Can be clicked and switched to, but doesn't actually switch.) [Discord message: https://discord.com/channels/1417099416812392641/1521061798390796379/1521061798390796379] [2026-06-29T08:08:39.520Z] Marinara: 1. These edits should be preserved upon an export. 2. Will investigate what's causing it. 3. Why didn't you just create a branch manually instead of exporting/importing? I assume that's what broke it. Still, I guess it shouldn't work this way. [Discord message: https://discord.com/channels/1417099416812392641/1521061798390796379/1521064846903214253] [2026-06-29T08:10:59.607Z] Silver Wolf: I’m having the exact same Minified React Error #185 when generating a new Game mode Session. On the powershell back end it will give 20 something failed api calls, either 429 errors, or now “no api connected errors.” I have a long list of stuff I tried to address it, if you’re interested? [Discord message: https://discord.com/channels/1417099416812392641/1521061798390796379/1521065434470678528] [2026-06-29T08:12:17.377Z] Silver Wolf: Before I had the exact same error, but with no pop up to reload or restart the server before. Interestingly enough, it doesn’t crash the backend, just the frontend on that specific window. [Discord message: https://discord.com/channels/1417099416812392641/1521061798390796379/1521065760661700648] [2026-06-29T08:14:46.572Z] Marinara: Gonna look into it. [Discord message: https://discord.com/channels/1417099416812392641/1521061798390796379/1521066386431017021] [2026-06-29T08:14:57.335Z] Silver Wolf: Also, I did have it with v2.0.5 before as well. Just now there’s the pop up [Discord message: https://discord.com/channels/1417099416812392641/1521061798390796379/1521066431574315159] ``` </details> ## 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.
bsakaguchi 2026-10-21 05:38:44 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@SpicyMarinara commented on GitHub (Jun 29, 2026):

Extra comment clarifications:
"The Edits ARE listed in the first line of the export document, but not integrated in the next lines."
… Whatever that means. Still, edits should be considered when we import and the edited text should be displayed to the users and be considered in the prompt. The error on creating a new session should also be investigated.

The exact error on the new session:
First this one, repeated dozens of times per attempt:
{"level":50,"time":1782707778253,"pid":30352,"hostname":"George-PC","reqId":"req-1gx","err":{"type":"Error","message":"Custom OpenAI-compatible endpoint error 429: Too many concurrent requests.","stack":"Error: Custom OpenAI-compatible endpoint error 429: Too many concurrent requests.\n at OpenAIProvider.chatComplete (file:///C:/Users/gfeld/AppData/Local/MarinaraEngine/packages/server/dist/services/llm/providers/openai.provider.js:1044:19)\n at async runGameChatComplete (file:///C:/Users/gfeld/AppData/Local/MarinaraEngine/packages/server/dist/routes/game.routes.js:1455:16)\n at async Object. (file:///C:/Users/gfeld/AppData/Local/MarinaraEngine/packages/server/dist/routes/game.routes.js:5886:24)"},"msg":"Custom OpenAI-compatible endpoint error 429: Too many concurrent requests."}
Then after I deleted an old connection to see if that was the problem, it started giving this one:
{"level":50,"time":1782712784522,"pid":30352,"hostname":"George-PC","reqId":"req-9ma","err":{"type":"Error","message":"API connection not found","stack":"Error: API connection not found\n at resolveConnection (file:///C:/Users/gfeld/AppData/Local/MarinaraEngine/packages/server/dist/routes/game.routes.js:1154:15)\n at process.processTicksAndRejections (node:internal/process/task_queues:104:5)\n at async Object. (file:///C:/Users/gfeld/AppData/Local/MarinaraEngine/packages/server/dist/routes/game.routes.js:5835:64)"},"msg":"API connection not found"}
I should note, my API is definitely connected. I've been using it this whole time.

<!-- gh-comment-id:4830498284 --> @SpicyMarinara commented on GitHub (Jun 29, 2026): Extra comment clarifications: "The Edits ARE listed in the first line of the export document, but not integrated in the next lines." … Whatever that means. Still, edits should be considered when we import and the edited text should be displayed to the users and be considered in the prompt. The error on creating a new session should also be investigated. The exact error on the new session: First this one, repeated dozens of times per attempt: {"level":50,"time":1782707778253,"pid":30352,"hostname":"George-PC","reqId":"req-1gx","err":{"type":"Error","message":"Custom OpenAI-compatible endpoint error 429: Too many concurrent requests.","stack":"Error: Custom OpenAI-compatible endpoint error 429: Too many concurrent requests.\n at OpenAIProvider.chatComplete (file:///C:/Users/gfeld/AppData/Local/MarinaraEngine/packages/server/dist/services/llm/providers/openai.provider.js:1044:19)\n at async runGameChatComplete (file:///C:/Users/gfeld/AppData/Local/MarinaraEngine/packages/server/dist/routes/game.routes.js:1455:16)\n at async Object.<anonymous> (file:///C:/Users/gfeld/AppData/Local/MarinaraEngine/packages/server/dist/routes/game.routes.js:5886:24)"},"msg":"Custom OpenAI-compatible endpoint error 429: Too many concurrent requests."} Then after I deleted an old connection to see if that was the problem, it started giving this one: {"level":50,"time":1782712784522,"pid":30352,"hostname":"George-PC","reqId":"req-9ma","err":{"type":"Error","message":"API connection not found","stack":"Error: API connection not found\n at resolveConnection (file:///C:/Users/gfeld/AppData/Local/MarinaraEngine/packages/server/dist/routes/game.routes.js:1154:15)\n at process.processTicksAndRejections (node:internal/process/task_queues:104:5)\n at async Object.<anonymous> (file:///C:/Users/gfeld/AppData/Local/MarinaraEngine/packages/server/dist/routes/game.routes.js:5835:64)"},"msg":"API connection not found"} I should note, my API is definitely connected. I've been using it this whole time.
Author
Owner

@SpicyMarinara commented on GitHub (Jun 29, 2026):

Fixed in staging: JSONL import now trusts active mes text over stale swipe content, and imported Game metadata remaps source gameId/scene pointers so branch imports cannot start sessions in the wrong campaign. Validated with pnpm check and pnpm regression:prompt.

<!-- gh-comment-id:4830958933 --> @SpicyMarinara commented on GitHub (Jun 29, 2026): Fixed in staging: JSONL import now trusts active mes text over stale swipe content, and imported Game metadata remaps source gameId/scene pointers so branch imports cannot start sessions in the wrong campaign. Validated with pnpm check and pnpm regression:prompt.
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#1542
No description provided.