fix(kb-ui): P0 correctness — TextReader race/errors, outline nav, claims drop, object load-more #1

Merged
jules merged 3 commits from fix/kb-ui-p0 into main 2026-07-09 12:16:12 +00:00
Showing only changes of commit 03443590a2 - Show all commits

View File

@@ -117,7 +117,16 @@ const SENSITIVITY: Record<Sensitivity, { label: string; tone: string; icon: Reac
};
export const SensitivityBadge: FC<{ level: Sensitivity; className?: string }> = ({ level, className }) => {
const s = SENSITIVITY[level];
// A row can arrive without a sensitivity (e.g. a claim/note, or older data);
// fall back to a neutral badge rather than crash — and never default an
// unknown value to "Open", which would misstate its exposure.
const s =
SENSITIVITY[level] ?? {
label: level ?? "—",
tone: "bg-muted text-muted-foreground",
icon: null,
title: "Sensitivity not set.",
};
return (
<Badge tone={s.tone} icon={s.icon} className={className} title={s.title}>
{s.label}