[PR #3114] [MERGED] [codex] Reduce chat area render scope #5804

Closed
opened 2026-10-22 04:19:40 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/3114
Author: @SpicyMarinara
Created: 6/30/2026
Status: ✅ Merged
Merged: 6/30/2026
Merged by: @SpicyMarinara

Base: staging ← Head: codex/transcript-window-80


📝 Commits (1)

  • 7b5f9bf Reduce chat area render scope

📊 Changes

7 files changed (+116 additions, -72 deletions)

View changed files

📝 CHANGELOG.md (+2 -0)
📝 packages/client/src/components/chat/ChatArea.tsx (+61 -56)
📝 packages/client/src/hooks/use-characters.ts (+16 -0)
📝 packages/client/src/hooks/use-conversation-custom-emojis.ts (+15 -7)
📝 packages/client/src/hooks/use-conversation-custom-stickers.ts (+15 -7)
📝 packages/client/src/lib/transcript-render-window.ts (+2 -2)
📝 packages/server/src/routes/characters.routes.ts (+5 -0)

📄 Description

Summary

  • Scope ChatArea character and persona data to the active chat instead of loading full libraries on the hot render path.
  • Add an active-persona endpoint/query for the non-game fallback persona case.
  • Scope Conversation emoji/sticker display-name lookups to active participants.
  • Lower the mounted transcript render window for long Conversation and Roleplay chats.
  • Update the v2.0.9 changelog.

Why

User performance traces showed chat-area render+commit taking 6-24 seconds while tracker-panel commits stayed near 0-8ms. The chat surface was paying library-wide lookup costs during active chat renders.

Validation

  • pnpm check

Manual Verification

  • Manually verify a long Conversation chat opens and scrolls without multi-second chat-area commits.
  • Manually verify Roleplay message rendering still shows character/persona styling, creator notes CSS, emojis, and stickers.
  • Manually verify Game mode still has access to the broader character library where required.

Summary by CodeRabbit

  • New Features

    • The app now consistently uses the currently active persona in chat-related views and emoji/sticker display.
    • Long conversations should load more smoothly, with fewer messages kept mounted at once.
  • Bug Fixes

    • Reduced render stalls in chats by narrowing lookups and rendering work to the active conversation.
    • Improved character and persona display accuracy in game and roleplay chats.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/3114 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 6/30/2026 **Status:** ✅ Merged **Merged:** 6/30/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `codex/transcript-window-80` --- ### 📝 Commits (1) - [`7b5f9bf`](https://github.com/Pasta-Devs/Marinara-Engine/commit/7b5f9bfa70c6118b0eae5844b10d432c57ec01a4) Reduce chat area render scope ### 📊 Changes **7 files changed** (+116 additions, -72 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+2 -0) 📝 `packages/client/src/components/chat/ChatArea.tsx` (+61 -56) 📝 `packages/client/src/hooks/use-characters.ts` (+16 -0) 📝 `packages/client/src/hooks/use-conversation-custom-emojis.ts` (+15 -7) 📝 `packages/client/src/hooks/use-conversation-custom-stickers.ts` (+15 -7) 📝 `packages/client/src/lib/transcript-render-window.ts` (+2 -2) 📝 `packages/server/src/routes/characters.routes.ts` (+5 -0) </details> ### 📄 Description ## Summary - Scope ChatArea character and persona data to the active chat instead of loading full libraries on the hot render path. - Add an active-persona endpoint/query for the non-game fallback persona case. - Scope Conversation emoji/sticker display-name lookups to active participants. - Lower the mounted transcript render window for long Conversation and Roleplay chats. - Update the v2.0.9 changelog. ## Why User performance traces showed `chat-area render+commit` taking 6-24 seconds while tracker-panel commits stayed near 0-8ms. The chat surface was paying library-wide lookup costs during active chat renders. ## Validation - pnpm check ## Manual Verification - [ ] Manually verify a long Conversation chat opens and scrolls without multi-second chat-area commits. - [ ] Manually verify Roleplay message rendering still shows character/persona styling, creator notes CSS, emojis, and stickers. - [ ] Manually verify Game mode still has access to the broader character library where required. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * The app now consistently uses the currently active persona in chat-related views and emoji/sticker display. * Long conversations should load more smoothly, with fewer messages kept mounted at once. * **Bug Fixes** * Reduced render stalls in chats by narrowing lookups and rendering work to the active conversation. * Improved character and persona display accuracy in game and roleplay chats. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:19:40 +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#5804
No description provided.