Skip to content

Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.

fix(costs): the catch-up notice tolerates a summary without index status

rubenluetke10-beepcee37d238895
diff --git a/jarvis/ui/web/frontend/src/hooks/useCosts.ts b/jarvis/ui/web/frontend/src/hooks/useCosts.ts
index 96ffd17d9a..a5c2e37a25 100644
--- a/jarvis/ui/web/frontend/src/hooks/useCosts.ts
+++ b/jarvis/ui/web/frontend/src/hooks/useCosts.ts
@@ -125,8 +125,12 @@ export interface CostSummary {
facets: CostFacets;
currency: CostCurrency;
sources_present: string[];
- /** Whether the coding-CLI numbers are final yet, and how far they are. */
- index: CostIndexStatus;
+ /**
+ * Whether the coding-CLI numbers are final yet, and how far they are.
+ * Optional on the wire: a backend from before the field (the bundle
+ * reloads before the server restarts) answers without it.
+ */
+ index?: CostIndexStatus;
}
/**
diff --git a/jarvis/ui/web/frontend/src/views/CostsView.tsx b/jarvis/ui/web/frontend/src/views/CostsView.tsx
index 4db3c89ed7..38f96a3bea 100644
--- a/jarvis/ui/web/frontend/src/views/CostsView.tsx
+++ b/jarvis/ui/web/frontend/src/views/CostsView.tsx
@@ -300,7 +300,7 @@ export function CostsView() {
total reads as money gone missing ($8 000 next to yesterday's
$12 300, 2026-08-27). Say it is still counting, and how far it is.
*/}
- {data && !data.index.complete ? (
+ {data?.index && !data.index.complete ? (
<EmptyRow>
{fill(t("costs_view.index_catching_up"), {
indexed: formatExact(data.index.files_indexed),