[GH-ISSUE #1799] [Issue]: Runtime generation parity gaps for persona snapshots, availability, and group turns #880

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

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

Originally assigned to: @Xelvanis on GitHub.

Summary

A parity check of src/features/runtime/generation against the legacy generation flow found three user-visible gaps.

Gaps

User persona snapshots are not saved

Current:

  • src/features/runtime/generation/hooks/use-generate.ts builds optimistic user messages without extra.personaSnapshot.
  • src/engine/generation/start-generation.ts saves user message extra with attachments, mentions, and generation replay only.

Legacy:

  • packages/client/src/hooks/use-generate.ts added personaSnapshot for optimistic messages.
  • packages/server/src/routes/generate.routes.ts persisted a snapshot after save.

Impact:

  • Refactor UI still reads personaSnapshot in src/features/modes/shared/chat-ui/components/ChatMessage.tsx and grouping checks in src/features/modes/shared/chat-ui/hooks/use-chat-timeline-actions.ts.
  • Persona name/avatar/color on older user messages can drift after switching persona, and user-message grouping no longer separates persona changes.

Conversation availability and delay events are not wired

Current:

  • src/engine/generation/generation-events.ts has no typing, delayed, or offline events.
  • src/features/runtime/generation/hooks/use-generate.ts has no cases for those events.
  • Direct send in src/features/modes/conversation/components/ConversationInput.tsx calls generate(...) without the legacy schedule gate.

Legacy:

  • packages/server/src/routes/generate.routes.ts skipped generation when all targets were offline, emitted delayed, waited, reloaded messages, then emitted typing.
  • packages/client/src/hooks/use-generate.ts updated delayed/typing/offline UI state.

Impact:

  • Busy/offline conversation characters can respond immediately.
  • Existing delayed indicator UI in src/features/modes/conversation/components/ConversationView.tsx is not reachable from generation events.

Individual group turn loop appears reduced to one target

Current:

  • src/engine/generation/start-generation.ts resolves one group target for generation.
  • src/engine/generation/generation-events.ts has no group_turn event.

Legacy:

  • packages/server/src/routes/generate.routes.ts generated one response per selected character in individual group mode and emitted group_turn.
  • packages/client/src/hooks/use-generate.ts flushed per-character stream state and switched the visible streaming character on group_turn.

Impact:

  • Sequential/smart individual group sends may no longer produce the same multi-character response sequence in one send.
  • Per-character streaming and notification behavior from legacy is absent.

Suggested acceptance criteria

  • Generated user messages preserve the current persona snapshot in optimistic and persisted paths.
  • Conversation generation either restores or explicitly replaces legacy offline, delayed, and typing behavior; dead delayed UI is removed if intentionally replaced.
  • Individual group mode behavior is decided and documented. If parity is desired, generation supports multi-character turns and UI handles group_turn.
  • Targeted proof covers at least one persona switch send, one busy/offline conversation send, and one individual group sequential send.

Verification

Static code inspection only. No app run.

Originally created by @Xelvanis on GitHub (Jun 1, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1799 Originally assigned to: @Xelvanis on GitHub. ## Summary A parity check of `src/features/runtime/generation` against the legacy generation flow found three user-visible gaps. ## Gaps ### User persona snapshots are not saved Current: - `src/features/runtime/generation/hooks/use-generate.ts` builds optimistic user messages without `extra.personaSnapshot`. - `src/engine/generation/start-generation.ts` saves user message extra with attachments, mentions, and generation replay only. Legacy: - `packages/client/src/hooks/use-generate.ts` added `personaSnapshot` for optimistic messages. - `packages/server/src/routes/generate.routes.ts` persisted a snapshot after save. Impact: - Refactor UI still reads `personaSnapshot` in `src/features/modes/shared/chat-ui/components/ChatMessage.tsx` and grouping checks in `src/features/modes/shared/chat-ui/hooks/use-chat-timeline-actions.ts`. - Persona name/avatar/color on older user messages can drift after switching persona, and user-message grouping no longer separates persona changes. ### Conversation availability and delay events are not wired Current: - `src/engine/generation/generation-events.ts` has no `typing`, `delayed`, or `offline` events. - `src/features/runtime/generation/hooks/use-generate.ts` has no cases for those events. - Direct send in `src/features/modes/conversation/components/ConversationInput.tsx` calls `generate(...)` without the legacy schedule gate. Legacy: - `packages/server/src/routes/generate.routes.ts` skipped generation when all targets were offline, emitted `delayed`, waited, reloaded messages, then emitted `typing`. - `packages/client/src/hooks/use-generate.ts` updated delayed/typing/offline UI state. Impact: - Busy/offline conversation characters can respond immediately. - Existing delayed indicator UI in `src/features/modes/conversation/components/ConversationView.tsx` is not reachable from generation events. ### Individual group turn loop appears reduced to one target Current: - `src/engine/generation/start-generation.ts` resolves one group target for generation. - `src/engine/generation/generation-events.ts` has no `group_turn` event. Legacy: - `packages/server/src/routes/generate.routes.ts` generated one response per selected character in individual group mode and emitted `group_turn`. - `packages/client/src/hooks/use-generate.ts` flushed per-character stream state and switched the visible streaming character on `group_turn`. Impact: - Sequential/smart individual group sends may no longer produce the same multi-character response sequence in one send. - Per-character streaming and notification behavior from legacy is absent. ## Suggested acceptance criteria - Generated user messages preserve the current persona snapshot in optimistic and persisted paths. - Conversation generation either restores or explicitly replaces legacy `offline`, `delayed`, and `typing` behavior; dead delayed UI is removed if intentionally replaced. - Individual group mode behavior is decided and documented. If parity is desired, generation supports multi-character turns and UI handles `group_turn`. - Targeted proof covers at least one persona switch send, one busy/offline conversation send, and one individual group sequential send. ## Verification Static code inspection only. No app run.
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#880
No description provided.