Skip to content

Commit 435eb5e

Browse files
Fix web UI type errors: use correct Badge variant names
1 parent a0c5a45 commit 435eb5e

5 files changed

Lines changed: 11 additions & 13 deletions

File tree

packages/web/src/components/chat/artifact-panel.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,11 @@ function ArtifactRenderer({ artifact }: { artifact: Artifact }) {
139139
<div className="text-[10px] text-[var(--color-text-tertiary)] mt-0.5">
140140
{r.page_type as string} · score: {((r.relevance_score as number) ?? 0).toFixed(2)}
141141
</div>
142-
{r.snippet && (
142+
{r.snippet ? (
143143
<p className="text-xs text-[var(--color-text-secondary)] mt-1 line-clamp-3">
144144
{r.snippet as string}
145145
</p>
146-
)}
146+
) : null}
147147
</div>
148148
))}
149149
{results.length === 0 && (

packages/web/src/components/decisions/decision-detail.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ import { Badge } from "@/components/ui/badge";
55
import { patchDecision } from "@/lib/api/decisions";
66
import type { DecisionRecordResponse } from "@/lib/api/types";
77

8-
const STATUS_VARIANT: Record<string, "default" | "secondary" | "destructive" | "outline"> = {
9-
active: "default",
10-
proposed: "secondary",
11-
deprecated: "destructive",
8+
const STATUS_VARIANT: Record<string, "default" | "fresh" | "stale" | "outdated" | "outline" | "accent"> = {
9+
active: "fresh",
10+
proposed: "accent",
11+
deprecated: "outdated",
1212
superseded: "outline",
1313
};
1414

packages/web/src/components/decisions/decision-health-widget.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,10 @@ export function DecisionHealthWidget({ repoId }: DecisionHealthWidgetProps) {
2727
<StatCard
2828
label="Proposed"
2929
value={summary.proposed}
30-
variant={summary.proposed > 0 ? "warning" : "default"}
3130
/>
3231
<StatCard
3332
label="Stale"
3433
value={summary.stale}
35-
variant={summary.stale > 0 ? "danger" : "default"}
3634
/>
3735
</div>
3836
);

packages/web/src/components/decisions/decisions-table.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ import { Badge } from "@/components/ui/badge";
77
import { listDecisions } from "@/lib/api/decisions";
88
import type { DecisionRecordResponse } from "@/lib/api/types";
99

10-
const STATUS_VARIANT: Record<string, "default" | "secondary" | "destructive" | "outline"> = {
11-
active: "default",
12-
proposed: "secondary",
13-
deprecated: "destructive",
10+
const STATUS_VARIANT: Record<string, "default" | "fresh" | "stale" | "outdated" | "outline" | "accent"> = {
11+
active: "fresh",
12+
proposed: "accent",
13+
deprecated: "outdated",
1414
superseded: "outline",
1515
};
1616

packages/web/src/components/repos/repo-settings-form.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ export function RepoSettingsForm({ repo }: RepoSettingsFormProps) {
119119
<div className="flex items-center gap-2">
120120
<span className="text-sm font-medium">Excluded Paths</span>
121121
{patterns.length > 0 && (
122-
<Badge variant="secondary" className="text-xs">
122+
<Badge variant="accent" className="text-xs">
123123
{patterns.length} active
124124
</Badge>
125125
)}

0 commit comments

Comments
 (0)