mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-10 13:22:14 +00:00
fix(ui): draw every failed read through a read-failure primitive
Around thirty surfaces drew a failed read their own way: a bare destructive paragraph with no retry, a muted line saying the data was still being learned, a skeleton that never ended, an error card nested in a tile, or nothing at all. None of them told an ended session from a refusal. They now use QueryErrorRow or QueryErrorCard with the query's error and a retry, inset where a card already frames them, and keep their card and title where the page would otherwise jump. Hydration and caffeine now fail the same way. The recovery page no longer points to Integrations while Oura's first resilience level is simply on its way. A guard reads every read hook's isError branch and refuses hand-rolled markup there, and refuses a framed error row inside a card.
This commit is contained in:
1 parent
a1b56f0b75
commit
923249dbf6
60 files changed
+579
-175
No files matched your search
@@ -103,6 +103,7 @@ import {
|
||||
useSuggestDetails,
|
||||
} from "./use-document-assist";
|
||||
import { formatBytes } from "./vault-utils";
|
||||
import { QueryErrorRow } from "@/components/ui/query-error-row";
|
||||
|
||||
type PatchInput = {
|
||||
title?: string | null;
|
||||
@@ -895,9 +896,13 @@ export function DocumentDetailSheet({
|
||||
) : null}
|
||||
|
||||
{detail.isError ? (
|
||||
<p role="alert" className="text-destructive text-sm">
|
||||
{t("documents.detail.loadError")}
|
||||
</p>
|
||||
<QueryErrorRow
|
||||
inset
|
||||
error={detail.error}
|
||||
slot="document-detail-error"
|
||||
message={t("documents.detail.loadError")}
|
||||
onRetry={() => void detail.refetch()}
|
||||
/>
|
||||
) : null}
|
||||
|
||||
{doc ? (
|
||||
|
||||
Reference in new issue
Block a user