[GH-ISSUE #1446] [Issue]: Typing in chat input re-renders message timeline and can freeze large chats #720

Closed
opened 2026-10-20 17:32:21 +07:00 by bsakaguchi · 0 comments
Owner

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

Originally assigned to: @Promansis on GitHub.

Summary

Typing in the chat input can re-render the message timeline because message rows and timeline actions subscribe directly to currentInput. On large chats, this can make typing stutter or freeze the chat UI.

Expected behavior

Typing in the draft input should update the composer without forcing every rendered message/action row to re-render. Regenerate should still read the latest draft text when clicked so guided regeneration behavior remains intact.

Actual behavior

On upstream/refactor, message components still subscribe to useChatStore((s) => s.currentInput...):

  • src/features/modes/conversation/components/ConversationMessage.tsx
  • src/features/modes/shared/chat-ui/components/ChatMessage.tsx
  • src/features/modes/shared/chat-ui/hooks/use-chat-timeline-actions.ts

That couples every draft keystroke to timeline/message UI. The rebased fix branch fix/chat-typing-freeze removes those live subscriptions and reads the current input lazily only when regenerate is invoked.

Steps to reproduce

  1. On upstream/refactor, open a chat with a large rendered message timeline.
  2. Enable guided generations.
  3. Type into the chat input and observe timeline/message action re-render pressure or typing stutter.
  4. Compare with the candidate fix branch, where message rows no longer subscribe to currentInput.

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: upstream/refactor at a6d2fc8b79093f35e766528460175240f5588552; candidate fix branch fix/chat-typing-freeze at a0bef2e6126279963a0497e184f50868efbd4da7
  • Run mode: web shell / Tauri shell UI
  • OS + version: not captured
  • Node + pnpm versions: Node v24.15.0, pnpm 10.33.2
  • Rust version, if relevant: not relevant
  • Remote Runtime URL configured? not relevant
  • Provider, model, or integration, if relevant: not relevant

Logs, screenshots, or video

No screenshot/video captured. Evidence is from code inspection and the rebased fix diff.

Regression notes

This was identified while rebasing fix/chat-typing-freeze onto current upstream/refactor. The fix still applies because the current refactor branch keeps draft-input subscriptions in message/timeline code.

Additional context

The candidate fix keeps guided regenerate behavior by reading useChatStore.getState().currentInput inside handleRegenerate, instead of subscribing the whole timeline hook and message rows to draft input changes.

pnpm typecheck passed after the earlier rebase of this UI-only fix; it has not been rerun after the latest chat rebase in this turn.

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 (May 28, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1446 Originally assigned to: @Promansis on GitHub. ## Summary Typing in the chat input can re-render the message timeline because message rows and timeline actions subscribe directly to `currentInput`. On large chats, this can make typing stutter or freeze the chat UI. ## Expected behavior Typing in the draft input should update the composer without forcing every rendered message/action row to re-render. Regenerate should still read the latest draft text when clicked so guided regeneration behavior remains intact. ## Actual behavior On `upstream/refactor`, message components still subscribe to `useChatStore((s) => s.currentInput...)`: - `src/features/modes/conversation/components/ConversationMessage.tsx` - `src/features/modes/shared/chat-ui/components/ChatMessage.tsx` - `src/features/modes/shared/chat-ui/hooks/use-chat-timeline-actions.ts` That couples every draft keystroke to timeline/message UI. The rebased fix branch `fix/chat-typing-freeze` removes those live subscriptions and reads the current input lazily only when regenerate is invoked. ## Steps to reproduce 1. On `upstream/refactor`, open a chat with a large rendered message timeline. 2. Enable guided generations. 3. Type into the chat input and observe timeline/message action re-render pressure or typing stutter. 4. Compare with the candidate fix branch, where message rows no longer subscribe to `currentInput`. ## Impact area <!-- Check the areas you think are relevant. Leave uncertain items unchecked. --> - [ ] App shell, navigation, startup, or providers - [ ] Catalog resources - [x] Chat mode - [ ] Roleplay mode - [ ] Game mode - [x] 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: `upstream/refactor` at `a6d2fc8b79093f35e766528460175240f5588552`; candidate fix branch `fix/chat-typing-freeze` at `a0bef2e6126279963a0497e184f50868efbd4da7` - Run mode: web shell / Tauri shell UI - OS + version: not captured - Node + pnpm versions: Node `v24.15.0`, pnpm `10.33.2` - Rust version, if relevant: not relevant - Remote Runtime URL configured? not relevant - Provider, model, or integration, if relevant: not relevant ## Logs, screenshots, or video No screenshot/video captured. Evidence is from code inspection and the rebased fix diff. ## Regression notes This was identified while rebasing `fix/chat-typing-freeze` onto current `upstream/refactor`. The fix still applies because the current refactor branch keeps draft-input subscriptions in message/timeline code. ## Additional context The candidate fix keeps guided regenerate behavior by reading `useChatStore.getState().currentInput` inside `handleRegenerate`, instead of subscribing the whole timeline hook and message rows to draft input changes. `pnpm typecheck` passed after the earlier rebase of this UI-only fix; it has not been rerun after the latest chat rebase in this turn. ## 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-20 17:32:21 +07:00
  • closed this issue
  • added the
    in-pr
    bug
    labels
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#720
No description provided.