[PR #3112] [MERGED] Fix tracker panel freeze on agent-heavy chats #5801

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

📋 Pull Request Information

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

Base: staging ← Head: codex/3104-tracker-panel-freeze


📝 Commits (2)

  • 28cae02 Start tracker panel freeze investigation
  • 9c734ed Fix tracker panel library-scale lookups

📊 Changes

5 files changed (+103 additions, -42 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 packages/client/src/features/tracker-panel/components/sections/CharacterTrackerPanel.tsx (+11 -4)
📝 packages/client/src/features/tracker-panel/hooks/use-tracker-panel-model.ts (+7 -13)
📝 packages/client/src/features/tracker-panel/hooks/use-tracker-sprite-lookup.ts (+55 -21)
📝 packages/client/src/hooks/use-characters.ts (+29 -4)

📄 Description

Fixes #3104.

Why

Chats with world-state or character-tracker agents were mounting the tracker panel and doing work that scaled with the user's full character/persona libraries. On large installs and older tracker-heavy chats, that made the browser main thread freeze even when the chat was just sitting open.

What changed

  • Scoped tracker sprite/profile lookups to the active chat's character IDs instead of fetching and parsing the full character library.
  • Added a persona detail query and switched the tracker persona panel to the active chat persona instead of loading every persona.
  • Kept persona detail cache invalidation aligned with persona update/restore/delete/avatar changes.
  • Added browser render containment around tracker character cards so off-screen accumulated cards cost less layout/paint work.
  • Added the v2.0.9 changelog entry.

Validation

  • pnpm check passed.

Manual verification still needed

  • Open a large tracker-heavy chat on staging and confirm [mari-perf] tracker-panel no longer reports huge render/commit blocks.
  • Confirm chat-linked character sprites/profile colors still resolve in the tracker panel.
  • Confirm the Persona tracker panel still displays for chats with a selected persona.

Summary by CodeRabbit

  • Bug Fixes
    • Fixed tracker panel freezes in chats that use world-state or character-tracker agents.
    • Improved tracker card rendering so off-screen cards are limited, reducing slowdowns.
    • Persona and character lookups are now more reliable, helping tracker data and sprites appear correctly in active 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/3112 **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/3104-tracker-panel-freeze` --- ### 📝 Commits (2) - [`28cae02`](https://github.com/Pasta-Devs/Marinara-Engine/commit/28cae026edda9e1453f1a6bfa5bc81d7f3692f2b) Start tracker panel freeze investigation - [`9c734ed`](https://github.com/Pasta-Devs/Marinara-Engine/commit/9c734ed824b86213026ed5d0e6147769cdc1b59a) Fix tracker panel library-scale lookups ### 📊 Changes **5 files changed** (+103 additions, -42 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `packages/client/src/features/tracker-panel/components/sections/CharacterTrackerPanel.tsx` (+11 -4) 📝 `packages/client/src/features/tracker-panel/hooks/use-tracker-panel-model.ts` (+7 -13) 📝 `packages/client/src/features/tracker-panel/hooks/use-tracker-sprite-lookup.ts` (+55 -21) 📝 `packages/client/src/hooks/use-characters.ts` (+29 -4) </details> ### 📄 Description Fixes #3104. ## Why Chats with world-state or character-tracker agents were mounting the tracker panel and doing work that scaled with the user's full character/persona libraries. On large installs and older tracker-heavy chats, that made the browser main thread freeze even when the chat was just sitting open. ## What changed - Scoped tracker sprite/profile lookups to the active chat's character IDs instead of fetching and parsing the full character library. - Added a persona detail query and switched the tracker persona panel to the active chat persona instead of loading every persona. - Kept persona detail cache invalidation aligned with persona update/restore/delete/avatar changes. - Added browser render containment around tracker character cards so off-screen accumulated cards cost less layout/paint work. - Added the v2.0.9 changelog entry. ## Validation - `pnpm check` passed. ## Manual verification still needed - [ ] Open a large tracker-heavy chat on staging and confirm `[mari-perf] tracker-panel` no longer reports huge render/commit blocks. - [ ] Confirm chat-linked character sprites/profile colors still resolve in the tracker panel. - [ ] Confirm the Persona tracker panel still displays for chats with a selected persona. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Fixed tracker panel freezes in chats that use world-state or character-tracker agents. * Improved tracker card rendering so off-screen cards are limited, reducing slowdowns. * Persona and character lookups are now more reliable, helping tracker data and sprites appear correctly in active 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:39 +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#5801
No description provided.