[PR #2014] [MERGED] Improve front navigation avatar performance #5389

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/2014
Author: @Promansis
Created: 6/3/2026
Status: ✅ Merged
Merged: 6/3/2026
Merged by: @Promansis

Base: refactor ← Head: fix/issue-2007-front-navigation-performance


📝 Commits (2)

  • 3e22739 Improve front navigation avatar performance
  • ed1b143 Fix avatar cache and thumbnail fallback

📊 Changes

6 files changed (+122 additions, -18 deletions)

View changed files

📝 src/features/catalog/characters/components/CharacterAvatarImage.tsx (+17 -1)
📝 src/features/catalog/characters/index.ts (+1 -0)
📝 src/features/modes/game/components/GameSetupWizard.tsx (+13 -4)
📝 src/features/modes/router/components/ModeHomeSurface.tsx (+43 -1)
📝 src/features/modes/router/components/RecentChats.tsx (+36 -7)
📝 src/features/modes/shared/chat-ui/components/ChatSetupWizard.tsx (+12 -5)

📄 Description

Linked issue

Closes #2007

Why this change

  • Front page quick-start navigation could push mode route chunk loading and small-avatar image work onto the first click. Recent chat chips and setup wizard rows also used full avatar URLs in tiny image slots, and remote managed avatar/thumb assets had cache headers that encouraged repeated transfer.

What changed

  • Prewarms Conversation, Roleplay, and Game mode route chunks from the home screen during idle time and on quick-start button hover/focus.
  • Routes recent chat, shared chat setup, and game setup character avatars through the catalog thumbnail-aware avatar component at 64px.
  • Exposes the catalog character avatar image component through the character package index and lets it report image load errors to callers.
  • Gives managed asset HTTP responses a reusable cache lifetime while keeping ETags and existing app-side invalidation query behavior.

Refactor impact

Primary owner:

App shell mode routing, shared mode UI, game setup UI, catalog character avatar UI, and Rust managed asset HTTP delivery.

Impact areas reviewed:

  • Home mode quick-start navigation
  • Recent chat chips on the home surface
  • Chat setup wizard avatar rows
  • Game setup wizard avatar rows
  • Character avatar thumbnail resolver behavior
  • Remote managed asset cache/invalidation behavior

Boundary notes:

  • Feature UI now reuses the catalog-owned thumbnail-aware avatar component instead of adding new image resolution logic.
  • Engine contracts and mode orchestration were not changed.
  • Rust change stays inside the managed asset HTTP response boundary and relies on the existing frontend invalidation query for app-managed edits.

Pressure points touched:

  • ModeHomeSurface
  • RecentChats
  • ChatSetupWizard
  • GameSetupWizard
  • CharacterAvatarImage
  • src-tauri/src/http_server.rs managed asset headers

Validation

  • Matching validation command passes locally (for example pnpm typecheck, pnpm build, pnpm check:architecture, pnpm check:docs, or full pnpm check when warranted)
  • Full pnpm check passes before PR push/handoff
  • Human/manual validation completed by contributor or reviewer

Manual verification notes

  • pnpm typecheck
  • pnpm check:architecture
  • cargo check --manifest-path src-tauri/Cargo.toml
  • cargo test --manifest-path src-tauri/Cargo.toml managed_asset_headers_include_cache_and_validation_metadata
  • pnpm check
  • Browser performance recording not captured in this pass.

Feature Discoverability

Check exactly one:

  • Updated src/features/shell/discovery/ because this PR adds or materially changes a user-discoverable feature, workflow, setting, mode, panel, import path, agent, media capability, or advanced tool.
  • N/A because this PR is only a bugfix, refactor, test, docs, internal wiring, visual polish, copy edit, or compatibility fix and does not add a new thing users need to find.

Reason:

  • Performance bugfix only; no new user-facing feature or discoverable workflow.

Docs and release impact

  • No docs changes needed
  • Updated README.md
  • Updated CONTRIBUTING.md
  • Updated docs/developer/
  • Updated repo skills or AGENTS.md
  • Confirmed this PR does not restore old staging/package-workspace/release claims

UI evidence

Not captured; this is a perf/image-delivery fix with local command validation.


🔄 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/2014 **Author:** [@Promansis](https://github.com/Promansis) **Created:** 6/3/2026 **Status:** ✅ Merged **Merged:** 6/3/2026 **Merged by:** [@Promansis](https://github.com/Promansis) **Base:** `refactor` ← **Head:** `fix/issue-2007-front-navigation-performance` --- ### 📝 Commits (2) - [`3e22739`](https://github.com/Pasta-Devs/Marinara-Engine/commit/3e22739f39261145ed43ed6d7538e99f3088441a) Improve front navigation avatar performance - [`ed1b143`](https://github.com/Pasta-Devs/Marinara-Engine/commit/ed1b1432841759fe4dea59885a1eba877586e96e) Fix avatar cache and thumbnail fallback ### 📊 Changes **6 files changed** (+122 additions, -18 deletions) <details> <summary>View changed files</summary> 📝 `src/features/catalog/characters/components/CharacterAvatarImage.tsx` (+17 -1) 📝 `src/features/catalog/characters/index.ts` (+1 -0) 📝 `src/features/modes/game/components/GameSetupWizard.tsx` (+13 -4) 📝 `src/features/modes/router/components/ModeHomeSurface.tsx` (+43 -1) 📝 `src/features/modes/router/components/RecentChats.tsx` (+36 -7) 📝 `src/features/modes/shared/chat-ui/components/ChatSetupWizard.tsx` (+12 -5) </details> ### 📄 Description ## Linked issue Closes #2007 ## Why this change - Front page quick-start navigation could push mode route chunk loading and small-avatar image work onto the first click. Recent chat chips and setup wizard rows also used full avatar URLs in tiny image slots, and remote managed avatar/thumb assets had cache headers that encouraged repeated transfer. ## What changed - Prewarms Conversation, Roleplay, and Game mode route chunks from the home screen during idle time and on quick-start button hover/focus. - Routes recent chat, shared chat setup, and game setup character avatars through the catalog thumbnail-aware avatar component at 64px. - Exposes the catalog character avatar image component through the character package index and lets it report image load errors to callers. - Gives managed asset HTTP responses a reusable cache lifetime while keeping ETags and existing app-side invalidation query behavior. ## Refactor impact Primary owner: App shell mode routing, shared mode UI, game setup UI, catalog character avatar UI, and Rust managed asset HTTP delivery. Impact areas reviewed: - Home mode quick-start navigation - Recent chat chips on the home surface - Chat setup wizard avatar rows - Game setup wizard avatar rows - Character avatar thumbnail resolver behavior - Remote managed asset cache/invalidation behavior Boundary notes: - Feature UI now reuses the catalog-owned thumbnail-aware avatar component instead of adding new image resolution logic. - Engine contracts and mode orchestration were not changed. - Rust change stays inside the managed asset HTTP response boundary and relies on the existing frontend invalidation query for app-managed edits. Pressure points touched: - `ModeHomeSurface` - `RecentChats` - `ChatSetupWizard` - `GameSetupWizard` - `CharacterAvatarImage` - `src-tauri/src/http_server.rs` managed asset headers ## Validation - [x] Matching validation command passes locally (for example `pnpm typecheck`, `pnpm build`, `pnpm check:architecture`, `pnpm check:docs`, or full `pnpm check` when warranted) - [x] Full `pnpm check` passes before PR push/handoff - [ ] Human/manual validation completed by contributor or reviewer ### Manual verification notes - `pnpm typecheck` - `pnpm check:architecture` - `cargo check --manifest-path src-tauri/Cargo.toml` - `cargo test --manifest-path src-tauri/Cargo.toml managed_asset_headers_include_cache_and_validation_metadata` - `pnpm check` - Browser performance recording not captured in this pass. ## Feature Discoverability Check exactly one: - [ ] Updated `src/features/shell/discovery/` because this PR adds or materially changes a user-discoverable feature, workflow, setting, mode, panel, import path, agent, media capability, or advanced tool. - [x] N/A because this PR is only a bugfix, refactor, test, docs, internal wiring, visual polish, copy edit, or compatibility fix and does not add a new thing users need to find. Reason: - Performance bugfix only; no new user-facing feature or discoverable workflow. ## Docs and release impact - [x] No docs changes needed - [ ] Updated `README.md` - [ ] Updated `CONTRIBUTING.md` - [ ] Updated `docs/developer/` - [ ] Updated repo skills or `AGENTS.md` - [x] Confirmed this PR does not restore old staging/package-workspace/release claims ## UI evidence Not captured; this is a perf/image-delivery fix with local command validation. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:15:52 +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#5389
No description provided.