spb/worthdoing Public
Autonomous investigation agent that discovers, challenges, and ranks things genuinely worth doing — Claude + Firecrawl, Next.js 16, PostgreSQL
TypeScript 91.5%
SQL 5.8%
CSS 2.2%
1/**2 * WorthDoing.ai3 * Author: Simon-Pierre Boucher4 * Contact: contact@spboucher.ai5 * File: src/components/wd/ConfidenceBar.tsx6 * Description: Thin animated confidence bar — width transitions on real confidence changes.7 */8import { cn } from "@/lib/utils";910export function ConfidenceBar({11 value,12 tone = "auto",13 className,14}: {15 value: number; // 0..116 tone?: "auto" | "verdict" | "signal" | "rust" | "tele" | "ink";17 className?: string;18}) {19 const resolved =20 tone === "auto" ? (value >= 0.65 ? "verdict" : value >= 0.4 ? "signal" : "rust") : tone;21 const toneClass: Record<string, string> = {22 verdict: "bg-verdict",23 signal: "bg-signal",24 rust: "bg-rust",25 tele: "bg-tele",26 ink: "bg-ink",27 };28 return (29 <div className={cn("h-1.5 w-full overflow-hidden rounded-full bg-line/70", className)}>30 <div31 className={cn("wd-bar h-full rounded-full", toneClass[resolved])}32 style={{ width: `${Math.round(Math.max(0, Math.min(1, value)) * 100)}%` }}33 />34 </div>35 );36}37