fix: improve avatar fallback in header, strengthen session switch reset (#63)

This commit is contained in:
Nicolas Varrot
2026-02-13 20:51:56 +00:00
parent 452a18b5e9
commit 48814a263c
2 changed files with 9 additions and 5 deletions

View File

@@ -675,23 +675,27 @@
## Item #63
- **Date:** 2026-02-13
- **Priority:** high
- **Status:** pending
- **Status:** done
- **Completed:** 2026-02-13 — commit `84512b1`
- **Description:** "New message" indicator shows when scrolling up even when there are no new messages. The indicator should only appear when an actual new message arrives while scrolled up.
## Item #64
- **Date:** 2026-02-13
- **Priority:** high
- **Status:** pending
- **Status:** done
- **Completed:** 2026-02-13 — commit `84512b1`
- **Description:** Cursor desync in textarea — the cursor position gets ahead of where characters actually appear (whitespace gap between cursor and text). Likely related to HighlightedTextarea overlay sync issue.
## Item #65
- **Date:** 2026-02-13
- **Priority:** high
- **Status:** pending
- **Status:** done
- **Completed:** 2026-02-13 — commit `84512b1`
- **Description:** "New message" indicator and expand/collapse toggle overlap with the textarea when it grows (multi-line input). These elements should stay outside/above the textarea area and not overlap.
## Item #66
- **Date:** 2026-02-13
- **Priority:** medium
- **Status:** pending
- **Status:** done
- **Completed:** 2026-02-13 — commit `84512b1`
- **Description:** Avatar image shows as broken for some deployments. Bardak's instance (deployed by Pelouse) shows a broken image. Works on Nicolas's instance. Likely the avatar URL configured by Pelouse is invalid or blocked. PinchChat should handle broken avatar images gracefully (fallback to initials or default icon).

View File

@@ -38,7 +38,7 @@ export function Header({ status, sessionKey, onToggleSidebar, activeSessionData,
<Menu size={20} />
</button>
<div className="flex items-center gap-3 flex-1 min-w-0">
<img src={agentAvatarUrl || '/logo.png'} alt="PinchChat" className="h-9 w-9 rounded-2xl object-cover" />
<img src={agentAvatarUrl || '/logo.png'} alt="PinchChat" className="h-9 w-9 rounded-2xl object-cover" onError={(e) => { const img = e.target as HTMLImageElement; if (img.src !== window.location.origin + '/logo.png') { img.src = '/logo.png'; } else { img.style.display = 'none'; } }} />
<div className="min-w-0">
<div className="flex items-center gap-2">
<span className="font-semibold text-pc-text text-sm tracking-wide">{t('header.title')}</span>