Merge pull request 'fix(activities): surface statsError on the door-scanner page' (#89) from fix/scanner-stats-error-banner into dev

Reviewed-on: #89
This commit is contained in:
padreug 2026-06-04 09:49:39 +00:00
commit ca3ad434d3

View file

@ -31,6 +31,7 @@ const {
lastScan,
eventStats,
statsLoading,
statsError,
refreshStats,
onDecode,
resume,
@ -137,6 +138,22 @@ function fmtTime(iso: string) {
</div>
</div>
<!-- Surface stats fetch failures (e.g. backend missing the /stats
endpoint, or wallet ownership rejected). Without this the
counts strip silently freezes on the last good value while
scans keep landing on the backend. -->
<div
v-if="statsError"
class="mb-4 flex items-start gap-2 rounded-md border border-destructive/40 bg-destructive/10 p-3 text-xs text-destructive"
role="alert"
>
<AlertCircle class="w-4 h-4 mt-0.5 shrink-0" />
<div class="min-w-0">
<p class="font-medium">Counts may be out of date</p>
<p class="text-destructive/80 mt-0.5 break-words">{{ statsError }}</p>
</div>
</div>
<Tabs v-model="activeTab" class="w-full">
<TabsList class="grid w-full grid-cols-2 mb-4">
<TabsTrigger value="scanner" class="gap-1.5">