feat(03-03): add BudgetAlertBanner component and integrate into Dashboard
- Create BudgetAlertBanner with threshold detection (>=80% budget utilization) - Display agent names with percentages, warn color for 80-99%, danger for 100%+ - Dismissible per session with auto-reset on new threshold crossings - View Costs link navigates to costs section - Accessible with role=alert, aria-live=assertive, keyboard-dismissible - Framer Motion fade-in/slide-down animation, respects reduced motion - Positioned after RecoveryBanner in Dashboard layout
This commit is contained in:
1 parent
e0ee5bb5ad
commit
931e38c823
2 files changed
+127
No files matched your search
@@ -43,6 +43,7 @@ import { SprintProgress } from "./SprintProgress";
|
||||
import { GoalProgress } from "./GoalProgress";
|
||||
import { NeedsAttention } from "./NeedsAttention";
|
||||
import { RecoveryBanner } from "./RecoveryBanner";
|
||||
import { BudgetAlertBanner } from "./BudgetAlertBanner";
|
||||
|
||||
export interface DashboardProps {
|
||||
agents: AgentRecord[];
|
||||
@@ -90,6 +91,9 @@ export function Dashboard(props: DashboardProps) {
|
||||
{/* Recovery banner for interrupted runs */}
|
||||
<RecoveryBanner />
|
||||
|
||||
{/* Budget alert banner for agents approaching budget limits */}
|
||||
<BudgetAlertBanner agents={agents} onNavigate={onNavigate} />
|
||||
|
||||
{/* Health + Metrics */}
|
||||
<div className="flex flex-col gap-6 lg:flex-row lg:items-start">
|
||||
<div className="shrink-0 rounded-[12px] border border-[color:var(--line)] bg-[color:var(--panel)] p-5">
|
||||
|
||||
Reference in new issue
Block a user