[GH-ISSUE #2033] [Issue]: Tauri dev image grids decode full-size assets before thumbnails #994

Closed
opened 2026-10-21 05:24:55 +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/2033

Originally assigned to: @Promansis on GitHub.

Summary

Tauri desktop dev image-heavy surfaces can lag because embedded mode renders local full-size asset URLs before async thumbnail resolution finishes. The managed HTTP cache path used by remote runtime does not help the embedded Tauri first paint.

Expected behavior

Tauri desktop should use the same fast thumbnail-first behavior as remote/HTTP image delivery for repeated image surfaces such as avatar lists, game asset grids, background pickers, and gallery cards.

Actual behavior

In embedded Tauri, remote managed asset URLs are unavailable, so components often initialize with convertFileSrc/full-size file URLs, then call Tauri commands to generate or resolve thumbnails afterward. This can force full-size image decode on first paint and cause visible lag, especially in dev/debug builds.

Steps to reproduce

  1. Run the refactor branch in Tauri desktop dev mode.
  2. Open image-heavy catalog/settings/game asset surfaces with many avatars, backgrounds, sprites, or gallery images.
  3. Observe jank/lag while thumbnails resolve or generate after full-size local images are already mounted.

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
  • Run mode: Tauri desktop dev
  • OS + version: Linux observed, likely cross-platform
  • Node + pnpm versions: not captured
  • Rust version, if relevant: not captured
  • Remote Runtime URL configured? no
  • Provider, model, or integration, if relevant: not relevant

Logs, screenshots, or video

Static code evidence: local-file-api returns remote managed asset URLs only when remoteRuntimeTarget exists, otherwise embedded Tauri components fall back to local file URLs before async thumbnail resolution.

Regression notes

Legacy main served images through local API routes with aggressive cache headers, but did not solve the embedded Tauri refactor path. Refactor has thumbnail commands but repeated surfaces still often mount full-size sources first.

Additional context

Likely fix direction: expose a thumbnail-first local fast path for embedded Tauri by resolving local thumbnails before mounting full-size images in repeated surfaces, and keep full-size URLs for preview/detail views only.

Template check

  • 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/2033 Originally assigned to: @Promansis on GitHub. ## Summary Tauri desktop dev image-heavy surfaces can lag because embedded mode renders local full-size asset URLs before async thumbnail resolution finishes. The managed HTTP cache path used by remote runtime does not help the embedded Tauri first paint. ## Expected behavior Tauri desktop should use the same fast thumbnail-first behavior as remote/HTTP image delivery for repeated image surfaces such as avatar lists, game asset grids, background pickers, and gallery cards. ## Actual behavior In embedded Tauri, remote managed asset URLs are unavailable, so components often initialize with convertFileSrc/full-size file URLs, then call Tauri commands to generate or resolve thumbnails afterward. This can force full-size image decode on first paint and cause visible lag, especially in dev/debug builds. ## Steps to reproduce 1. Run the refactor branch in Tauri desktop dev mode. 2. Open image-heavy catalog/settings/game asset surfaces with many avatars, backgrounds, sprites, or gallery images. 3. Observe jank/lag while thumbnails resolve or generate after full-size local images are already mounted. ## Impact area - [ ] App shell, navigation, startup, or providers - [x] Catalog resources - [x] Chat mode - [x] Roleplay mode - [x] Game mode - [x] Shared mode UI - [x] 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 - Run mode: Tauri desktop dev - OS + version: Linux observed, likely cross-platform - Node + pnpm versions: not captured - Rust version, if relevant: not captured - Remote Runtime URL configured? no - Provider, model, or integration, if relevant: not relevant ## Logs, screenshots, or video Static code evidence: local-file-api returns remote managed asset URLs only when remoteRuntimeTarget exists, otherwise embedded Tauri components fall back to local file URLs before async thumbnail resolution. ## Regression notes Legacy main served images through local API routes with aggressive cache headers, but did not solve the embedded Tauri refactor path. Refactor has thumbnail commands but repeated surfaces still often mount full-size sources first. ## Additional context Likely fix direction: expose a thumbnail-first local fast path for embedded Tauri by resolving local thumbnails before mounting full-size images in repeated surfaces, and keep full-size URLs for preview/detail views only. ## Template check - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 05:24:55 +07:00
  • closed this issue
  • added the
    bug
    label
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#994
No description provided.