[PR #1167] [MERGED] [codex] Avoid lazy loading local character avatars #4953

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/1167
Author: @ghost
Created: 5/24/2026
Status: ✅ Merged
Merged: 5/25/2026
Merged by: @cha1latte

Base: refactor ← Head: fix/refactor-pr-53-local-avatar-loading


📝 Commits (2)

  • c930b3b Migrate Refactor PR #53: Avoid lazy loading local avatars
  • 07c3036 Merge refactor into PR 1167

📊 Changes

2 files changed (+9 additions, -1 deletions)

View changed files

📝 src/features/catalog/characters/components/CharacterAvatarImage.tsx (+2 -1)
➕ src/features/catalog/characters/lib/character-avatar-loading.ts (+7 -0)

📄 Description

Migrated from Pasta-Devs/Marinara-Engine-Refactor#53: https://github.com/Pasta-Devs/Marinara-Engine-Refactor/pull/53
Original author: @Promansis
Target base: Pasta-Devs/Marinara-Engine refactor

Linked issue

N/A - migrated refactor PR; no matching avatar-loading issue found in this repo.

Why this change

Importing multiple PNG character cards can immediately refresh character avatar thumbnails with local inline image data. Those thumbnails were marked for lazy loading, which can produce browser console warnings around load timing even though the image source is already local to the app.

What changed

  • Added a characters-owned avatar loading helper that keeps data: and blob: avatar sources eager while preserving lazy loading for normal URLs.
  • Applied the helper through the shared CharacterAvatarImage component so current character avatar surfaces inherit the behavior.

Refactor impact

Primary owner:

Catalog characters / React UI.

Impact areas reviewed:

  • Character avatar rendering
  • Character Library avatar cards
  • Character panel/group avatar usage

Boundary notes:

The change stays in feature/catalog character UI code. It does not touch engine, storage, shared API, Rust, prompt assembly, imports, or remote runtime boundaries.

Pressure points touched:

None.

Validation

  • pnpm check passes locally
  • pnpm typecheck passes locally
  • pnpm build passes locally
  • pnpm check:architecture passes locally
  • pnpm check:docs passes locally
  • cargo check --manifest-path src-tauri/Cargo.toml --workspace passes locally
  • Rust clippy/tests were run for Rust behavior changes
  • Browser or Tauri app manual verification completed
  • Playwright, screenshot, or recording evidence added for UI changes
  • Remote runtime smoke checked when relevant

Manual verification notes

Codex ran pnpm check locally after resolving the refactor conflict. GitHub CI passed Frontend/Architecture/Organization, Browser Smoke and Performance, and Rust Capability Layer on commit 07c30364. CodeRabbit completed with no actionable comments.

A human can optionally smoke-test the original console-warning path by importing multiple PNG character cards in the Tauri app with devtools open and confirming local avatar render does not emit the lazy-loading warning.

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

No screenshot attached; this is a browser loading-attribute behavior change for local character avatar rendering.


🔄 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/1167 **Author:** [@ghost](https://github.com/ghost) **Created:** 5/24/2026 **Status:** ✅ Merged **Merged:** 5/25/2026 **Merged by:** [@cha1latte](https://github.com/cha1latte) **Base:** `refactor` ← **Head:** `fix/refactor-pr-53-local-avatar-loading` --- ### 📝 Commits (2) - [`c930b3b`](https://github.com/Pasta-Devs/Marinara-Engine/commit/c930b3bcaa63acf133e8da381bdaa45fc5c34b45) Migrate Refactor PR #53: Avoid lazy loading local avatars - [`07c3036`](https://github.com/Pasta-Devs/Marinara-Engine/commit/07c303647866287e7fb539caee669fc3d7608d7b) Merge refactor into PR 1167 ### 📊 Changes **2 files changed** (+9 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/features/catalog/characters/components/CharacterAvatarImage.tsx` (+2 -1) ➕ `src/features/catalog/characters/lib/character-avatar-loading.ts` (+7 -0) </details> ### 📄 Description Migrated from Pasta-Devs/Marinara-Engine-Refactor#53: https://github.com/Pasta-Devs/Marinara-Engine-Refactor/pull/53 Original author: @Promansis Target base: Pasta-Devs/Marinara-Engine refactor ## Linked issue N/A - migrated refactor PR; no matching avatar-loading issue found in this repo. ## Why this change Importing multiple PNG character cards can immediately refresh character avatar thumbnails with local inline image data. Those thumbnails were marked for lazy loading, which can produce browser console warnings around load timing even though the image source is already local to the app. ## What changed - Added a characters-owned avatar loading helper that keeps `data:` and `blob:` avatar sources eager while preserving lazy loading for normal URLs. - Applied the helper through the shared `CharacterAvatarImage` component so current character avatar surfaces inherit the behavior. ## Refactor impact Primary owner: Catalog characters / React UI. Impact areas reviewed: - Character avatar rendering - Character Library avatar cards - Character panel/group avatar usage Boundary notes: The change stays in feature/catalog character UI code. It does not touch engine, storage, shared API, Rust, prompt assembly, imports, or remote runtime boundaries. Pressure points touched: None. ## Validation - [ ] `pnpm check` passes locally - [ ] `pnpm typecheck` passes locally - [ ] `pnpm build` passes locally - [ ] `pnpm check:architecture` passes locally - [ ] `pnpm check:docs` passes locally - [ ] `cargo check --manifest-path src-tauri/Cargo.toml --workspace` passes locally - [ ] Rust clippy/tests were run for Rust behavior changes - [ ] Browser or Tauri app manual verification completed - [ ] Playwright, screenshot, or recording evidence added for UI changes - [ ] Remote runtime smoke checked when relevant ### Manual verification notes Codex ran `pnpm check` locally after resolving the refactor conflict. GitHub CI passed Frontend/Architecture/Organization, Browser Smoke and Performance, and Rust Capability Layer on commit `07c30364`. CodeRabbit completed with no actionable comments. A human can optionally smoke-test the original console-warning path by importing multiple PNG character cards in the Tauri app with devtools open and confirming local avatar render does not emit the lazy-loading warning. ## 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 No screenshot attached; this is a browser loading-attribute behavior change for local character avatar rendering. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:11:58 +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#4953
No description provided.