[GH-ISSUE #2192] [Issue]: Game setup Lorebook Keeper toggle writes unused metadata key #1097

Closed
opened 2026-10-21 05:26:37 +07:00 by bsakaguchi · 0 comments
Owner

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

Originally assigned to: @Promansis on GitHub.

Summary

Game setup's Lorebook Keeper toggle does not enable Game Lorebook Keeper in the created game chat because the refactor writes the wrong metadata key.

Expected behavior

When a user enables Lorebook Keeper in the game setup wizard, the resulting game chat should have gameLorebookKeeperEnabled: true, so the settings drawer, session history controls, scope exclusions, and session-end keeper flow all see the feature as enabled.

Actual behavior

The setup wizard sends enableLorebookKeeper, but the refactor game setup metadata patch stores gameEnableLorebookKeeper. Current readers use gameLorebookKeeperEnabled, so the setup toggle is effectively lost until the user manually toggles Game Lorebook Keeper again from chat settings.

Steps to reproduce

  1. Create a game from the refactor game setup wizard.
  2. Enable the Lorebook Keeper toggle before starting the game.
  3. Inspect the created chat metadata or open game chat settings/session history.
  4. Observe that gameLorebookKeeperEnabled is not set even though setup selected the feature.

Impact area

  • App shell, navigation, startup, or providers
  • Catalog resources
  • Chat mode
  • Roleplay mode
  • Game mode
  • Shared mode UI
  • Runtime systems: generation, world-state, visuals, tracker, or haptics
  • React-free engine behavior, contracts, agents, or capability ports
  • Shared API wrapper or remote runtime routing
  • Tauri/Rust storage, assets, LLM, integrations, security, imports, or HTTP runtime
  • Docs, contributor workflow, or templates

Environment

  • Branch or commit: refactor branch, static parityscan against legacy main
  • Run mode: not runtime-tested
  • OS + version: not runtime-tested
  • Node + pnpm versions: not runtime-tested
  • Rust version, if relevant: not relevant
  • Remote Runtime URL configured? not relevant
  • Provider, model, or integration, if relevant: not relevant

Logs, screenshots, or video

Static trace:

  • Refactor setup wizard sends enableLorebookKeeper: src/features/modes/game/components/GameSetupWizard.tsx:679
  • Refactor game setup metadata patch writes gameEnableLorebookKeeper: src/features/modes/game/api/game-api.ts:943
  • Refactor contract/readers expect gameLorebookKeeperEnabled: src/engine/contracts/types/chat.ts:320-323, src/features/modes/shared/chat-ui/components/ChatSettingsDrawer.tsx:694, src/features/modes/game/components/GameSurface.tsx:9080
  • Legacy wrote the expected key: main:packages/server/src/routes/game.routes.ts:3080

Regression notes

Legacy main persisted gameLorebookKeeperEnabled: setupConfig.enableLorebookKeeper === true during game setup. The refactor has the same setup UI affordance but persists a non-consumed key.

Additional context

This came from parityscan batch 6, row 07-LB-UI-keeper-controls.

Template check

Please uncheck 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 @Promansis on GitHub (Jun 4, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2192 Originally assigned to: @Promansis on GitHub. ## Summary Game setup's Lorebook Keeper toggle does not enable Game Lorebook Keeper in the created game chat because the refactor writes the wrong metadata key. ## Expected behavior When a user enables Lorebook Keeper in the game setup wizard, the resulting game chat should have `gameLorebookKeeperEnabled: true`, so the settings drawer, session history controls, scope exclusions, and session-end keeper flow all see the feature as enabled. ## Actual behavior The setup wizard sends `enableLorebookKeeper`, but the refactor game setup metadata patch stores `gameEnableLorebookKeeper`. Current readers use `gameLorebookKeeperEnabled`, so the setup toggle is effectively lost until the user manually toggles Game Lorebook Keeper again from chat settings. ## Steps to reproduce 1. Create a game from the refactor game setup wizard. 2. Enable the Lorebook Keeper toggle before starting the game. 3. Inspect the created chat metadata or open game chat settings/session history. 4. Observe that `gameLorebookKeeperEnabled` is not set even though setup selected the feature. ## Impact area - [ ] App shell, navigation, startup, or providers - [ ] Catalog resources - [ ] Chat mode - [ ] Roleplay mode - [x] Game mode - [x] Shared mode UI - [ ] Runtime systems: generation, world-state, visuals, tracker, or haptics - [x] React-free engine behavior, contracts, agents, or capability ports - [ ] Shared API wrapper or remote runtime routing - [ ] Tauri/Rust storage, assets, LLM, integrations, security, imports, or HTTP runtime - [ ] Docs, contributor workflow, or templates ## Environment - Branch or commit: refactor branch, static parityscan against legacy `main` - Run mode: not runtime-tested - OS + version: not runtime-tested - Node + pnpm versions: not runtime-tested - Rust version, if relevant: not relevant - Remote Runtime URL configured? not relevant - Provider, model, or integration, if relevant: not relevant ## Logs, screenshots, or video Static trace: - Refactor setup wizard sends `enableLorebookKeeper`: `src/features/modes/game/components/GameSetupWizard.tsx:679` - Refactor game setup metadata patch writes `gameEnableLorebookKeeper`: `src/features/modes/game/api/game-api.ts:943` - Refactor contract/readers expect `gameLorebookKeeperEnabled`: `src/engine/contracts/types/chat.ts:320-323`, `src/features/modes/shared/chat-ui/components/ChatSettingsDrawer.tsx:694`, `src/features/modes/game/components/GameSurface.tsx:9080` - Legacy wrote the expected key: `main:packages/server/src/routes/game.routes.ts:3080` ## Regression notes Legacy `main` persisted `gameLorebookKeeperEnabled: setupConfig.enableLorebookKeeper === true` during game setup. The refactor has the same setup UI affordance but persists a non-consumed key. ## Additional context This came from parityscan batch 6, row `07-LB-UI-keeper-controls`. ## Template check Please uncheck 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:26:37 +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#1097
No description provided.