fix(presentation): show a support reference on failure screens (08-07)
Route render, unrecovered chunk and query failure screens now show the id a user quotes to support, and the render diagnostic records the same id as correlation_id. The route failure page also offers a reload. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
f17572a4be
commit
b7fc7e53ce
@@ -57,6 +57,8 @@ export type TerminalErrorSurfaceProps = Readonly<{
|
||||
onAction?: () => void;
|
||||
/** Read before the action, inside the same alert. */
|
||||
description?: string;
|
||||
/** 08-07. The id a user quotes to support, e.g. `AppFailure.requestId`. */
|
||||
supportReference?: string;
|
||||
}>;
|
||||
|
||||
export function TerminalErrorSurface({
|
||||
@@ -64,6 +66,7 @@ export function TerminalErrorSurface({
|
||||
action,
|
||||
onAction,
|
||||
description,
|
||||
supportReference,
|
||||
}: TerminalErrorSurfaceProps) {
|
||||
const { locale, message } = useLocale();
|
||||
const messageId = useId();
|
||||
@@ -88,6 +91,13 @@ export function TerminalErrorSurface({
|
||||
{action !== "none" && onAction && (
|
||||
<Button onClick={onAction}>{actionLabels[action]}</Button>
|
||||
)}
|
||||
{supportReference ? (
|
||||
<p>
|
||||
{message("template.supportReference", {
|
||||
reference: supportReference,
|
||||
})}
|
||||
</p>
|
||||
) : null}
|
||||
</section>
|
||||
);
|
||||
}
|
||||
@@ -130,6 +140,7 @@ export function AsyncSurface({
|
||||
? onRetry ?? onAction
|
||||
: onAction
|
||||
}
|
||||
supportReference={state.failure.requestId}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user