Skip to content

Beautiful, AI-native markdown IDE and LLM wiki

feat(ok): route loading spinners through a Spinner primitive (PRD-7876) (#3367)

Andrew Mikofalvyd1d4a1f9c3d8
diff --git a/biome-plugins/no-hand-rolled-spinner.grit b/biome-plugins/no-hand-rolled-spinner.grit
new file mode 100644
index 000000000..6b773cbc7
--- /dev/null
+++ b/biome-plugins/no-hand-rolled-spinner.grit
@@ -0,0 +1,36 @@
+// no-hand-rolled-spinner — loading spinners come from the Spinner primitive, so
+// reduced-motion support and the accessible name are inherited rather than
+// remembered per call site.
+//
+// `animate-spin` applied by hand spins through `prefers-reduced-motion` (a
+// vestibular trigger) and carries no role or label unless the author adds them.
+// `Spinner` bakes in `motion-reduce:animate-none`, `role="status"`, and a
+// localized `aria-label`; pass `icon` when the glyph shape carries meaning
+// (RefreshCw for syncing, Undo2 for reverting) and `aria-hidden="true"` when a
+// wrapper or enclosing control already names the loading state.
+//
+// Suppress a legitimately non-Spinner spin (a decorative flourish, a non-loading
+// rotation) with:
+// // biome-ignore lint/plugin/no-hand-rolled-spinner: <reason>
+// placed on the line above the class attribute (the attribute must be on its own
+// line — Biome has no slot for a comment between attributes on one line).
+//
+// See PRECEDENTS.md #42 (custom Biome enforcement is GritQL plugins).
+
+language js
+
+// Matches `className` and every `*ClassName` prop in one predicate. `$value` is
+// the whole initializer clause, so `className={cn('size-4 animate-spin', x)}`
+// and a plain string both land in the same branch.
+//
+// GritQL regex matches the ENTIRE node text, so `.*` brackets a substring and
+// `(?s)` lets `.` cross newlines. Capturing groups silently never match in
+// Biome's dialect, hence `(?:…)` throughout.
+jsx_attribute($name, $value) where {
+ $name <: r"(?s).*lassName",
+ $value <: r"(?s).*\banimate-spin\b.*",
+ register_diagnostic(
+ span = $value,
+ message = "Hand-rolled loading spinner. Use `<Spinner />` from `@/components/ui/spinner` so reduced motion and the accessible name come for free — pass `icon` to keep a meaningful glyph, `aria-hidden` when a wrapper already announces the state. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-hand-rolled-spinnergrit"
+ )
+}
diff --git a/biome.jsonc b/biome.jsonc
index baf12288b..0510dcaf0 100644
--- a/biome.jsonc
+++ b/biome.jsonc
@@ -2,6 +2,7 @@
"$schema": "https://biomejs.dev/schemas/2.4.15/schema.json",
"plugins": [
"./biome-plugins/microcopy-ellipsis.grit",
+ "./biome-plugins/no-hand-rolled-spinner.grit",
"./biome-plugins/no-loosely-typed-webcontents-ipc.grit",
"./biome-plugins/no-resolved-value-theme-source.grit",
"./biome-plugins/no-split-suggestion-dispatch.grit",
diff --git a/packages/app/src/components/ActivityModeContent.tsx b/packages/app/src/components/ActivityModeContent.tsx
index 5c9731d0e..d15924eb7 100644
--- a/packages/app/src/components/ActivityModeContent.tsx
+++ b/packages/app/src/components/ActivityModeContent.tsx
@@ -23,11 +23,12 @@
import { t } from '@lingui/core/macro';
import { Plural, Trans, useLingui } from '@lingui/react/macro';
-import { AlertCircle, ArrowLeft, Loader2 } from 'lucide-react';
+import { AlertCircle, ArrowLeft } from 'lucide-react';
import { useEffect, useState } from 'react';
import { toast } from 'sonner';
import { withLargeFileOpenGuard } from '@/components/navigation-targets';
import { usePageList } from '@/components/PageListContext';
+import { Spinner } from '@/components/ui/spinner';
import { useDocumentContext, useDocumentTransition } from '@/editor/DocumentContext';
import { openAgentDiff, setAgentDiffMax } from '@/lib/agent-diff-store';
import { closeTimelineDiff } from '@/lib/timeline-diff-store';
@@ -92,7 +93,7 @@ function LoadingState(): React.JSX.Element {
role="status"
aria-busy="true"
>
- <Loader2 className="mr-2 size-4 animate-spin" aria-hidden="true" />
+ <Spinner className="mr-2 size-4" aria-hidden="true" />
<span className="text-sm">
<Trans>Loading agent activity</Trans>
</span>
diff --git a/packages/app/src/components/ActivityPanelBurstRow.tsx b/packages/app/src/components/ActivityPanelBurstRow.tsx
index 2e7587995..21e5faafb 100644
--- a/packages/app/src/components/ActivityPanelBurstRow.tsx
+++ b/packages/app/src/components/ActivityPanelBurstRow.tsx
@@ -14,7 +14,7 @@
import { t } from '@lingui/core/macro';
import { Plural, Trans, useLingui } from '@lingui/react/macro';
-import { Loader2, Undo2 } from 'lucide-react';
+import { Undo2 } from 'lucide-react';
import { useEffect, useState } from 'react';
import { Button } from '@/components/ui/button';
import {
@@ -25,6 +25,7 @@ import {
DialogHeader,
DialogTitle,
} from '@/components/ui/dialog';
+import { Spinner } from '@/components/ui/spinner';
import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';
import { useAgentDiffView } from '@/lib/agent-diff-store';
import type { BurstData } from '@/lib/use-activity-panel';
@@ -131,7 +132,7 @@ export function ActivityPanelBurstRow({
onClick={() => setDialogOpen(true)}
>
{inFlight ? (
- <Loader2 className="size-3 animate-spin" aria-hidden="true" />
+ <Spinner className="size-3" aria-hidden="true" />
) : (
<Undo2 className="size-3" aria-hidden="true" />
)}
@@ -179,9 +180,7 @@ export function ActivityPanelBurstRow({
disabled={inFlight}
onClick={commitRestore}
>
- {inFlight ? (
- <Loader2 className="mr-2 size-4 animate-spin" aria-hidden="true" />
- ) : null}
+ {inFlight ? <Spinner className="mr-2 size-4" aria-hidden="true" /> : null}
<Trans>Undo</Trans>
</Button>
</DialogFooter>
diff --git a/packages/app/src/components/AgentDiffPane.tsx b/packages/app/src/components/AgentDiffPane.tsx
index 519cc89c1..4e09bda40 100644
--- a/packages/app/src/components/AgentDiffPane.tsx
+++ b/packages/app/src/components/AgentDiffPane.tsx
@@ -15,10 +15,11 @@
// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit
import { Trans, useLingui } from '@lingui/react/macro';
-import { Loader2, PanelRightClose, PanelRightOpen, X } from 'lucide-react';
+import { PanelRightClose, PanelRightOpen, X } from 'lucide-react';
import { lazy, Suspense, useEffect, useRef, useState } from 'react';
import { computeRenderedDiff, RenderedDiffView } from '@/components/RenderedDiffView';
import { Button } from '@/components/ui/button';
+import { Spinner } from '@/components/ui/spinner';
import { ToggleGroup, ToggleGroupItem } from '@/components/ui/toggle-group';
import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';
import { type AgentDiffView, closeAgentDiff, setAgentDiffKept } from '@/lib/agent-diff-store';
@@ -312,7 +313,7 @@ export function AgentDiffPane({ view, isPanelCollapsed, onTogglePanel }: AgentDi
<div ref={diffBodyRef} className="min-h-0 flex-1 overflow-auto subtle-scrollbar">
{result.status === 'loading' && (
<div className="flex items-center gap-2 px-4 py-3 text-xs text-muted-foreground">
- <Loader2 className="size-3 animate-spin" />
+ <Spinner aria-hidden="true" className="size-3" />
<Trans>Loading diff</Trans>
</div>
)}
@@ -346,7 +347,7 @@ export function AgentDiffPane({ view, isPanelCollapsed, onTogglePanel }: AgentDi
<Suspense
fallback={
<div className="flex items-center gap-2 px-4 py-3 text-xs text-muted-foreground">
- <Loader2 className="size-3 animate-spin" />
+ <Spinner aria-hidden="true" className="size-3" />
<Trans>Loading diff renderer</Trans>
</div>
}
diff --git a/packages/app/src/components/BottomComposer.tsx b/packages/app/src/components/BottomComposer.tsx
index 27ac54414..4225d93cc 100644
--- a/packages/app/src/components/BottomComposer.tsx
+++ b/packages/app/src/components/BottomComposer.tsx
@@ -29,7 +29,7 @@
import { type TargetData, TERMINAL_CLIS, type TerminalCli } from '@inkeep/open-knowledge-core';
import { Trans, useLingui } from '@lingui/react/macro';
-import { ChevronDown, Loader2, TextQuote, X } from 'lucide-react';
+import { ChevronDown, TextQuote, X } from 'lucide-react';
import { type ReactNode, useEffect, useRef, useState } from 'react';
import { toast } from 'sonner';
import {
@@ -60,6 +60,7 @@ import {
} from '@/components/handoff/useHandoffDispatch';
import { useInstalledAgents } from '@/components/handoff/useInstalledAgents';
import { Button } from '@/components/ui/button';
+import { Spinner } from '@/components/ui/spinner';
import { getEditorForDoc } from '@/editor/active-editor';
import {
ComposerMentionInput,
@@ -1169,7 +1170,7 @@ export function BottomComposer({
<Trans>Ask</Trans>
)}
</span>
- {pending ? <Loader2 className="size-3.5 animate-spin" aria-hidden /> : null}
+ {pending ? <Spinner className="size-3.5" aria-hidden /> : null}
</>
}
onPrimary={submit}
diff --git a/packages/app/src/components/BugReportHistory.tsx b/packages/app/src/components/BugReportHistory.tsx
index e648c833c..2ffc39e9e 100644
--- a/packages/app/src/components/BugReportHistory.tsx
+++ b/packages/app/src/components/BugReportHistory.tsx
@@ -18,11 +18,12 @@
import type { OkBugReportListRow } from '@inkeep/open-knowledge-core';
import { Trans, useLingui } from '@lingui/react/macro';
-import { ChevronDownIcon, FolderOpenIcon, Loader2, RotateCwIcon, Trash2Icon } from 'lucide-react';
+import { ChevronDownIcon, FolderOpenIcon, RotateCwIcon, Trash2Icon } from 'lucide-react';
import { useEffect, useState } from 'react';
import { Badge } from '@/components/ui/badge';
import { Button } from '@/components/ui/button';
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '@/components/ui/collapsible';
+import { Spinner } from '@/components/ui/spinner';
type PendingAction = 'retrying' | 'deleting';
type HistoryStatus = 'loading' | 'ready' | 'error';
@@ -211,7 +212,7 @@ function ReportRow({
{row.retryable ? (
<Button variant="outline" size="xs" disabled={busy} onClick={() => onRetry(row)}>
{pending === 'retrying' ? (
- <Loader2 className="animate-spin motion-reduce:animate-none" aria-hidden="true" />
+ <Spinner aria-hidden="true" />
) : (
<RotateCwIcon aria-hidden="true" />
)}
@@ -237,7 +238,7 @@ function ReportRow({
onClick={() => onDelete(row)}
>
{pending === 'deleting' ? (
- <Loader2 className="animate-spin motion-reduce:animate-none" aria-hidden="true" />
+ <Spinner aria-hidden="true" />
) : (
<Trash2Icon aria-hidden="true" />
)}
@@ -281,7 +282,7 @@ export function BugReportHistoryList({ onReportABug }: { onReportABug?: () => vo
if (history.status === 'loading') {
return (
<div role="status" className="flex items-center gap-2.5 py-6 text-sm text-muted-foreground">
- <Loader2 className="size-4 animate-spin motion-reduce:animate-none" aria-hidden="true" />
+ <Spinner className="size-4" aria-hidden="true" />
<Trans>Loading your reports</Trans>
</div>
);
diff --git a/packages/app/src/components/CommandPalette.tsx b/packages/app/src/components/CommandPalette.tsx
index 5e3120402..f113ac7ea 100644
--- a/packages/app/src/components/CommandPalette.tsx
+++ b/packages/app/src/components/CommandPalette.tsx
@@ -14,7 +14,7 @@
import type { WorktreeSelectorEntry } from '@inkeep/open-knowledge-core';
import { Plural, Trans, useLingui } from '@lingui/react/macro';
-import { Check, FileText, Folder, GitBranch, Hash, Loader2, Sparkles } from 'lucide-react';
+import { Check, FileText, Folder, GitBranch, Hash, Sparkles } from 'lucide-react';
import {
type Dispatch,
lazy,
@@ -79,6 +79,7 @@ import {
CommandShortcut,
} from '@/components/ui/command';
import { Kbd } from '@/components/ui/kbd';
+import { Spinner } from '@/components/ui/spinner';
import { useDocumentContext } from '@/editor/DocumentContext';
import type { TagSummaryEntry } from '@/editor/extensions/tag-suggestion';
import { useCreateBlankSkill } from '@/hooks/use-create-blank-skill';
@@ -1222,7 +1223,7 @@ export function CommandPalette({ bridge = null, open, onOpenChange }: CommandPal
aria-live="polite"
data-testid="command-palette-semantic-indexing"
>
- <Loader2 className="size-3.5 animate-spin" />
+ <Spinner aria-hidden="true" className="size-3.5" />
<Trans>
Indexing your pages — {semanticIndexedCount} of {semanticTotalCount} ready.
Results may be incomplete.
@@ -1276,7 +1277,7 @@ export function CommandPalette({ bridge = null, open, onOpenChange }: CommandPal
aria-live="polite"
data-testid="command-palette-semantic-searching"
>
- <Loader2 className="size-4 animate-spin" />
+ <Spinner aria-hidden="true" className="size-4" />
<Trans>Searching by meaning</Trans>
</div>
) : null}
@@ -1321,7 +1322,7 @@ export function CommandPalette({ bridge = null, open, onOpenChange }: CommandPal
aria-live="polite"
data-testid="command-palette-search-preparing"
>
- <Loader2 className="size-4 animate-spin" />
+ <Spinner aria-hidden="true" className="size-4" />
<Trans>Preparing search</Trans>
</div>
) : null}
diff --git a/packages/app/src/components/DeleteConfirmationDialog.tsx b/packages/app/src/components/DeleteConfirmationDialog.tsx
index 551d8e501..2e793a12f 100644
--- a/packages/app/src/components/DeleteConfirmationDialog.tsx
+++ b/packages/app/src/components/DeleteConfirmationDialog.tsx
@@ -1,5 +1,4 @@
import { Trans, useLingui } from '@lingui/react/macro';
-import { Loader2 } from 'lucide-react';
import type { ReactNode } from 'react';
import { Button } from '@/components/ui/button';
import {
@@ -11,6 +10,7 @@ import {
DialogHeader,
DialogTitle,
} from '@/components/ui/dialog';
+import { Spinner } from '@/components/ui/spinner';
interface DeleteConfirmationProps {
itemName?: string;
@@ -88,7 +88,7 @@ export function DeleteConfirmationDialog({
<Button variant="destructive" onClick={onDelete} disabled={isSubmitting}>
{isSubmitting ? (
<>
- <Loader2 className="size-4 animate-spin" /> {confirmLabelBusy}
+ <Spinner aria-hidden="true" className="size-4" /> {confirmLabelBusy}
</>
) : (
confirmLabel
diff --git a/packages/app/src/components/EditorActivityPool.tsx b/packages/app/src/components/EditorActivityPool.tsx
index 2b9c049c1..0fe5bc200 100644
--- a/packages/app/src/components/EditorActivityPool.tsx
+++ b/packages/app/src/components/EditorActivityPool.tsx
@@ -41,7 +41,7 @@ import {
parseTemplateContentDocName,
} from '@inkeep/open-knowledge-core';
import { t } from '@lingui/core/macro';
-import { Loader2, RefreshCw } from 'lucide-react';
+import { RefreshCw } from 'lucide-react';
import {
Activity,
lazy,
@@ -54,6 +54,7 @@ import {
useState,
} from 'react';
import { createPortal } from 'react-dom';
+import { Spinner } from '@/components/ui/spinner';
import { type PoolEntrySnapshot, useDocumentContext } from '@/editor/DocumentContext';
import { peekRenameSnapshot, setActivityMountList } from '@/editor/editor-cache';
import { isSystemDoc } from '@/editor/is-system-doc';
@@ -1100,7 +1101,7 @@ function ServerRestartRecoveryPanel({ view }: { view: ServerRestartRecoveryView
{isFailed ? (
<RefreshCw className="size-5" aria-hidden="true" />
) : (
- <Loader2 className="size-5 animate-spin" aria-hidden="true" />
+ <Spinner className="size-5" aria-hidden="true" />
)}
</div>
<div className="flex flex-col items-center gap-1">
diff --git a/packages/app/src/components/FileTree.tsx b/packages/app/src/components/FileTree.tsx
index 9f04391b8..f71c3a8f7 100644
--- a/packages/app/src/components/FileTree.tsx
+++ b/packages/app/src/components/FileTree.tsx
@@ -182,6 +182,7 @@ import {
DropdownMenuTrigger,
} from '@/components/ui/dropdown-menu';
import { Skeleton } from '@/components/ui/skeleton';
+import { Spinner } from '@/components/ui/spinner';
import { asDirectoryHandle, useSelectionMirror } from '@/components/use-selection-mirror';
import { getEditorForDoc } from '@/editor/active-editor';
import { type OpenTargetOptions, useDocumentContext } from '@/editor/DocumentContext';
@@ -3815,7 +3816,8 @@ function FileTreeHeaderNotice({
kind: 'error' | 'info' | 'reconnecting';
children: ReactNode;
}) {
- const Icon = kind === 'error' ? TriangleAlert : kind === 'reconnecting' ? RefreshCw : Info;
+ const Icon = kind === 'error' ? TriangleAlert : Info;
+ const iconClassName = 'mt-0.5 size-3.5 shrink-0';
return (
<span
role={kind === 'error' ? 'alert' : 'status'}
@@ -3824,13 +3826,11 @@ function FileTreeHeaderNotice({
kind === 'error' ? 'text-destructive' : 'text-muted-foreground',
)}
>
- <Icon
- aria-hidden="true"
- className={cn(
- 'mt-0.5 size-3.5 shrink-0',
- kind === 'reconnecting' && 'animate-spin motion-reduce:animate-none',
- )}
- />
+ {kind === 'reconnecting' ? (
+ <Spinner aria-hidden="true" icon={RefreshCw} className={iconClassName} />
+ ) : (
+ <Icon aria-hidden="true" className={iconClassName} />
+ )}
<span className="min-w-0">{children}</span>
</span>
);
diff --git a/packages/app/src/components/ImportSkillForm.tsx b/packages/app/src/components/ImportSkillForm.tsx
index 907a9ef0e..86679d10e 100644
--- a/packages/app/src/components/ImportSkillForm.tsx
+++ b/packages/app/src/components/ImportSkillForm.tsx
@@ -2,7 +2,7 @@
import type { SkillDiscover, SkillScope } from '@inkeep/open-knowledge-core';
import { Trans, useLingui } from '@lingui/react/macro';
-import { FileArchive, Folder, GitBranch, Loader2Icon } from 'lucide-react';
+import { FileArchive, Folder, GitBranch } from 'lucide-react';
import { useEffect, useId, useRef, useState } from 'react';
import { toast } from 'sonner';
import { Button } from '@/components/ui/button';
@@ -17,6 +17,7 @@ import {
SelectTrigger,
SelectValue,
} from '@/components/ui/select';
+import { Spinner } from '@/components/ui/spinner';
import { announceSkillImport } from '@/lib/skill-import-toast';
import { SKILL_SCOPE_ORDER, useSkillScopeLabels } from '@/lib/skill-scope';
import { discoverSkillsInSource, importSkill, uploadSkill } from '@/lib/skills-api';
@@ -445,7 +446,7 @@ export function ImportSkillForm({
>
{busy ? (
<>
- <Loader2Icon className="size-4 animate-spin" />
+ <Spinner aria-hidden="true" className="size-4" />
{isUpload ? <Trans>Uploading</Trans> : <Trans>Importing</Trans>}
</>
) : isUpload ? (
diff --git a/packages/app/src/components/InstallInClaudeDesktopDialog.tsx b/packages/app/src/components/InstallInClaudeDesktopDialog.tsx
index 78ce8ad22..eb1a9b2d0 100644
--- a/packages/app/src/components/InstallInClaudeDesktopDialog.tsx
+++ b/packages/app/src/components/InstallInClaudeDesktopDialog.tsx
@@ -1,7 +1,7 @@
// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit
import { Trans, useLingui } from '@lingui/react/macro';
-import { ArrowRight, CheckCircle2, Copy, Download, Loader2, MoveUpRight } from 'lucide-react';
+import { ArrowRight, CheckCircle2, Copy, Download, MoveUpRight } from 'lucide-react';
import { useEffect, useState } from 'react';
import { toast } from 'sonner';
import { Button } from '@/components/ui/button';
@@ -14,6 +14,7 @@ import {
Dialog as DialogRoot,
DialogTitle,
} from '@/components/ui/dialog';
+import { Spinner } from '@/components/ui/spinner';
import { dispatchExternalLinkClick } from '@/lib/external-link';
import { cn } from '@/lib/utils';
@@ -294,7 +295,7 @@ export function InstallInClaudeDesktopDialog({
{/* --------- DOWNLOADING (Electron only) --------- */}
{phase.kind === 'downloading' && (
<div className="flex items-center gap-2 text-sm">
- <Loader2 aria-hidden="true" className="h-4 w-4 animate-spin" />
+ <Spinner aria-hidden="true" className="h-4 w-4" />
<Trans>
Building <InlineCode>openknowledge.skill</InlineCode> and opening the Claude
Desktop App
@@ -414,7 +415,7 @@ export function InstallInClaudeDesktopDialog({
)}
{phase.kind === 'downloading' && (
<Button disabled>
- <Loader2 aria-hidden="true" className="h-4 w-4 animate-spin" />
+ <Spinner aria-hidden="true" className="h-4 w-4" />
{reinstall ? <Trans>Reinstalling</Trans> : <Trans>Installing</Trans>}
</Button>
)}
diff --git a/packages/app/src/components/NavigatorApp.tsx b/packages/app/src/components/NavigatorApp.tsx
index d1a3a5aa9..258ee2c23 100644
--- a/packages/app/src/components/NavigatorApp.tsx
+++ b/packages/app/src/components/NavigatorApp.tsx
@@ -19,18 +19,11 @@
// biome-ignore-all lint/plugin/no-physical-direction-utility: pre-rule backlog — physical margin/padding/inset utilities predate the rule; drain by swapping ml/mr → ms/me, pl/pr → ps/pe, left/right → start/end, then deleting this line. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-physical-direction-utilitygrit
import { Trans, useLingui } from '@lingui/react/macro';
-import {
- FileText,
- Folder,
- FolderOpenIcon,
- GitBranch,
- Loader2Icon,
- PlusIcon,
- XIcon,
-} from 'lucide-react';
+import { FileText, Folder, FolderOpenIcon, GitBranch, PlusIcon, XIcon } from 'lucide-react';
import { useTheme } from 'next-themes';
import { type ComponentType, lazy, Suspense, useEffect, useState } from 'react';
import { shouldShowAppMenubar } from '@/components/app-menubar-gate';
+import { Spinner } from '@/components/ui/spinner';
import { useThemeBridge } from '@/hooks/use-theme-bridge';
import type {
OkDesktopBridge,
@@ -418,7 +411,7 @@ export function NavigatorApp({ bridge }: { bridge: OkDesktopBridge }) {
role="status"
aria-live="polite"
>
- <Loader2Icon className="size-6 animate-spin text-muted-foreground" />
+ <Spinner aria-hidden="true" className="size-6 text-muted-foreground" />
<p className="text-muted-foreground text-sm">{t`Opening ${openingLabel}…`}</p>
</div>
) : null}
@@ -507,7 +500,7 @@ export function NavigatorApp({ bridge }: { bridge: OkDesktopBridge }) {
{loading ? (
<section className="flex shrink-0 flex-col items-center">
- <Loader2Icon className="size-4 animate-spin text-muted-foreground/60" />
+ <Spinner className="size-4 text-muted-foreground/60" />
</section>
) : recents.length > 0 ? (
<section className="flex min-h-0 flex-col">
diff --git a/packages/app/src/components/PackCardGrid.tsx b/packages/app/src/components/PackCardGrid.tsx
index dda208576..41ee8dc0e 100644
--- a/packages/app/src/components/PackCardGrid.tsx
+++ b/packages/app/src/components/PackCardGrid.tsx
@@ -8,7 +8,6 @@ import {
FileCheck,
GitBranch,
Library,
- Loader2,
Network,
PenLine,
StickyNote,
@@ -16,6 +15,7 @@ import {
import { useEffect, useState } from 'react';
import { Button } from '@/components/ui/button';
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '@/components/ui/collapsible';
+import { Spinner } from '@/components/ui/spinner';
import type { OkPackId, OkSeedPackInfo } from '@/lib/desktop-bridge-types';
import { seedClient } from '@/lib/seed-client';
import { cn } from '@/lib/utils';
@@ -280,7 +280,7 @@ function PackCardSkeleton() {
return (
<div className="flex h-full min-h-[200px] flex-col items-start gap-4 rounded-xl border border-border/60 bg-card p-6">
<span className="size-10 animate-pulse rounded-lg bg-muted" aria-hidden="true">
- <Loader2 className="size-5 animate-spin text-muted-foreground opacity-0" />
+ <Spinner aria-hidden="true" className="size-5 text-muted-foreground opacity-0" />
</span>
<div className="flex w-full flex-col gap-2">
<div className="h-4 w-1/2 animate-pulse rounded bg-muted" />
diff --git a/packages/app/src/components/PublishToGitHubDialog.tsx b/packages/app/src/components/PublishToGitHubDialog.tsx
index ac9a1d2a8..3320adf07 100644
--- a/packages/app/src/components/PublishToGitHubDialog.tsx
+++ b/packages/app/src/components/PublishToGitHubDialog.tsx
@@ -32,7 +32,7 @@
import type { SharePublishOwner } from '@inkeep/open-knowledge-core';
import { Trans, useLingui } from '@lingui/react/macro';
-import { CheckCircle2, Copy, ExternalLink, Loader2, XCircle } from 'lucide-react';
+import { CheckCircle2, Copy, ExternalLink, XCircle } from 'lucide-react';
import { useEffect, useRef, useState } from 'react';
import { toast } from 'sonner';
import { AuthModal } from '@/components/AuthModal';
@@ -56,6 +56,7 @@ import {
import { Input } from '@/components/ui/input';
import { Label } from '@/components/ui/label';
import { RadioGroup, RadioGroupItem } from '@/components/ui/radio-group';
+import { Spinner } from '@/components/ui/spinner';
import { Textarea } from '@/components/ui/textarea';
import { useDocumentContext } from '@/editor/DocumentContext';
import { docNameToMarkdownPath } from '@/lib/doc-paths';
@@ -391,8 +392,7 @@ export function PublishToGitHubDialog({ open, onOpenChange }: PublishToGitHubDia
</Label>
{ownersLoading && owners === null ? (
<div className="flex items-center gap-2 text-sm text-muted-foreground">
- <Loader2 className="size-3.5 animate-spin" aria-hidden />{' '}
- <Trans>Loading...</Trans>
+ <Spinner className="size-3.5" aria-hidden /> <Trans>Loading...</Trans>
</div>
) : ownersError ? (
<div className="flex items-center justify-between gap-2">
@@ -571,8 +571,7 @@ export function PublishToGitHubDialog({ open, onOpenChange }: PublishToGitHubDia
>
{submitting ? (
<>
- <Loader2 className="size-3.5 animate-spin" aria-hidden />{' '}
- <Trans>Publishing...</Trans>
+ <Spinner className="size-3.5" aria-hidden /> <Trans>Publishing...</Trans>
</>
) : (
<Trans>Publish</Trans>
@@ -682,8 +681,7 @@ function PublishSuccessView({
data-testid="publish-share-url-loading"
className="flex items-center gap-2 text-sm text-muted-foreground"
>
- <Loader2 className="size-3.5 animate-spin" aria-hidden />{' '}
- <Trans>Preparing share URL...</Trans>
+ <Spinner className="size-3.5" aria-hidden /> <Trans>Preparing share URL...</Trans>
</div>
)}
</fieldset>
@@ -710,7 +708,7 @@ function PublishSuccessView({
>
{copying ? (
<>
- <Loader2 className="size-3.5 animate-spin" aria-hidden /> <Trans>Copying...</Trans>
+ <Spinner className="size-3.5" aria-hidden /> <Trans>Copying...</Trans>
</>
) : (
<>
@@ -806,7 +804,7 @@ function NameCheckIndicator({ status }: { status: NameCheckStatus }) {
data-status={status.kind}
className="flex items-center gap-1 text-muted-foreground"
>
- <Loader2 className="size-3.5 animate-spin" aria-hidden /> <Trans>Checking...</Trans>
+ <Spinner className="size-3.5" aria-hidden /> <Trans>Checking...</Trans>
</span>
);
}
diff --git a/packages/app/src/components/ReportBugDialogBody.tsx b/packages/app/src/components/ReportBugDialogBody.tsx
index 1c6004a31..419b328b8 100644
--- a/packages/app/src/components/ReportBugDialogBody.tsx
+++ b/packages/app/src/components/ReportBugDialogBody.tsx
@@ -31,7 +31,6 @@ import {
AlertCircleIcon,
ArchiveIcon,
CheckIcon,
- Loader2,
ShieldIcon,
TriangleAlertIcon,
} from 'lucide-react';
@@ -51,6 +50,7 @@ import {
DialogTitle,
} from '@/components/ui/dialog';
import { Input } from '@/components/ui/input';
+import { Spinner } from '@/components/ui/spinner';
import { Textarea } from '@/components/ui/textarea';
import { dispatchExternalLinkClick } from '@/lib/external-link';
import { scheduleClipboardWrite } from '@/lib/share/clipboard-adapter';
@@ -682,12 +682,7 @@ function ReportBugDialog({
{crashInvite !== undefined ? <Trans>Not now</Trans> : <Trans>Cancel</Trans>}
</Button>
<Button onClick={() => void handleCreate()} disabled={phase.creating}>
- {phase.creating && (
- <Loader2
- className="size-4 animate-spin motion-reduce:animate-none"
- aria-hidden="true"
- />
- )}
+ {phase.creating && <Spinner className="size-4" aria-hidden="true" />}
<Trans>Create report</Trans>
</Button>
</DialogFooter>
@@ -755,10 +750,7 @@ function ReportBugDialog({
</DialogHeader>
<DialogBody className="flex flex-col gap-3">
<div role="status" className="flex items-center gap-2.5 text-sm">
- <Loader2
- className="size-4 shrink-0 animate-spin text-primary motion-reduce:animate-none"
- aria-hidden="true"
- />
+ <Spinner className="size-4 shrink-0 text-primary" aria-hidden="true" />
<Trans>Uploading securely</Trans>
{/* No byte-level progress crosses the IPC boundary, so the only
honest number here is the total size. */}
diff --git a/packages/app/src/components/SeedDialog.tsx b/packages/app/src/components/SeedDialog.tsx
index 064e9338b..e3ac6a3c1 100644
--- a/packages/app/src/components/SeedDialog.tsx
+++ b/packages/app/src/components/SeedDialog.tsx
@@ -2,7 +2,7 @@
import { plural } from '@lingui/core/macro';
import { Trans, useLingui } from '@lingui/react/macro';
-import { ArrowLeft, Loader2 } from 'lucide-react';
+import { ArrowLeft } from 'lucide-react';
import type { ReactElement } from 'react';
import { useEffect, useRef, useState } from 'react';
import { toast } from 'sonner';
@@ -27,6 +27,7 @@ import {
} from '@/components/ui/field';
import { Input } from '@/components/ui/input';
import { RadioGroup, RadioGroupItem } from '@/components/ui/radio-group';
+import { Spinner } from '@/components/ui/spinner';
import type { OkPackId, OkScaffoldPlan, OkSeedPackInfo } from '@/lib/desktop-bridge-types';
import { seedClient } from '@/lib/seed-client';
@@ -370,7 +371,7 @@ export function SeedDialog({ open, onOpenChange, onSeedApplied, initialPackId }:
</Button>
) : step === 'configure' && phase.kind === 'applying' ? (
<Button disabled>
- <Loader2 aria-hidden="true" className="h-4 w-4 animate-spin" />
+ <Spinner aria-hidden="true" className="h-4 w-4" />
<Trans>Setting up</Trans>
</Button>
) : null}
diff --git a/packages/app/src/components/SessionsHost.tsx b/packages/app/src/components/SessionsHost.tsx
index ea1924f2e..8ad7bf159 100644
--- a/packages/app/src/components/SessionsHost.tsx
+++ b/packages/app/src/components/SessionsHost.tsx
@@ -7,7 +7,7 @@ import {
} from '@inkeep/open-knowledge-core';
import type { ThreadInfo, ThreadStatus } from '@inkeep/open-knowledge-core/acp/thread-protocol';
import { useLingui } from '@lingui/react/macro';
-import { Loader2, SquareTerminalIcon } from 'lucide-react';
+import { SquareTerminalIcon } from 'lucide-react';
import {
lazy,
type ReactNode,
@@ -21,6 +21,7 @@ import { createPortal } from 'react-dom';
import { RegisteredAgentIcon } from '@/components/acp/RegisteredAgentIcon';
import { ArchivedThreadChooser, ThreadHistoryMenu } from '@/components/acp/ThreadHistoryMenu';
import { publishReusableSession } from '@/components/reusable-session-store';
+import { Spinner } from '@/components/ui/spinner';
import { TabsContent } from '@/components/ui/tabs';
import { isInAppAgentEnabled } from '@/lib/acp/agent-visibility';
import { useEnabledOverrides } from '@/lib/acp/enabled-agents';
@@ -1807,7 +1808,7 @@ function ThreadPanel({
aria-busy="true"
className="flex min-h-0 flex-1 items-center justify-center text-muted-foreground"
>
- <Loader2 className="size-5 animate-spin" aria-hidden="true" />
+ <Spinner className="size-5" aria-hidden="true" />
</div>
}
>
diff --git a/packages/app/src/components/ShareBranchSwitchDialog.tsx b/packages/app/src/components/ShareBranchSwitchDialog.tsx
index cdaf565d2..3965c5737 100644
--- a/packages/app/src/components/ShareBranchSwitchDialog.tsx
+++ b/packages/app/src/components/ShareBranchSwitchDialog.tsx
@@ -25,7 +25,7 @@
import type { WorktreeCreateResult } from '@inkeep/open-knowledge-core';
import { Trans, useLingui } from '@lingui/react/macro';
-import { AppWindow, GitBranch, Loader2, MapPin } from 'lucide-react';
+import { AppWindow, GitBranch, MapPin } from 'lucide-react';
import { useEffect, useRef, useState, useSyncExternalStore } from 'react';
import { toast } from 'sonner';
@@ -40,6 +40,7 @@ import {
Dialog as DialogRoot,
DialogTitle,
} from '@/components/ui/dialog';
+import { Spinner } from '@/components/ui/spinner';
import { authPromptStore } from '@/lib/auth-prompt-store';
import {
type OkDesktopBridge,
@@ -713,7 +714,7 @@ export function ShareBranchSwitchDialog({
role="status"
aria-live="polite"
>
- <Loader2 className="h-4 w-4 animate-spin" aria-hidden="true" />
+ <Spinner className="h-4 w-4" aria-hidden="true" />
<Trans>Checking for updates on GitHub</Trans>
</p>
) : branchSwitchState.phase === 'verdict' ? (
@@ -769,7 +770,7 @@ export function ShareBranchSwitchDialog({
role="status"
aria-live="polite"
>
- <Loader2 className="h-4 w-4 animate-spin" aria-hidden="true" />
+ <Spinner className="h-4 w-4" aria-hidden="true" />
<Trans>Checking for updates on GitHub</Trans>
</p>
)
@@ -780,7 +781,7 @@ export function ShareBranchSwitchDialog({
role="status"
aria-live="polite"
>
- <Loader2 className="h-4 w-4 animate-spin" aria-hidden="true" />
+ <Spinner className="h-4 w-4" aria-hidden="true" />
<Trans>Loading branch state</Trans>
</p>
) : isError ? (
@@ -857,7 +858,7 @@ export function ShareBranchSwitchDialog({
role="status"
aria-live="polite"
>
- <Loader2 className="h-4 w-4 animate-spin" aria-hidden="true" />
+ <Spinner className="h-4 w-4" aria-hidden="true" />
<Trans>Switching branches</Trans>
</p>
) : null}
@@ -868,7 +869,7 @@ export function ShareBranchSwitchDialog({
role="status"
aria-live="polite"
>
- <Loader2 className="h-4 w-4 animate-spin" aria-hidden="true" />
+ <Spinner className="h-4 w-4" aria-hidden="true" />
<Trans>Opening worktree</Trans>
</p>
) : null}
@@ -940,7 +941,7 @@ export function ShareBranchSwitchDialog({
>
{switching ? (
<>
- <Loader2 className="size-3.5 animate-spin" aria-hidden="true" />
+ <Spinner className="size-3.5" aria-hidden="true" />
{switchLabel}
</>
) : (
@@ -957,7 +958,7 @@ export function ShareBranchSwitchDialog({
>
{creating ? (
<>
- <Loader2 className="size-3.5 animate-spin" aria-hidden="true" />
+ <Spinner className="size-3.5" aria-hidden="true" />
{worktreeLabel}
</>
) : (
diff --git a/packages/app/src/components/ShareFreshnessWarning.tsx b/packages/app/src/components/ShareFreshnessWarning.tsx
index 81d925bd2..7c8c6b15f 100644
--- a/packages/app/src/components/ShareFreshnessWarning.tsx
+++ b/packages/app/src/components/ShareFreshnessWarning.tsx
@@ -16,6 +16,7 @@ import { Trans, useLingui } from '@lingui/react/macro';
import { ArrowUpRight, Check, Info, RefreshCw, TriangleAlert } from 'lucide-react';
import { useEffect, useRef, useState } from 'react';
import { Button } from '@/components/ui/button';
+import { Spinner } from '@/components/ui/spinner';
import {
useEnableSyncWithConfirm,
useSyncEnabledWriter,
@@ -191,7 +192,7 @@ export function ShareFreshnessWarning({ freshness, status, kind }: ShareFreshnes
<div>
{syncNow === 'pending' ? (
<Button variant="outline" size="xs" disabled>
- <RefreshCw className="size-3 shrink-0 animate-spin" aria-hidden="true" />
+ <Spinner icon={RefreshCw} className="size-3 shrink-0" aria-hidden="true" />
<Trans>Syncing</Trans>
</Button>
) : (
diff --git a/packages/app/src/components/ShareReceiveDialog.tsx b/packages/app/src/components/ShareReceiveDialog.tsx
index 4939efd23..a71e0d242 100644
--- a/packages/app/src/components/ShareReceiveDialog.tsx
+++ b/packages/app/src/components/ShareReceiveDialog.tsx
@@ -25,7 +25,6 @@
import { classifyBranchMatch } from '@inkeep/open-knowledge-core';
import { Trans, useLingui } from '@lingui/react/macro';
-import { Loader2 } from 'lucide-react';
import { useEffect, useRef, useState, useSyncExternalStore } from 'react';
import { toast } from 'sonner';
@@ -40,6 +39,7 @@ import {
Dialog as DialogRoot,
DialogTitle,
} from '@/components/ui/dialog';
+import { Spinner } from '@/components/ui/spinner';
import {
type HeadBranchInfo,
type OkDesktopBridge,
@@ -588,7 +588,7 @@ function ShareReceiveDialogInner({
>
{initializing ? (
<>
- <Loader2 className="mr-2 h-4 w-4 animate-spin" aria-hidden="true" />
+ <Spinner className="mr-2 h-4 w-4" aria-hidden="true" />
<Trans>Initialize and open</Trans>
</>
) : (
diff --git a/packages/app/src/components/SkillOriginInline.tsx b/packages/app/src/components/SkillOriginInline.tsx
index 2e68efbfc..185964a7d 100644
--- a/packages/app/src/components/SkillOriginInline.tsx
+++ b/packages/app/src/components/SkillOriginInline.tsx
@@ -4,10 +4,10 @@ import { ArrowUpRight, RefreshCw, Undo2 } from 'lucide-react';
import { useState } from 'react';
import { SkillUpdateConflictDialog } from '@/components/SkillUpdateConflictDialog';
import { Button } from '@/components/ui/button';
+import { Spinner } from '@/components/ui/spinner';
import { Switch } from '@/components/ui/switch';
import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';
import { useSkillOrigin } from '@/hooks/use-skill-origin';
-import { cn } from '@/lib/utils';
/**
* Import provenance for the active skill tab, rendered inline on the LEFT of the
@@ -145,7 +145,11 @@ export function SkillOriginInline({ scope, name }: { scope: SkillScope; name: st
asChild
>
<TooltipTrigger>
- <Undo2 className={cn('size-3', reverting && 'animate-spin')} aria-hidden />
+ {reverting ? (
+ <Spinner icon={Undo2} className="size-3" aria-hidden />
+ ) : (
+ <Undo2 className="size-3" aria-hidden />
+ )}
<span className="hidden @xl/toolbar:inline">
{reverting ? <Trans>Reverting</Trans> : <Trans>Revert</Trans>}
</span>
@@ -168,7 +172,11 @@ export function SkillOriginInline({ scope, name }: { scope: SkillScope; name: st
asChild
>
<TooltipTrigger>
- <RefreshCw className={cn('size-3', reimporting && 'animate-spin')} aria-hidden />
+ {reimporting ? (
+ <Spinner icon={RefreshCw} className="size-3" aria-hidden />
+ ) : (
+ <RefreshCw className="size-3" aria-hidden />
+ )}
{/* Label collapses to an icon-only button on a narrow pane. */}
<span className="hidden @xl/toolbar:inline">
{reimporting ? <Trans>Updating</Trans> : <Trans>Update</Trans>}
diff --git a/packages/app/src/components/SkillPluginBundleDialog.tsx b/packages/app/src/components/SkillPluginBundleDialog.tsx
index e8147bfca..2ff08481c 100644
--- a/packages/app/src/components/SkillPluginBundleDialog.tsx
+++ b/packages/app/src/components/SkillPluginBundleDialog.tsx
@@ -6,7 +6,6 @@ import {
} from '@inkeep/open-knowledge-core';
import { Trans, useLingui } from '@lingui/react/macro';
-import { Loader2Icon } from 'lucide-react';
import { useEffect, useId, useState } from 'react';
import { toast } from 'sonner';
import { INSTALL_EDITORS } from '@/components/SkillInstallMenu';
@@ -29,6 +28,7 @@ import {
SelectTrigger,
SelectValue,
} from '@/components/ui/select';
+import { Spinner } from '@/components/ui/spinner';
import { useSkillTargets } from '@/hooks/use-skill-targets';
import { SKILL_SCOPE_ORDER, useSkillScopeLabels } from '@/lib/skill-scope';
import { discoverSkillsInSource, importSkillsBulk, installSkill } from '@/lib/skills-api';
@@ -329,7 +329,7 @@ export function SkillPluginBundleDialog({
>
{busy ? (
<>
- <Loader2Icon className="size-4 animate-spin" />
+ <Spinner aria-hidden="true" className="size-4" />
<Trans>Installing</Trans>
</>
) : (
diff --git a/packages/app/src/components/SkillsSidebarSection.tsx b/packages/app/src/components/SkillsSidebarSection.tsx
index e2e742998..0173abb00 100644
--- a/packages/app/src/components/SkillsSidebarSection.tsx
+++ b/packages/app/src/components/SkillsSidebarSection.tsx
@@ -6,7 +6,6 @@ import {
type SkillsListEntry,
} from '@inkeep/open-knowledge-core';
import { Trans, useLingui } from '@lingui/react/macro';
-import { Loader2 } from 'lucide-react';
import { lazy, Suspense, useEffect, useState } from 'react';
import { toast } from 'sonner';
import type { AddSkillTab } from '@/components/ImportSkillDialog';
@@ -15,6 +14,7 @@ import { EMPTY_SCOPE_SENTINEL, SkillsTree } from '@/components/SkillsTree';
import { useSkillActions } from '@/components/skill-actions';
import { Button } from '@/components/ui/button';
import { SidebarGroup, SidebarGroupContent } from '@/components/ui/sidebar';
+import { Spinner } from '@/components/ui/spinner';
import { useDocumentContext } from '@/editor/DocumentContext';
import { findLocalSkillPreviewTabId } from '@/editor/editor-tabs';
import { useCreateBlankSkill } from '@/hooks/use-create-blank-skill';
@@ -551,7 +551,7 @@ export function SkillsSidebarSection({ skillsMode = false }: { skillsMode?: bool
role="status"
aria-live="polite"
>
- <Loader2 className="size-3.5 animate-spin" aria-hidden />
+ <Spinner className="size-3.5" aria-hidden />
<Trans>Loading skills</Trans>
</div>
) : null}
diff --git a/packages/app/src/components/SubscribeForm.tsx b/packages/app/src/components/SubscribeForm.tsx
index 362215752..fc11afd74 100644
--- a/packages/app/src/components/SubscribeForm.tsx
+++ b/packages/app/src/components/SubscribeForm.tsx
@@ -14,13 +14,14 @@
import { zodResolver } from '@hookform/resolvers/zod';
import { Trans, useLingui } from '@lingui/react/macro';
-import { ArrowRight, Check, Loader2, Mail, X } from 'lucide-react';
+import { ArrowRight, Check, Mail, X } from 'lucide-react';
import type { ReactNode } from 'react';
import { useEffect, useRef, useState } from 'react';
import { Controller, useForm } from 'react-hook-form';
import { z } from 'zod';
import { Button } from '@/components/ui/button';
import { InputGroup, InputGroupAddon, InputGroupInput } from '@/components/ui/input-group';
+import { Spinner } from '@/components/ui/spinner';
import { type SubscribeSource, submitSubscribe } from '@/lib/subscribe';
import { cn } from '@/lib/utils';
@@ -190,7 +191,7 @@ export function SubscribeForm({
>
{isSubmitting ? (
<>
- <Loader2 className="size-3.5 animate-spin" aria-hidden />
+ <Spinner className="size-3.5" aria-hidden />
<span className="sr-only">
<Trans>Subscribing...</Trans>
</span>
diff --git a/packages/app/src/components/SyncStatusBadge.tsx b/packages/app/src/components/SyncStatusBadge.tsx
index f613a50ba..5c7c5ac6a 100644
--- a/packages/app/src/components/SyncStatusBadge.tsx
+++ b/packages/app/src/components/SyncStatusBadge.tsx
@@ -29,6 +29,7 @@ import {
RefreshCw,
UserCog,
} from 'lucide-react';
+import { Spinner } from '@/components/ui/spinner';
import { useConflicts } from '@/hooks/use-conflicts';
import { useBadgeSyncControls } from '@/hooks/use-enable-sync-with-confirm';
import type { GitSyncStatus } from '@/hooks/use-git-sync-status';
@@ -124,7 +125,9 @@ function BadgeIcon({ status, paused }: BadgeIconProps) {
case 'fetching':
case 'pulling':
case 'pushing':
- return <RefreshCw className={`${cls} text-muted-foreground animate-spin`} />;
+ return (
+ <Spinner aria-hidden="true" icon={RefreshCw} className={`${cls} text-muted-foreground`} />
+ );
case 'conflict':
return <AlertTriangle className={`${cls} text-amber-500`} />;
case 'offline':
diff --git a/packages/app/src/components/TimelineDiffPane.tsx b/packages/app/src/components/TimelineDiffPane.tsx
index 08490478c..8e7ca079b 100644
--- a/packages/app/src/components/TimelineDiffPane.tsx
+++ b/packages/app/src/components/TimelineDiffPane.tsx
@@ -13,15 +13,7 @@
import { ProblemDetailsSchema } from '@inkeep/open-knowledge-core';
import { Plural, Trans, useLingui } from '@lingui/react/macro';
-import {
- ChevronDown,
- ChevronUp,
- Loader2,
- PanelRightClose,
- PanelRightOpen,
- Undo2,
- X,
-} from 'lucide-react';
+import { ChevronDown, ChevronUp, PanelRightClose, PanelRightOpen, Undo2, X } from 'lucide-react';
import { lazy, Suspense, useEffect, useRef, useState } from 'react';
import { toast } from 'sonner';
import { computeRenderedDiff, RenderedDiffView } from '@/components/RenderedDiffView';
@@ -34,6 +26,7 @@ import {
DialogHeader,
DialogTitle,
} from '@/components/ui/dialog';
+import { Spinner } from '@/components/ui/spinner';
import { ToggleGroup, ToggleGroupItem } from '@/components/ui/toggle-group';
import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';
import { collectChangeAnchors, countChangeGroups } from '@/lib/diff-change-nav';
@@ -361,7 +354,7 @@ export function TimelineDiffPane({ view, isPanelCollapsed, onTogglePanel }: Time
onClick={() => (laterEdits > 0 ? setDialogOpen(true) : handleRestore())}
>
{restoring ? (
- <Loader2 className="mr-1.5 size-3.5 animate-spin" />
+ <Spinner aria-hidden="true" className="mr-1.5 size-3.5" />
) : (
<Undo2 className="mr-1.5 size-3.5" />
)}
@@ -397,7 +390,7 @@ export function TimelineDiffPane({ view, isPanelCollapsed, onTogglePanel }: Time
<div ref={diffBodyRef} className="min-h-0 flex-1 overflow-auto subtle-scrollbar">
{result.status === 'loading' && (
<div className="flex items-center gap-2 px-4 py-3 text-xs text-muted-foreground">
- <Loader2 className="size-3 animate-spin" />
+ <Spinner aria-hidden="true" className="size-3" />
<Trans>Loading diff</Trans>
</div>
)}
@@ -426,7 +419,7 @@ export function TimelineDiffPane({ view, isPanelCollapsed, onTogglePanel }: Time
<Suspense
fallback={
<div className="flex items-center gap-2 px-4 py-3 text-xs text-muted-foreground">
- <Loader2 className="size-3 animate-spin" />
+ <Spinner aria-hidden="true" className="size-3" />
<Trans>Loading diff renderer</Trans>
</div>
}
@@ -469,7 +462,7 @@ export function TimelineDiffPane({ view, isPanelCollapsed, onTogglePanel }: Time
disabled={restoring}
onClick={() => handleRestore()}
>
- {restoring ? <Loader2 className="mr-2 size-4 animate-spin" /> : null}
+ {restoring ? <Spinner aria-hidden="true" className="mr-2 size-4" /> : null}
<Trans>Restore</Trans>
</Button>
</DialogFooter>
diff --git a/packages/app/src/components/TimelinePanel.tsx b/packages/app/src/components/TimelinePanel.tsx
index cd29137cd..c7aceb274 100644
--- a/packages/app/src/components/TimelinePanel.tsx
+++ b/packages/app/src/components/TimelinePanel.tsx
@@ -50,7 +50,6 @@ import {
GitBranch,
HardDrive,
History,
- Loader2,
RotateCcw,
Sparkles,
Undo2,
@@ -71,6 +70,7 @@ import {
} from '@/components/ui/dialog';
import { PanelHeader, PanelTitle } from '@/components/ui/panel';
import { Skeleton } from '@/components/ui/skeleton';
+import { Spinner } from '@/components/ui/spinner';
import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';
import { closeAgentDiff } from '@/lib/agent-diff-store';
import { createSelfSchedulingPoll, type PollOutcome } from '@/lib/self-scheduling-poll';
@@ -654,7 +654,7 @@ function EntryRow({
}}
>
{restoring ? (
- <Loader2 className="size-3 animate-spin" />
+ <Spinner aria-hidden="true" className="size-3" />
) : (
<Undo2 className="size-3" />
)}
@@ -709,7 +709,7 @@ function EntryRow({
disabled={restoring}
onClick={() => handleRestore()}
>
- {restoring ? <Loader2 className="mr-2 size-4 animate-spin" /> : null}
+ {restoring ? <Spinner aria-hidden="true" className="mr-2 size-4" /> : null}
<Trans>Restore</Trans>
</Button>
</DialogFooter>
diff --git a/packages/app/src/components/TrashFailureModal.tsx b/packages/app/src/components/TrashFailureModal.tsx
index dedf18859..2e3d6af8e 100644
--- a/packages/app/src/components/TrashFailureModal.tsx
+++ b/packages/app/src/components/TrashFailureModal.tsx
@@ -1,6 +1,5 @@
import { plural, t } from '@lingui/core/macro';
import { Trans } from '@lingui/react/macro';
-import { Loader2 } from 'lucide-react';
import { Button } from '@/components/ui/button';
import {
DialogBody,
@@ -10,6 +9,7 @@ import {
DialogHeader,
DialogTitle,
} from '@/components/ui/dialog';
+import { Spinner } from '@/components/ui/spinner';
/**
* VSCode-parity fallback modal. When `shell.trashItem` fails for one or more
@@ -176,7 +176,7 @@ export function TrashFailureModal({
>
{isSubmitting ? (
<>
- <Loader2 className="size-4 animate-spin" /> <Trans>Retrying</Trans>
+ <Spinner aria-hidden="true" className="size-4" /> <Trans>Retrying</Trans>
</>
) : (
<Trans>Retry</Trans>
@@ -190,7 +190,7 @@ export function TrashFailureModal({
>
{isSubmitting ? (
<>
- <Loader2 className="size-4 animate-spin" /> <Trans>Deleting</Trans>
+ <Spinner aria-hidden="true" className="size-4" /> <Trans>Deleting</Trans>
</>
) : (
<Trans>Delete Permanently</Trans>
diff --git a/packages/app/src/components/acp/ThreadView.tsx b/packages/app/src/components/acp/ThreadView.tsx
index 158432c1c..bedcdc055 100644
--- a/packages/app/src/components/acp/ThreadView.tsx
+++ b/packages/app/src/components/acp/ThreadView.tsx
@@ -31,7 +31,6 @@ import {
History,
Link2,
ListPlus,
- Loader2,
MousePointer2,
RotateCcw,
Search,
@@ -100,6 +99,7 @@ import {
useMessageScroller,
} from '@/components/ui/message-scroller';
import { Skeleton } from '@/components/ui/skeleton';
+import { Spinner } from '@/components/ui/spinner';
import { Switch } from '@/components/ui/switch';
import { Textarea } from '@/components/ui/textarea';
import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';
@@ -758,10 +758,7 @@ export function ThreadView({
className="flex items-center gap-2 px-1 py-1 text-muted-foreground text-sm"
data-testid="agent-thread-starting"
>
- <Loader2
- className="size-3.5 animate-spin motion-reduce:animate-none"
- aria-hidden="true"
- />
+ <Spinner className="size-3.5" aria-hidden="true" />
{/* `shimmer` sets `color: transparent`, which a container
would inherit into the spinner's currentColor stroke —
keep it scoped to the text. */}
@@ -779,7 +776,7 @@ export function ThreadView({
className="flex items-center gap-2 border-t bg-muted/40 px-3 py-1.5 text-muted-foreground text-xs"
data-testid="agent-thread-steer-pending"
>
- <Loader2 className="size-3.5 shrink-0 animate-spin" aria-hidden="true" />
+ <Spinner className="size-3.5 shrink-0" aria-hidden="true" />
<span className="shrink-0">{t`Steering — waiting for the current run to stop…`}</span>
<span className="min-w-0 flex-1 truncate text-foreground/80">{info.steer.content}</span>
</div>
@@ -1783,7 +1780,7 @@ function ThreadNotice({
data-auth-method-id={method.id}
>
{authPending === method.id ? (
- <Loader2 className="size-3 animate-spin" aria-hidden="true" />
+ <Spinner className="size-3" aria-hidden="true" />
) : null}
{/* One method is the whole choice, so the button says what it
does; several are a menu, and the names are the choice. */}
@@ -1805,7 +1802,7 @@ function ThreadNotice({
>
{retryPending ? (
<>
- <Loader2 className="size-3 animate-spin" aria-hidden="true" />
+ <Spinner className="size-3" aria-hidden="true" />
{t`Retrying…`}
</>
) : (
@@ -2148,8 +2145,8 @@ function ToolStatusIndicator({
// `pending` (accepted, not yet started) and `in_progress` both read as
// "this call is in flight" — the distinction is the agent's bookkeeping,
// not something worth two different marks on the row.
- <Loader2
- className="size-3.5 animate-spin text-muted-foreground"
+ <Spinner
+ className="size-3.5 text-muted-foreground"
aria-hidden="true"
data-testid="agent-thread-tool-spinner"
/>
@@ -2236,7 +2233,7 @@ function TerminalBlock({ terminal }: { terminal: RenderedTerminal }): ReactNode
<span className="ml-auto shrink-0">
{exit === null ? (
<span className="flex items-center gap-1 text-[10px] text-muted-foreground shimmer">
- <Loader2 className="size-3 animate-spin" aria-hidden="true" />
+ <Spinner className="size-3" aria-hidden="true" />
{t`running`}
</span>
) : (
@@ -2578,7 +2575,7 @@ function RuntimeConsentPrompt({
data-testid="agent-thread-runtime-consent"
>
<div className="mb-1.5 flex items-center gap-1.5 text-muted-foreground">
- <Loader2 className="size-3.5 shrink-0 animate-spin" aria-hidden="true" />
+ <Spinner className="size-3.5 shrink-0" aria-hidden="true" />
<span>{t`Downloading ${item.displayName} ${item.version}…`}</span>
</div>
<div className="h-1.5 w-full overflow-hidden rounded-full bg-muted">
@@ -2967,7 +2964,7 @@ function ThreadComposer({
data-testid="agent-thread-cancel"
>
{cancelPending ? (
- <Loader2 className="size-3.5 animate-spin" aria-hidden="true" />
+ <Spinner className="size-3.5" aria-hidden="true" />
) : (
<Square className="size-3 fill-current" aria-hidden="true" />
)}
diff --git a/packages/app/src/components/settings/ConfigureAgentsSection.tsx b/packages/app/src/components/settings/ConfigureAgentsSection.tsx
index 93bfdcd00..e9156e92f 100644
--- a/packages/app/src/components/settings/ConfigureAgentsSection.tsx
+++ b/packages/app/src/components/settings/ConfigureAgentsSection.tsx
@@ -20,7 +20,7 @@
import { TERMINAL_CLI_IDS, TERMINAL_CLIS, type TerminalCli } from '@inkeep/open-knowledge-core';
import { useLingui } from '@lingui/react/macro';
import { useQuery } from '@tanstack/react-query';
-import { Loader2, Search, WifiOff } from 'lucide-react';
+import { Search, WifiOff } from 'lucide-react';
import { type ReactNode, useEffect, useEffectEvent, useState } from 'react';
import { AgentBetaBadge } from '@/components/acp/AgentBetaBadge';
import { RegisteredAgentIcon } from '@/components/acp/RegisteredAgentIcon';
@@ -30,6 +30,7 @@ import { cliIconTargetId } from '@/components/handoff/terminal-cli-display';
import { useInstalledAgents } from '@/components/handoff/useInstalledAgents';
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
+import { Spinner } from '@/components/ui/spinner';
import { Switch } from '@/components/ui/switch';
import {
isDesktopTargetEnabled,
@@ -255,7 +256,7 @@ export function ConfigureAgentsSection(): ReactNode {
>
{catalog.isLoading ? (
<div className="flex items-center justify-center gap-2 px-3 py-6 text-muted-foreground text-sm">
- <Loader2 className="size-4 animate-spin" aria-hidden="true" />
+ <Spinner className="size-4" aria-hidden="true" />
{t`Loading agents…`}
</div>
) : catalog.isError ? (
diff --git a/packages/app/src/components/share-receive-miss-content.tsx b/packages/app/src/components/share-receive-miss-content.tsx
index 3054e688a..0f1e00c9b 100644
--- a/packages/app/src/components/share-receive-miss-content.tsx
+++ b/packages/app/src/components/share-receive-miss-content.tsx
@@ -21,13 +21,13 @@ import {
FileQuestion,
FileX2,
FolderOpen,
- Loader2,
MapPin,
RefreshCw,
} from 'lucide-react';
import { type ReactNode, useEffect, useRef, useState } from 'react';
import { toast } from 'sonner';
import { Button } from '@/components/ui/button';
+import { Spinner } from '@/components/ui/spinner';
import {
useEnableSyncWithConfirm,
useSyncEnabledWriter,
@@ -198,7 +198,7 @@ function SyncNowButton({
<>
{pending ? (
<Button disabled aria-busy="true" data-testid="share-receive-miss-sync-now">
- <RefreshCw className="size-4 animate-spin" aria-hidden="true" />
+ <Spinner icon={RefreshCw} className="size-4" aria-hidden="true" />
<Trans>Syncing</Trans>
</Button>
) : (
@@ -372,7 +372,7 @@ function PullNowButton({ pending, onPull }: { pending: boolean; onPull: () => vo
<>
{pending ? (
<Button disabled aria-busy="true" data-testid="share-receive-miss-pull-now">
- <RefreshCw className="size-4 animate-spin" aria-hidden="true" />
+ <Spinner icon={RefreshCw} className="size-4" aria-hidden="true" />
<Trans>Pulling</Trans>
</Button>
) : (
@@ -497,7 +497,7 @@ export function ShareReceiveMissContent({
if (state.phase === 'pending') {
return (
<>
- <Loader2 className="size-5 animate-spin" aria-hidden="true" />
+ <Spinner className="size-5" aria-hidden="true" />
<Trans>Checking for updates on GitHub</Trans>
</>
);
diff --git a/packages/app/src/components/ui/sonner.tsx b/packages/app/src/components/ui/sonner.tsx
index 8a1c24159..7e89b3852 100644
--- a/packages/app/src/components/ui/sonner.tsx
+++ b/packages/app/src/components/ui/sonner.tsx
@@ -1,12 +1,7 @@
-import {
- CircleCheckIcon,
- InfoIcon,
- Loader2Icon,
- OctagonXIcon,
- TriangleAlertIcon,
-} from 'lucide-react';
+import { CircleCheckIcon, InfoIcon, OctagonXIcon, TriangleAlertIcon } from 'lucide-react';
import { useTheme } from 'next-themes';
import { Toaster as Sonner, type ToasterProps } from 'sonner';
+import { Spinner } from '@/components/ui/spinner';
const Toaster = ({ ...props }: ToasterProps) => {
const { theme = 'system' } = useTheme();
@@ -20,7 +15,7 @@ const Toaster = ({ ...props }: ToasterProps) => {
info: <InfoIcon className="size-4" />,
warning: <TriangleAlertIcon className="size-4" />,
error: <OctagonXIcon className="size-4" />,
- loading: <Loader2Icon className="size-4 animate-spin" />,
+ loading: <Spinner aria-hidden="true" className="size-4" />,
}}
style={
{
diff --git a/packages/app/src/components/ui/spinner.dom.test.tsx b/packages/app/src/components/ui/spinner.dom.test.tsx
new file mode 100644
index 000000000..ad3ac670c
--- /dev/null
+++ b/packages/app/src/components/ui/spinner.dom.test.tsx
@@ -0,0 +1,92 @@
+/**
+ * DOM-substrate tests for Spinner. This primitive is the single loading
+ * indicator across the app, so its accessibility contract is what every call
+ * site inherits — including the `aria-hidden` escape hatch that keeps a spinner
+ * inside an already-labelled wrapper from being announced twice.
+ */
+
+import { cleanup, render, screen } from '@testing-library/react';
+import type { LucideProps } from 'lucide-react';
+import { RefreshCw } from 'lucide-react';
+import { afterEach, describe, expect, test } from 'vitest';
+import { expectVisualClassTokens } from '@/test-utils/visual-contract';
+import { Spinner } from './spinner';
+
+afterEach(cleanup);
+
+function svgOf(container: HTMLElement): SVGElement {
+ const svg = container.querySelector('svg');
+ if (!svg) throw new Error('Spinner rendered no svg');
+ return svg;
+}
+
+describe('Spinner', () => {
+ test('exposes a status role with an accessible name by default', () => {
+ render(<Spinner />);
+
+ const spinner = screen.getByRole('status');
+
+ // The name must be non-empty: a Lingui `t` that fails to resolve renders as
+ // an empty string, which would leave the element silently unnamed.
+ expect(spinner.getAttribute('aria-label')).toMatch(/\S/);
+ });
+
+ test('animates but stands still under prefers-reduced-motion', () => {
+ const { container } = render(<Spinner />);
+
+ expectVisualClassTokens(svgOf(container).getAttribute('class'), [
+ 'animate-spin',
+ 'motion-reduce:animate-none',
+ ]);
+ });
+
+ test('caller className composes with the base classes rather than replacing them', () => {
+ const { container } = render(<Spinner className="size-8 text-primary" />);
+
+ expectVisualClassTokens(svgOf(container).getAttribute('class'), [
+ 'animate-spin',
+ 'motion-reduce:animate-none',
+ 'size-8',
+ 'text-primary',
+ ]);
+ });
+
+ test('renders the supplied icon instead of the default glyph', () => {
+ const { container: withDefault } = render(<Spinner />);
+ const defaultMarkup = svgOf(withDefault).innerHTML;
+
+ cleanup();
+
+ const { container: withRefresh } = render(<Spinner icon={RefreshCw} />);
+ const refreshMarkup = svgOf(withRefresh).innerHTML;
+
+ expect(refreshMarkup).not.toBe(defaultMarkup);
+ });
+
+ test('forwards the spinner props to the supplied icon component', () => {
+ let seen: LucideProps | undefined;
+ const ProbeIcon = (props: LucideProps) => {
+ seen = props;
+ return <svg data-testid="probe" />;
+ };
+
+ render(<Spinner icon={ProbeIcon} />);
+
+ expect(seen?.role).toBe('status');
+ expect(seen?.['aria-label']).toEqual(expect.stringMatching(/\S/));
+ });
+
+ test('aria-hidden wins over the default role and label', () => {
+ // The migration relies on this: a spinner inside a labelled `role="status"`
+ // wrapper must stay out of the a11y tree or it is announced twice.
+ render(<Spinner aria-hidden="true" />);
+
+ expect(screen.queryByRole('status')).toBeNull();
+ });
+
+ test('caller-supplied aria-label overrides the default', () => {
+ render(<Spinner aria-label="Syncing project" />);
+
+ expect(screen.getByRole('status').getAttribute('aria-label')).toBe('Syncing project');
+ });
+});
diff --git a/packages/app/src/components/ui/spinner.tsx b/packages/app/src/components/ui/spinner.tsx
new file mode 100644
index 000000000..488603c67
--- /dev/null
+++ b/packages/app/src/components/ui/spinner.tsx
@@ -0,0 +1,45 @@
+import { useLingui } from '@lingui/react/macro';
+import { Loader2Icon, type LucideIcon, type LucideProps } from 'lucide-react';
+import { cn } from '@/lib/utils';
+
+/**
+ * Loading spinner.
+ *
+ * Hand-authored from shadcn/ui's default-style `spinner` rather than installed via
+ * `shadcn add`: this project's configured `radix-nova` style ships a Spinner that
+ * imports `IconPlaceholder` from a path internal to the shadcn website, which does
+ * not resolve here.
+ *
+ * Two deliberate divergences from upstream, recorded so a future `shadcn diff`
+ * reviewer knows the drift is intentional rather than rot:
+ * 1. `motion-reduce:animate-none` — makes reduced motion the default instead of
+ * something each call site has to remember. Continuous spin is a vestibular
+ * trigger, so opting out per call site is the wrong default.
+ * 2. `icon` — lets call sites whose glyph shape carries meaning (RefreshCw for
+ * syncing, Undo2 for reverting) use this primitive instead of hand-rolling
+ * `animate-spin`.
+ * The `aria-label` is localized rather than upstream's hardcoded English.
+ *
+ * Props spread last, so callers override `role` / `aria-label` / `aria-hidden`.
+ * Pass `aria-hidden="true"` wherever a wrapper or enclosing control already names
+ * the loading state — otherwise assistive tech announces it twice.
+ */
+function Spinner({
+ className,
+ icon: Icon = Loader2Icon,
+ ...props
+}: LucideProps & { icon?: LucideIcon }) {
+ const { t } = useLingui();
+
+ return (
+ <Icon
+ role="status"
+ aria-label={t`Loading`}
+ // biome-ignore lint/plugin/no-hand-rolled-spinner: this is the primitive the rule points callers to
+ className={cn('size-4 animate-spin motion-reduce:animate-none', className)}
+ {...props}
+ />
+ );
+}
+
+export { Spinner };
diff --git a/packages/app/src/editor/components/PropPanel.tsx b/packages/app/src/editor/components/PropPanel.tsx
index 2a44df3ed..01eb18b1f 100644
--- a/packages/app/src/editor/components/PropPanel.tsx
+++ b/packages/app/src/editor/components/PropPanel.tsx
@@ -18,7 +18,7 @@
import type { PropDef } from '@inkeep/open-knowledge-core';
import { t } from '@lingui/core/macro';
import { Trans } from '@lingui/react/macro';
-import { ChevronDown, Loader2, Upload } from 'lucide-react';
+import { ChevronDown, Upload } from 'lucide-react';
import { useRef, useState } from 'react';
import { toast } from 'sonner';
import { Badge } from '@/components/ui/badge';
@@ -32,6 +32,7 @@ import {
SelectTrigger,
SelectValue,
} from '@/components/ui/select';
+import { Spinner } from '@/components/ui/spinner';
import { Switch } from '@/components/ui/switch';
import { ColorPickerInput } from '@/editor/components/ColorPickerInput.tsx';
import { IconPickerInput } from '@/editor/components/IconPickerInput.tsx';
@@ -687,7 +688,7 @@ function PropUploadButton({
>
{uploading ? (
<>
- <Loader2 className="size-3.5 animate-spin" aria-hidden="true" />
+ <Spinner className="size-3.5" aria-hidden="true" />
<Trans>Uploading</Trans>
</>
) : (
diff --git a/packages/app/src/editor/extensions/InternalLinkPropPanel.tsx b/packages/app/src/editor/extensions/InternalLinkPropPanel.tsx
index 9abff2e33..c2876f6df 100644
--- a/packages/app/src/editor/extensions/InternalLinkPropPanel.tsx
+++ b/packages/app/src/editor/extensions/InternalLinkPropPanel.tsx
@@ -30,9 +30,10 @@ import {
import { Trans, useLingui } from '@lingui/react/macro';
import type { Editor } from '@tiptap/core';
import { posToDOMRect } from '@tiptap/core';
-import { CircleAlert, File, FolderOpen, Globe, Loader2, Pencil, Plus, Trash2 } from 'lucide-react';
+import { CircleAlert, File, FolderOpen, Globe, Pencil, Plus, Trash2 } from 'lucide-react';
import { useEffect, useId, useRef, useState } from 'react';
import { toast } from 'sonner';
+import { Spinner } from '@/components/ui/spinner';
import { InteractionPropPanel } from '../../components/InteractionPropPanel';
import { resolveLinkTargetIntent } from '../../components/link-target-intent';
import { usePageList } from '../../components/PageListContext';
@@ -511,7 +512,7 @@ export function InternalLinkPropPanel({
if (loading) {
stateLabel = {
- icon: <Loader2 className="size-3.5 shrink-0 animate-spin" aria-hidden="true" />,
+ icon: <Spinner className="size-3.5 shrink-0" aria-hidden="true" />,
text: t`Loading`,
className: 'text-muted-foreground/80',
};
diff --git a/packages/app/src/editor/extensions/WikiLinkPropPanel.tsx b/packages/app/src/editor/extensions/WikiLinkPropPanel.tsx
index 11879c370..9ccb31644 100644
--- a/packages/app/src/editor/extensions/WikiLinkPropPanel.tsx
+++ b/packages/app/src/editor/extensions/WikiLinkPropPanel.tsx
@@ -29,13 +29,13 @@ import {
FileImage,
FolderOpen,
Globe,
- Loader2,
Pencil,
Plus,
Trash2,
} from 'lucide-react';
import { useEffect, useId, useRef, useState } from 'react';
import { toast } from 'sonner';
+import { Spinner } from '@/components/ui/spinner';
import { InteractionPropPanel } from '../../components/InteractionPropPanel';
import { resolveLinkTargetIntent } from '../../components/link-target-intent';
import { usePageList } from '../../components/PageListContext';
@@ -476,7 +476,7 @@ export function WikiLinkPropPanel({ editor, getPos, onClose, onNavigate }: WikiL
let stateLabel: { icon: React.ReactNode; text: string; className: string };
if (loading) {
stateLabel = {
- icon: <Loader2 className="size-3.5 shrink-0 animate-spin" aria-hidden="true" />,
+ icon: <Spinner className="size-3.5 shrink-0" aria-hidden="true" />,
text: t`Loading`,
className: 'text-muted-foreground/80',
};
diff --git a/packages/app/src/locales/ar/messages.po b/packages/app/src/locales/ar/messages.po
index 77885044b..ad540a3e2 100644
--- a/packages/app/src/locales/ar/messages.po
+++ b/packages/app/src/locales/ar/messages.po
@@ -6741,6 +6741,7 @@ msgid "Lives in this project (wherever the skill's folder is) and is shared with
msgstr "يعيش في هذا المشروع (حيثما كان مجلد المهارة) ويُشارَك مع المتعاونين عبر git."
#: src/components/emoji-picker.tsx
+#: src/components/ui/spinner.tsx
#: src/editor/components/TagDialog.tsx
#: src/editor/extensions/InternalLinkPropPanel.tsx
#: src/editor/extensions/WikiLinkPropPanel.tsx
diff --git a/packages/app/src/locales/bn/messages.po b/packages/app/src/locales/bn/messages.po
index bb12c9b6a..fd4a97995 100644
--- a/packages/app/src/locales/bn/messages.po
+++ b/packages/app/src/locales/bn/messages.po
@@ -6737,6 +6737,7 @@ msgid "Lives in this project (wherever the skill's folder is) and is shared with
msgstr "এই প্রকল্পেই থাকে (স্কিলের ফোল্ডার যেখানেই হোক) এবং git-এর মাধ্যমে সহযোগীদের সঙ্গে ভাগ করা হয়।"
#: src/components/emoji-picker.tsx
+#: src/components/ui/spinner.tsx
#: src/editor/components/TagDialog.tsx
#: src/editor/extensions/InternalLinkPropPanel.tsx
#: src/editor/extensions/WikiLinkPropPanel.tsx
diff --git a/packages/app/src/locales/en/messages.po b/packages/app/src/locales/en/messages.po
index 9bb4305e7..e9277c6ef 100644
--- a/packages/app/src/locales/en/messages.po
+++ b/packages/app/src/locales/en/messages.po
@@ -6741,6 +6741,7 @@ msgid "Lives in this project (wherever the skill's folder is) and is shared with
msgstr "Lives in this project (wherever the skill's folder is) and is shared with collaborators through git."
#: src/components/emoji-picker.tsx
+#: src/components/ui/spinner.tsx
#: src/editor/components/TagDialog.tsx
#: src/editor/extensions/InternalLinkPropPanel.tsx
#: src/editor/extensions/WikiLinkPropPanel.tsx
diff --git a/packages/app/src/locales/es/messages.po b/packages/app/src/locales/es/messages.po
index 59ad7a99e..e2a99b29a 100644
--- a/packages/app/src/locales/es/messages.po
+++ b/packages/app/src/locales/es/messages.po
@@ -6741,6 +6741,7 @@ msgid "Lives in this project (wherever the skill's folder is) and is shared with
msgstr "Vive en este proyecto (esté donde esté la carpeta de la habilidad) y se comparte con tus colaboradores mediante git."
#: src/components/emoji-picker.tsx
+#: src/components/ui/spinner.tsx
#: src/editor/components/TagDialog.tsx
#: src/editor/extensions/InternalLinkPropPanel.tsx
#: src/editor/extensions/WikiLinkPropPanel.tsx
diff --git a/packages/app/src/locales/fr/messages.po b/packages/app/src/locales/fr/messages.po
index 1d095f5cf..da67ee146 100644
--- a/packages/app/src/locales/fr/messages.po
+++ b/packages/app/src/locales/fr/messages.po
@@ -6741,6 +6741,7 @@ msgid "Lives in this project (wherever the skill's folder is) and is shared with
msgstr "Réside dans ce projet (où que se trouve le dossier de la compétence) et est partagée avec les collaborateurs via git."
#: src/components/emoji-picker.tsx
+#: src/components/ui/spinner.tsx
#: src/editor/components/TagDialog.tsx
#: src/editor/extensions/InternalLinkPropPanel.tsx
#: src/editor/extensions/WikiLinkPropPanel.tsx
diff --git a/packages/app/src/locales/hi/messages.po b/packages/app/src/locales/hi/messages.po
index c4f2012a2..d30399efe 100644
--- a/packages/app/src/locales/hi/messages.po
+++ b/packages/app/src/locales/hi/messages.po
@@ -6737,6 +6737,7 @@ msgid "Lives in this project (wherever the skill's folder is) and is shared with
msgstr "इसी प्रोजेक्ट में रहता है (जहाँ भी स्किल का फ़ोल्डर है) और git के ज़रिए सहयोगियों के साथ साझा होता है।"
#: src/components/emoji-picker.tsx
+#: src/components/ui/spinner.tsx
#: src/editor/components/TagDialog.tsx
#: src/editor/extensions/InternalLinkPropPanel.tsx
#: src/editor/extensions/WikiLinkPropPanel.tsx
diff --git a/packages/app/src/locales/id/messages.po b/packages/app/src/locales/id/messages.po
index b8c5765b5..c626a073f 100644
--- a/packages/app/src/locales/id/messages.po
+++ b/packages/app/src/locales/id/messages.po
@@ -6737,6 +6737,7 @@ msgid "Lives in this project (wherever the skill's folder is) and is shared with
msgstr "Berada di proyek ini (di mana pun folder keterampilannya) dan dibagikan ke kolaborator lewat git."
#: src/components/emoji-picker.tsx
+#: src/components/ui/spinner.tsx
#: src/editor/components/TagDialog.tsx
#: src/editor/extensions/InternalLinkPropPanel.tsx
#: src/editor/extensions/WikiLinkPropPanel.tsx
diff --git a/packages/app/src/locales/pseudo/messages.po b/packages/app/src/locales/pseudo/messages.po
index 95751080f..a0ff5aa8f 100644
--- a/packages/app/src/locales/pseudo/messages.po
+++ b/packages/app/src/locales/pseudo/messages.po
@@ -6737,6 +6737,7 @@ msgid "Lives in this project (wherever the skill's folder is) and is shared with
msgstr ""
#: src/components/emoji-picker.tsx
+#: src/components/ui/spinner.tsx
#: src/editor/components/TagDialog.tsx
#: src/editor/extensions/InternalLinkPropPanel.tsx
#: src/editor/extensions/WikiLinkPropPanel.tsx
diff --git a/packages/app/src/locales/pt-BR/messages.po b/packages/app/src/locales/pt-BR/messages.po
index a8c7a85e6..38da1f375 100644
--- a/packages/app/src/locales/pt-BR/messages.po
+++ b/packages/app/src/locales/pt-BR/messages.po
@@ -6737,6 +6737,7 @@ msgid "Lives in this project (wherever the skill's folder is) and is shared with
msgstr "Fica neste projeto (onde quer que esteja a pasta da habilidade) e é compartilhada com os colaboradores pelo git."
#: src/components/emoji-picker.tsx
+#: src/components/ui/spinner.tsx
#: src/editor/components/TagDialog.tsx
#: src/editor/extensions/InternalLinkPropPanel.tsx
#: src/editor/extensions/WikiLinkPropPanel.tsx
diff --git a/packages/app/src/locales/ur/messages.po b/packages/app/src/locales/ur/messages.po
index 2423aad46..5299e3fc9 100644
--- a/packages/app/src/locales/ur/messages.po
+++ b/packages/app/src/locales/ur/messages.po
@@ -6741,6 +6741,7 @@ msgid "Lives in this project (wherever the skill's folder is) and is shared with
msgstr "اسی پروجیکٹ میں رہتا ہے (جہاں بھی مہارت کا فولڈر ہو) اور git کے ذریعے ساتھیوں کے ساتھ مشترک ہوتا ہے۔"
#: src/components/emoji-picker.tsx
+#: src/components/ui/spinner.tsx
#: src/editor/components/TagDialog.tsx
#: src/editor/extensions/InternalLinkPropPanel.tsx
#: src/editor/extensions/WikiLinkPropPanel.tsx
diff --git a/packages/app/src/locales/zh-Hans/messages.po b/packages/app/src/locales/zh-Hans/messages.po
index 1d65660f5..521e3c982 100644
--- a/packages/app/src/locales/zh-Hans/messages.po
+++ b/packages/app/src/locales/zh-Hans/messages.po
@@ -6741,6 +6741,7 @@ msgid "Lives in this project (wherever the skill's folder is) and is shared with
msgstr "保存在这个项目里(技能文件夹在哪里都行),并通过 git 与协作者共享。"
#: src/components/emoji-picker.tsx
+#: src/components/ui/spinner.tsx
#: src/editor/components/TagDialog.tsx
#: src/editor/extensions/InternalLinkPropPanel.tsx
#: src/editor/extensions/WikiLinkPropPanel.tsx
diff --git a/packages/app/src/locales/zh-Hant/messages.po b/packages/app/src/locales/zh-Hant/messages.po
index 6fcd3a415..5ca6b1435 100644
--- a/packages/app/src/locales/zh-Hant/messages.po
+++ b/packages/app/src/locales/zh-Hant/messages.po
@@ -6741,6 +6741,7 @@ msgid "Lives in this project (wherever the skill's folder is) and is shared with
msgstr "放在這個專案裡(技能資料夾在哪都行),並透過 git 分享給協作者。"
#: src/components/emoji-picker.tsx
+#: src/components/ui/spinner.tsx
#: src/editor/components/TagDialog.tsx
#: src/editor/extensions/InternalLinkPropPanel.tsx
#: src/editor/extensions/WikiLinkPropPanel.tsx
diff --git a/packages/app/src/uninstall/UninstallProgressScreen.tsx b/packages/app/src/uninstall/UninstallProgressScreen.tsx
index 2a0116835..18b409a78 100644
--- a/packages/app/src/uninstall/UninstallProgressScreen.tsx
+++ b/packages/app/src/uninstall/UninstallProgressScreen.tsx
@@ -1,5 +1,5 @@
import { Trans } from '@lingui/react/macro';
-import { Loader2 } from 'lucide-react';
+import { Spinner } from '@/components/ui/spinner';
/**
* Shown while the bundled CLI removes the OpenKnowledge footprint.
@@ -12,10 +12,7 @@ export function UninstallProgressScreen() {
return (
<main className="grid h-dvh place-items-center bg-background text-foreground">
<div role="status" className="max-w-vw px-7 py-7 text-center">
- <Loader2
- aria-hidden="true"
- className="mx-auto mb-4 size-8 animate-spin text-primary motion-reduce:animate-none"
- />
+ <Spinner aria-hidden="true" className="mx-auto mb-4 size-8 text-primary" />
<h1 className="mb-2 font-medium text-base leading-none">
{/* biome-ignore lint/plugin/microcopy-ellipsis: the uninstall migration to React is a
pure render-swap — this heading is carried over verbatim from the screen it replaces,