Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix: ack error handling, consistent polling, remove unused CSS
  • Loading branch information
KyoX
KyoX committed Jul 9, 2026
commit d71689b4a927410f07b033515a5a778897af176b
3 changes: 0 additions & 3 deletions dashboard/frontend/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,6 @@
.alert-err {
@apply bg-[#3d1f1f] border border-danger text-danger;
}
.alert-warn {
@apply bg-[#3d2e0c] border border-warning text-warning;
}

.tabs {
@apply flex gap-1 mb-5 border-b border-border;
Expand Down
40 changes: 22 additions & 18 deletions dashboard/frontend/src/pages/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,14 @@ export default function Dashboard() {
}, []);

useEffect(() => {
fetch("/api/alerts?limit=20")
.then(r => r.ok ? r.json() : [])
.then(a => setAlerts(Array.isArray(a) ? a : []))
.catch(() => {});
const t = setInterval(() => {
const poll = () => {
fetch("/api/alerts?limit=20")
.then(r => r.ok ? r.json() : [])
.then(a => setAlerts(Array.isArray(a) ? a : []))
.catch(() => {});
}, 15000);
};
poll();
const t = setInterval(poll, 15000);
return () => clearInterval(t);
}, []);

Expand Down Expand Up @@ -157,21 +155,27 @@ function ActiveAlerts({ alerts, setAlerts }: { alerts: AlertItem[]; setAlerts: (
};

const ackOne = async (id: string) => {
await fetch(`/api/alerts/${id}/acknowledge`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ by: "ui" }),
});
setAlerts(alerts.map(a => a.id === id ? { ...a, acknowledged: true, acknowledged_by: "ui" } : a));
try {
const res = await fetch(`/api/alerts/${id}/acknowledge`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ by: "ui" }),
});
if (!res.ok) return;
setAlerts(alerts.map(a => a.id === id ? { ...a, acknowledged: true, acknowledged_by: "ui" } : a));
} catch { /* ignore — next poll will sync */ }
};

const ackAll = async () => {
await fetch("/api/alerts/acknowledge-all", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ by: "ui" }),
});
setAlerts(alerts.map(a => ({ ...a, acknowledged: true, acknowledged_by: "ui" })));
try {
const res = await fetch("/api/alerts/acknowledge-all", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ by: "ui" }),
});
if (!res.ok) return;
setAlerts(alerts.map(a => ({ ...a, acknowledged: true, acknowledged_by: "ui" })));
} catch { /* ignore — next poll will sync */ }
};

return (
Expand Down
2 changes: 1 addition & 1 deletion opencode.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
},
"explore": {
"mode": "subagent",
"model": "nvidia/deepseek-ai/deepseek-v4-flash"
"model": "nvidia/minimaxai/minimax-m3"
},
"general": {
"mode": "subagent",
Expand Down