Embedding Drift Banner
A warning shown when the active embedding model is incompatible with stored vectors — with reindex progress, phase, and Re-embed/Cancel.
Embedding Drift Banner
The Embedding Drift Banner is a warning panel shown when the active embedding model is incompatible with vectors already stored (the model changed or dimensions mismatch). It explains the stored-vs-current model ids, shows a reindex progress bar + phase label while re-embedding, and offers "Re-embed All" / Cancel. Bind to useReindex + your compatibility check.
Preview
Installation
pnpm dlx shadcn@latest add @localmode/ui/local-first/embedding-drift-bannernpx shadcn@latest add @localmode/ui/local-first/embedding-drift-banneryarn dlx shadcn@latest add @localmode/ui/local-first/embedding-drift-bannerbunx --bun shadcn@latest add @localmode/ui/local-first/embedding-drift-bannerData source & dependencies
Data source: renders the drift/reindex state you pass and emits Re-embed/Cancel — works with any backend. Recommended producer: useReindex from @localmode/react (on-device, optional).
lucide-react— iconsclsx+tailwind-merge— via the sharedcn()util (installed automatically as a registry dependency)
Files installed
embedding-drift-banner.tsx— theEmbeddingDriftBannercomponentlib/utils.ts— thecn()helper (if not already present)
Props
EmbeddingDriftBanner
Prop
Type
ReindexProgressLike
Prop
Type
Examples
Bound to useReindex
const { isReindexing, progress, reindex, cancel } = useReindex({ db, model });
<EmbeddingDriftBanner
storedModelId={stored}
currentModelId={current}
isReindexing={isReindexing}
progress={progress}
onReindex={reindex}
onCancel={cancel}
/>Customization
The banner uses the amber palette to read as a warning. The phase label maps useReindex phases (embedding / indexing) to human strings in PHASE_LABEL. Styled entirely with shadcn/ui CSS-variable utilities so it inherits your theme — because you own the copied file, every class and threshold is yours to change.
Vector Storage Observability
VectorDB observability: a compression-stats badge, a three-tier storage estimate (Raw/SQ8/PQ), and a GPU-aware search-latency badge.
Vector Export Panel
An export surface for vector data: per-format export actions, corpus counts, a busy state, and a last-export summary banner.