[GH-ISSUE #1789] [Issue]: Conversation mode lost legacy prompt context and linked-chat parity #872

Closed
opened 2026-10-21 05:22:41 +07:00 by bsakaguchi · 1 comment
Owner

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

Originally assigned to: @cha1latte on GitHub.

Summary

Conversation mode still exposes settings for cross-chat awareness, connected roleplay/game context, autonomous schedules, and hidden character commands, but the refactor generation path no longer assembles several legacy prompt-context blocks that made those settings work.

The largest gaps are:

  • conversation generations no longer receive the user's live status/activity or character schedule/time context;
  • Cross-Chat Awareness UI remains, but sibling-chat message awareness is not injected;
  • Connected Chat UI says linked roleplay/game context is pulled into conversation, but conversation prompt assembly does not include linked roleplay/game blocks;
  • command parsing still exists, but the model is not told when/how to use the conversation command tags.

Expected behavior

Conversation mode should preserve the legacy user outcomes:

  • User status/activity and character schedules are included in conversation prompt context.
  • Cross-Chat Awareness injects recent sibling conversation messages for shared characters when enabled.
  • A conversation linked to roleplay/game can see relevant linked scene/game context during conversation turns.
  • When Commands are enabled, conversation prompt instructions describe supported hidden commands such as schedule update, cross-post, selfie, memory, and scene creation only when their prerequisites are available.

Actual behavior

Static comparison shows the refactor surfaces or parsers remain, but prompt assembly does not restore the runtime context:

  • src/features/runtime/generation/hooks/use-generate.ts:1415 passes userTimeZone, but not userStatus or userActivity, into startGeneration.
  • src/features/modes/shared/chat-ui/components/ChatSettingsDrawer.tsx:3497 still exposes Cross-Chat Awareness and says characters know what happens in other chats.
  • src/engine/generation/prompt-assembly.ts:1211 only uses crossChatAwareness to include/exclude stored summary fields; there is no sibling-chat awareness service equivalent to legacy.
  • src/features/modes/shared/chat-ui/components/ChatSettingsDrawer.tsx:3541 says connected roleplay/game messages are pulled into conversation context.
  • src/engine/generation/prompt-assembly.ts:1411 only injects notes from connected conversations into roleplay/game paths, not linked roleplay/game context into conversation paths.
  • src/features/modes/shared/chat-ui/components/ChatSettingsDrawer.tsx:3336 exposes Commands and src/engine/modes/chat/commands/character-commands.ts:8 parses the tags, but src/engine/generation/prompt-assembly.ts:1138 has only a generic conversation fallback prompt.

Legacy evidence:

  • packages/server/src/routes/generate.routes.ts:3320 built status/activity, schedule, time, proactive-turn, and mention context for conversation.
  • packages/server/src/routes/generate.routes.ts:3364 injected a cross-chat awareness block from packages/server/src/services/conversation/awareness.service.ts:160.
  • packages/server/src/routes/generate.routes.ts:3385 injected <connected_roleplay> / <connected_game> blocks into conversation turns.
  • packages/server/src/routes/generate.routes.ts:3069 built a gated command-instruction block for schedule updates, cross-posting, selfies, memory, and scene creation.

Steps to reproduce

  1. On the refactor branch, create or open a conversation chat with Commands enabled.
  2. Enable Cross-Chat Awareness and add the same character to another conversation that has recent messages.
  3. Generate a conversation reply and inspect the generation prompt path.
  4. Link the conversation to a roleplay or game chat through Connected Chat and generate another conversation reply.
  5. Compare the refactor prompt assembly with the legacy route references above.

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
  • Professor Mari or shell tools
  • 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
  • Run mode: static legacy/refactor code comparison; not runtime-tested
  • OS + version: not collected
  • Node + pnpm versions: not collected
  • Rust version, if relevant: not relevant
  • Remote Runtime URL configured? not relevant
  • Provider, model, or integration, if relevant: conversation prompt assembly, provider-independent

Logs, screenshots, or video

No runtime logs or screenshots. Evidence is from current refactor and legacy source paths listed above.

Regression notes

Legacy implementation had server route code for the missing prompt-context blocks. Refactor has preserved several UI controls and parsers, so these look like unintentional parity regressions rather than deliberate product removals.

Additional context

Suggested repair order:

  1. Rebuild a conversation-owned prompt context helper for live status/activity, schedules, current time, proactive turns, and mentions.
  2. Restore cross-chat awareness as a src/engine/modes/chat service using the existing storage gateway boundary.
  3. Add a conversation-side connected roleplay/game context builder that does not couple conversation UI to roleplay/game UI internals.
  4. Add a gated command-instruction block that matches the parser and available chat capabilities.

Server-side autonomous scheduling from legacy (packages/server/src/services/conversation/server-autonomous-scheduler.service.ts) is also worth a product decision: refactor currently relies on client/AppShell polling, which may be intentional for desktop-only behavior but is not equivalent for offline or hostable runtime behavior.

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 @Xelvanis on GitHub (Jun 1, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1789 Originally assigned to: @cha1latte on GitHub. ## Summary Conversation mode still exposes settings for cross-chat awareness, connected roleplay/game context, autonomous schedules, and hidden character commands, but the refactor generation path no longer assembles several legacy prompt-context blocks that made those settings work. The largest gaps are: - conversation generations no longer receive the user's live status/activity or character schedule/time context; - Cross-Chat Awareness UI remains, but sibling-chat message awareness is not injected; - Connected Chat UI says linked roleplay/game context is pulled into conversation, but conversation prompt assembly does not include linked roleplay/game blocks; - command parsing still exists, but the model is not told when/how to use the conversation command tags. ## Expected behavior Conversation mode should preserve the legacy user outcomes: - User status/activity and character schedules are included in conversation prompt context. - Cross-Chat Awareness injects recent sibling conversation messages for shared characters when enabled. - A conversation linked to roleplay/game can see relevant linked scene/game context during conversation turns. - When Commands are enabled, conversation prompt instructions describe supported hidden commands such as schedule update, cross-post, selfie, memory, and scene creation only when their prerequisites are available. ## Actual behavior Static comparison shows the refactor surfaces or parsers remain, but prompt assembly does not restore the runtime context: - `src/features/runtime/generation/hooks/use-generate.ts:1415` passes `userTimeZone`, but not `userStatus` or `userActivity`, into `startGeneration`. - `src/features/modes/shared/chat-ui/components/ChatSettingsDrawer.tsx:3497` still exposes Cross-Chat Awareness and says characters know what happens in other chats. - `src/engine/generation/prompt-assembly.ts:1211` only uses `crossChatAwareness` to include/exclude stored summary fields; there is no sibling-chat awareness service equivalent to legacy. - `src/features/modes/shared/chat-ui/components/ChatSettingsDrawer.tsx:3541` says connected roleplay/game messages are pulled into conversation context. - `src/engine/generation/prompt-assembly.ts:1411` only injects notes from connected conversations into roleplay/game paths, not linked roleplay/game context into conversation paths. - `src/features/modes/shared/chat-ui/components/ChatSettingsDrawer.tsx:3336` exposes Commands and `src/engine/modes/chat/commands/character-commands.ts:8` parses the tags, but `src/engine/generation/prompt-assembly.ts:1138` has only a generic conversation fallback prompt. Legacy evidence: - `packages/server/src/routes/generate.routes.ts:3320` built status/activity, schedule, time, proactive-turn, and mention context for conversation. - `packages/server/src/routes/generate.routes.ts:3364` injected a cross-chat awareness block from `packages/server/src/services/conversation/awareness.service.ts:160`. - `packages/server/src/routes/generate.routes.ts:3385` injected `<connected_roleplay>` / `<connected_game>` blocks into conversation turns. - `packages/server/src/routes/generate.routes.ts:3069` built a gated command-instruction block for schedule updates, cross-posting, selfies, memory, and scene creation. ## Steps to reproduce 1. On the refactor branch, create or open a conversation chat with Commands enabled. 2. Enable Cross-Chat Awareness and add the same character to another conversation that has recent messages. 3. Generate a conversation reply and inspect the generation prompt path. 4. Link the conversation to a roleplay or game chat through Connected Chat and generate another conversation reply. 5. Compare the refactor prompt assembly with the legacy route references above. ## Impact area <!-- Check the areas you think are relevant. Leave uncertain items unchecked. --> - [ ] App shell, navigation, startup, or providers - [ ] Catalog resources - [x] Chat mode - [x] Roleplay mode - [x] Game mode - [x] Shared mode UI - [x] Runtime systems: generation, world-state, visuals, tracker, or haptics - [ ] Professor Mari or shell tools - [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 - Run mode: static legacy/refactor code comparison; not runtime-tested - OS + version: not collected - Node + pnpm versions: not collected - Rust version, if relevant: not relevant - Remote Runtime URL configured? not relevant - Provider, model, or integration, if relevant: conversation prompt assembly, provider-independent ## Logs, screenshots, or video No runtime logs or screenshots. Evidence is from current refactor and legacy source paths listed above. ## Regression notes Legacy implementation had server route code for the missing prompt-context blocks. Refactor has preserved several UI controls and parsers, so these look like unintentional parity regressions rather than deliberate product removals. ## Additional context Suggested repair order: 1. Rebuild a conversation-owned prompt context helper for live status/activity, schedules, current time, proactive turns, and mentions. 2. Restore cross-chat awareness as a `src/engine/modes/chat` service using the existing storage gateway boundary. 3. Add a conversation-side connected roleplay/game context builder that does not couple conversation UI to roleplay/game UI internals. 4. Add a gated command-instruction block that matches the parser and available chat capabilities. Server-side autonomous scheduling from legacy (`packages/server/src/services/conversation/server-autonomous-scheduler.service.ts`) is also worth a product decision: refactor currently relies on client/AppShell polling, which may be intentional for desktop-only behavior but is not equivalent for offline or hostable runtime behavior. ## 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:22:41 +07:00
Author
Owner

@cha1latte commented on GitHub (Jun 1, 2026):

Fixed in #1822

<!-- gh-comment-id:4594878672 --> @cha1latte commented on GitHub (Jun 1, 2026): Fixed in #1822
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#872
No description provided.