[PR #1634] [MERGED] Fall back when recent chat avatar fails #5166

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/1634
Author: @Promansis
Created: 5/30/2026
Status: ✅ Merged
Merged: 5/30/2026
Merged by: @Promansis

Base: refactor ← Head: fix/issue-1604-avatar-404


📝 Commits (1)

  • 97ccff4 Fall back when recent chat avatar fails

📊 Changes

1 file changed (+35 additions, -14 deletions)

View changed files

📝 src/features/modes/router/components/RecentChats.tsx (+35 -14)

📄 Description

Linked issue

Closes #1604

Why this change

Recent chat chips rendered a broken image fragment when a character had a persisted avatar URL but the asset file returned 404. The no-avatar initial fallback already existed, but the component only used it when avatarUrl was missing, not when image loading failed.

What changed

  • Added a focused RecentChatAvatar renderer for recent-chat chips.
  • Tracks image load failure and swaps to the existing name-initial fallback.
  • Resets the failed state when the avatar URL changes so newly resolved avatars can render normally.

Refactor impact

Primary owner:

  • Mode router UI / recent chat home surface.

Impact areas reviewed:

  • Recent chat chip avatar rendering.
  • Character avatar URL resolution remains unchanged.
  • Avatar persistence and Tauri asset serving are not changed by this PR.

Boundary notes:

  • Feature UI only; no engine, shared API, Rust, or remote-runtime boundary changes.

Pressure points touched:

  • src/features/modes/router/components/RecentChats.tsx

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

  • pnpm typecheck
  • Code-path review: a truthy avatar URL still renders <img>, onError sets the failed state, and the component reuses the same initial fallback used for no-avatar characters. The failed state resets when avatar.avatarUrl changes.

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 narrow broken-image fallback in the recent-chat chip and was verified by typecheck plus code-path review.


🔄 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/1634 **Author:** [@Promansis](https://github.com/Promansis) **Created:** 5/30/2026 **Status:** ✅ Merged **Merged:** 5/30/2026 **Merged by:** [@Promansis](https://github.com/Promansis) **Base:** `refactor` ← **Head:** `fix/issue-1604-avatar-404` --- ### 📝 Commits (1) - [`97ccff4`](https://github.com/Pasta-Devs/Marinara-Engine/commit/97ccff4acdf028f3a76982f5444d1a485d2e126f) Fall back when recent chat avatar fails ### 📊 Changes **1 file changed** (+35 additions, -14 deletions) <details> <summary>View changed files</summary> 📝 `src/features/modes/router/components/RecentChats.tsx` (+35 -14) </details> ### 📄 Description ## Linked issue Closes #1604 ## Why this change Recent chat chips rendered a broken image fragment when a character had a persisted avatar URL but the asset file returned 404. The no-avatar initial fallback already existed, but the component only used it when `avatarUrl` was missing, not when image loading failed. ## What changed - Added a focused `RecentChatAvatar` renderer for recent-chat chips. - Tracks image load failure and swaps to the existing name-initial fallback. - Resets the failed state when the avatar URL changes so newly resolved avatars can render normally. ## Refactor impact Primary owner: - Mode router UI / recent chat home surface. Impact areas reviewed: - Recent chat chip avatar rendering. - Character avatar URL resolution remains unchanged. - Avatar persistence and Tauri asset serving are not changed by this PR. Boundary notes: - Feature UI only; no engine, shared API, Rust, or remote-runtime boundary changes. Pressure points touched: - `src/features/modes/router/components/RecentChats.tsx` ## Validation - [ ] `pnpm check` passes locally - [x] `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 - `pnpm typecheck` - Code-path review: a truthy avatar URL still renders `<img>`, `onError` sets the failed state, and the component reuses the same initial fallback used for no-avatar characters. The failed state resets when `avatar.avatarUrl` changes. ## Docs and release impact - [x] 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 narrow broken-image fallback in the recent-chat chip and was verified by typecheck plus code-path review. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:13:53 +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#5166
No description provided.