feat(kb-ui): lift search + collection load-more into the lib #2

Merged
jules merged 2 commits from feat/kb-lib-search into fix/kb-ui-p0 2026-07-09 12:15:34 +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}