[GH-ISSUE #2007] [Issue]: Front page navigation can trigger heavy avatar downloads and long input processing #984

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

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

Originally assigned to: @Promansis on GitHub.

Summary

Front page mode navigation can trigger heavy work on first interaction. A DevTools recording of pressing the main screen mode buttons reported long input processing, repeated large local avatar downloads for tiny UI images, a large chat DOM, forced reflow, and zero/short cache lifetimes on local managed assets.

Static inspection suggests the findings are mostly valid. The existing thumbnail pipeline is present, but adoption is incomplete on some small-avatar surfaces. Lazy route loading also appears to push route, setup wizard, and settings work onto the first quick-start click.

Expected behavior

Pressing the main screen mode buttons should feel responsive, and small avatar UI should use thumbnail-sized assets rather than full-size originals. Local managed assets should avoid unnecessary repeated transfer while still invalidating correctly after edits. Large chat transcripts and virtualized catalog lists should minimize forced layout work.

Actual behavior

The recording reported:

  • Input processing around 1.8 seconds after pressing a main screen mode button.
  • Repeated multi-megabyte local avatar/image downloads for small UI placements.
  • Local managed asset requests showing no useful cache lifetime in DevTools.
  • A large mounted DOM in the chat/message area.
  • Forced reflow with geometry measurement in virtualized/list and scroll-related code paths.
  • Local runtime channels appearing in the "3rd parties" DevTools section.

Static inspection found likely causes:

  • Some home, sidebar, conversation header, and setup/wizard avatar surfaces still use full avatar URLs or raw image elements rather than thumbnail-aware components.
  • Message bubbles and several catalog avatar components already use thumbnail-capable components, so the thumbnail system exists but is not consistently applied.
  • Quick-start creates a chat, switches to a lazy-loaded mode route, and opens setup/settings UI immediately, which can shift load/render cost into the first click.
  • Roleplay and conversation transcripts render currently loaded message nodes directly. This can grow DOM size with long chats.
  • Character library/list virtualization measures rows dynamically, and transcript scroll code reads/writes scroll geometry. These are plausible forced reflow contributors.
  • The "3rd party" finding is misleading: the reported hosts are local runtime/asset channels, not external vendors.

Steps to reproduce

  1. Open the refactor app on the home/main screen.
  2. Start a DevTools Performance recording.
  3. Press the main screen Conversation, Roleplay, or Game quick-start buttons.
  4. Review INP, image delivery, cache lifetime, DOM size, layout/reflow, and local asset request findings.

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, exact commit not recorded
  • Run mode: Tauri desktop
  • OS + version: Windows, exact version not recorded
  • Node + pnpm versions: not recorded
  • Rust version, if relevant: not recorded
  • Remote Runtime URL configured? not recorded
  • Provider, model, or integration, if relevant: not relevant

Logs, screenshots, or video

No screenshot/video attached. DevTools summary from the recording:

  • INP processing duration was approximately 1.8 seconds.
  • Image delivery savings were estimated around 8.5 MB, mostly from repeated local avatar/image requests.
  • DOM size was around 2,800 elements, with the message scroll area called out as the largest child container.
  • Forced reflow was reported around virtualized measurement and transcript/input scroll-related call frames.
  • Local runtime and asset channels were listed under "3rd parties", but those appear to be local app channels.

No user-local filesystem paths are included here.

Regression notes

Recent image-delivery work added avatar and managed-asset thumbnail support, so this is likely an incomplete-adoption/performance-follow-up rather than a missing thumbnail system.

Additional context

Suggested investigation/fix direction:

  • Convert remaining tiny-avatar surfaces to thumbnail-aware components or thumbnail URL resolvers.
  • Keep full-size avatar URLs only for lightbox/open-full-image behavior.
  • Consider idle or hover prefetch for the mode route and setup wizard chunks used by quick-start.
  • Avoid opening multiple heavy setup surfaces synchronously on first navigation when possible.
  • Consider transcript DOM limits/virtualization or a cheaper render strategy for very long loaded conversations.
  • Review avatar/thumbnail cache headers and cache-busting so repeat visits avoid unnecessary transfer without showing stale images.

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 (Jun 3, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2007 Originally assigned to: @Promansis on GitHub. ## Summary Front page mode navigation can trigger heavy work on first interaction. A DevTools recording of pressing the main screen mode buttons reported long input processing, repeated large local avatar downloads for tiny UI images, a large chat DOM, forced reflow, and zero/short cache lifetimes on local managed assets. Static inspection suggests the findings are mostly valid. The existing thumbnail pipeline is present, but adoption is incomplete on some small-avatar surfaces. Lazy route loading also appears to push route, setup wizard, and settings work onto the first quick-start click. ## Expected behavior Pressing the main screen mode buttons should feel responsive, and small avatar UI should use thumbnail-sized assets rather than full-size originals. Local managed assets should avoid unnecessary repeated transfer while still invalidating correctly after edits. Large chat transcripts and virtualized catalog lists should minimize forced layout work. ## Actual behavior The recording reported: - Input processing around 1.8 seconds after pressing a main screen mode button. - Repeated multi-megabyte local avatar/image downloads for small UI placements. - Local managed asset requests showing no useful cache lifetime in DevTools. - A large mounted DOM in the chat/message area. - Forced reflow with geometry measurement in virtualized/list and scroll-related code paths. - Local runtime channels appearing in the "3rd parties" DevTools section. Static inspection found likely causes: - Some home, sidebar, conversation header, and setup/wizard avatar surfaces still use full avatar URLs or raw image elements rather than thumbnail-aware components. - Message bubbles and several catalog avatar components already use thumbnail-capable components, so the thumbnail system exists but is not consistently applied. - Quick-start creates a chat, switches to a lazy-loaded mode route, and opens setup/settings UI immediately, which can shift load/render cost into the first click. - Roleplay and conversation transcripts render currently loaded message nodes directly. This can grow DOM size with long chats. - Character library/list virtualization measures rows dynamically, and transcript scroll code reads/writes scroll geometry. These are plausible forced reflow contributors. - The "3rd party" finding is misleading: the reported hosts are local runtime/asset channels, not external vendors. ## Steps to reproduce 1. Open the refactor app on the home/main screen. 2. Start a DevTools Performance recording. 3. Press the main screen Conversation, Roleplay, or Game quick-start buttons. 4. Review INP, image delivery, cache lifetime, DOM size, layout/reflow, and local asset request findings. ## Impact area - [x] App shell, navigation, startup, or providers - [ ] Catalog resources - [x] Chat mode - [x] Roleplay mode - [x] 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 - [x] Shared API wrapper or remote runtime routing - [x] Tauri/Rust storage, assets, LLM, integrations, security, imports, or HTTP runtime - [ ] Docs, contributor workflow, or templates ## Environment - Branch or commit: refactor branch, exact commit not recorded - Run mode: Tauri desktop - OS + version: Windows, exact version not recorded - Node + pnpm versions: not recorded - Rust version, if relevant: not recorded - Remote Runtime URL configured? not recorded - Provider, model, or integration, if relevant: not relevant ## Logs, screenshots, or video No screenshot/video attached. DevTools summary from the recording: - INP processing duration was approximately 1.8 seconds. - Image delivery savings were estimated around 8.5 MB, mostly from repeated local avatar/image requests. - DOM size was around 2,800 elements, with the message scroll area called out as the largest child container. - Forced reflow was reported around virtualized measurement and transcript/input scroll-related call frames. - Local runtime and asset channels were listed under "3rd parties", but those appear to be local app channels. No user-local filesystem paths are included here. ## Regression notes Recent image-delivery work added avatar and managed-asset thumbnail support, so this is likely an incomplete-adoption/performance-follow-up rather than a missing thumbnail system. ## Additional context Suggested investigation/fix direction: - Convert remaining tiny-avatar surfaces to thumbnail-aware components or thumbnail URL resolvers. - Keep full-size avatar URLs only for lightbox/open-full-image behavior. - Consider idle or hover prefetch for the mode route and setup wizard chunks used by quick-start. - Avoid opening multiple heavy setup surfaces synchronously on first navigation when possible. - Consider transcript DOM limits/virtualization or a cheaper render strategy for very long loaded conversations. - Review avatar/thumbnail cache headers and cache-busting so repeat visits avoid unnecessary transfer without showing stale images. ## 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.
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#984
No description provided.