PEP-78: the action error stays in view while the page is scrolled

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
Асель 2026-11-14 20:02:16 +05:00
parent 5473470aa2
commit 335b8b159e

View File

@ -62,7 +62,8 @@ export function StatusBadge({ status, kind = "task" }: { status: string; kind?:
export function Flash({ error }: { error?: string }) {
return error ? (
<p role="alert" className="mb-4 flex items-start gap-2 rounded-lg border border-destructive/40 bg-destructive/10 px-4 py-3 text-sm text-foreground">
// Sticky: an action far down the page (a board card, «Принять») must not fail silently above the fold.
<p role="alert" className="sticky top-2 z-40 mb-4 flex items-start gap-2 rounded-lg border border-destructive/60 bg-[color-mix(in_oklab,var(--destructive)_14%,var(--background))] px-4 py-3 text-sm text-foreground shadow-lg">
<CircleAlert className="mt-0.5 size-4 shrink-0 text-destructive" />
<span>{error}</span>
</p>