mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #1604] Chat-list character avatars 404 (asset.localhost path has no avatars directory) #830
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#830
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Romuromylus on GitHub (May 29, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1604
Originally assigned to: @Promansis on GitHub.
Summary
Character avatars in the chat list (Convo / RP / GM) render broken. The avatar
<img>resolves to a Tauri asset-protocol URL likehttp://asset.localhost/<...>/com.marinara-engine.app/avatars/<uuid>.png, but the request returns HTTP 404, sonaturalWidthis 0 and a broken-image fragment shows instead of the portrait.Evidence (refactor HEAD,
pnpm tauri dev, Windows)RecentChats.tsxrenders<img src={characterAvatarUrl(char)} style={getAvatarCropStyle(...)}>. The resolved src for an affected character is e.g.http://asset.localhost/C:\Users\<user>\AppData\Roaming\com.marinara-engine.app\avatars\<uuid>.png.fetch()of that URL returnsstatus=404; the<img>reportscomplete=true,naturalWidth=0.%APPDATA%\com.marinara-engine.app\containsbackgrounds,data,fonts,game-assetsbut noavatars/directory, while ~30 character records referenceavatars/<uuid>.png.getAvatarCropStyleemits a normal100% × 119.79%), and game-mode sprites + bundled icons load fine. Only theasset.localhostcharacter-avatar files 404.Two parts
RecentChats.tsxrenders the<img>wheneveravatarUrlis truthy, with noonErrorfallback. A 404/missing avatar should fall back to the name-initial placeholder (already implemented for the no-avatar case) instead of showing a broken image. This is worth fixing regardless of why the file is missing.avatars/dir, or the write path and read path disagree. Read path:src/features/catalog/characters/lib/character-avatar-url.ts->src/shared/api/local-file-api(asset protocol). Write path:src-tauri/src/commands/storage/avatars.rs. Avatar loading was last touched by #1590.Impact
Every character avatar whose file is absent from
avatars/renders as a broken image across the chat list (and anywherecharacterAvatarUrlis used), rather than degrading to the initial.