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.
Python agent-orchestrationai-agentai-coding-assistantclaude-codecoding-agentcomputer-usedesktop-applocal-firstmcppersonal-jarvisvoice-assistantvoice-coding
fix(ultrawiki): say the store is closed instead of calling it empty
Ruben Lütkeaf550103fc85
diff --git a/jarvis/ui/web/frontend/src/components/ultrawiki/ImportProgress.test.tsx b/jarvis/ui/web/frontend/src/components/ultrawiki/ImportProgress.test.tsxindex 670bd23259..1570e89783 100644--- a/jarvis/ui/web/frontend/src/components/ultrawiki/ImportProgress.test.tsx+++ b/jarvis/ui/web/frontend/src/components/ultrawiki/ImportProgress.test.tsx@@ -109,12 +109,15 @@ describe("ImportProgress — honest pipeline state", () => {const state = screen.getByTestId("ultrawiki-pipeline-state");expect(state.getAttribute("data-state")).toBe("processing");- expect(state.textContent).toContain("6");expect(screen.getByTestId("ultrawiki-pipeline-running")).toBeDefined();+ // The backlog is stated ONCE, in the summary. The state label used to+ // carry it too, next to a backend reason that carried it a third time.+ expect(state.textContent).not.toContain("6");// The summary reports the corpus in cumulative terms — the reading that// "Keyword-searchable 0 · Embedded 3237" got wrong.const summary = screen.getByTestId("ultrawiki-progress-summary").textContent;+ expect(summary).toContain("6");expect(summary).toContain("51");expect(summary).toContain("45");expect(summary).toContain("being summarised");diff --git a/jarvis/ui/web/frontend/src/components/ultrawiki/ImportProgress.tsx b/jarvis/ui/web/frontend/src/components/ultrawiki/ImportProgress.tsxindex a97a99e7e7..2c536194e9 100644--- a/jarvis/ui/web/frontend/src/components/ultrawiki/ImportProgress.tsx+++ b/jarvis/ui/web/frontend/src/components/ultrawiki/ImportProgress.tsx@@ -114,11 +114,7 @@ export function ImportProgress({data-testid="ultrawiki-import-progress"><div className="flex flex-wrap items-center gap-x-3 gap-y-1 text-[11px]">- <PipelineState- pipeline={pipeline}- pending={progress?.waiting ?? 0}- onOpenSources={onOpenSources}- />+ <PipelineState pipeline={pipeline} onOpenSources={onOpenSources} />{progress && progress.total > 0 && (<pclassName="text-muted-foreground"@@ -222,11 +218,9 @@ export function ImportProgress({*/function PipelineState({pipeline,- pending,onOpenSources,}: {pipeline: UltraWikiPipeline;- pending: number;onOpenSources?: () => void;}): JSX.Element {const t = useT();@@ -265,10 +259,10 @@ function PipelineState({data-testid="ultrawiki-pipeline-running"/>),- label: t("ultrawiki.progress.state_processing").replace(- "{0}",- formatCount(pending),- ),+ // No count here: the summary beside it already says how many are+ // left and what for. The strip used to print the same number three+ // times in one line — state, summary, and the backend's reason.+ label: t("ultrawiki.progress.state_processing"),}: state === "paused"? {diff --git a/jarvis/ui/web/frontend/src/components/ultrawiki/overview/OverviewTab.test.tsx b/jarvis/ui/web/frontend/src/components/ultrawiki/overview/OverviewTab.test.tsxindex 4195ca817d..1be86d57c4 100644--- a/jarvis/ui/web/frontend/src/components/ultrawiki/overview/OverviewTab.test.tsx+++ b/jarvis/ui/web/frontend/src/components/ultrawiki/overview/OverviewTab.test.tsx@@ -110,6 +110,28 @@ describe("VerdictCard — the sentence that used to be wrong", () => {const empty: UltraWikiProgress = { ...SCREENSHOT, state: "empty", total: 0, searchable: 0, summarised: 0, waiting: 0, next_step: null };expect(verdictToneOf(empty, "idle", false)).toBe("empty");});++ it("does not call a closed store empty", () => {+ // Found live: while the app boots, /status answers with zeroed counts, and+ // the screen announced "Nothing stored yet." over a store holding 4 712+ // items. A store that is not open cannot report its contents.+ const zeroed: UltraWikiProgress = { ...SCREENSHOT, state: "empty", total: 0, searchable: 0, summarised: 0, waiting: 0, next_step: null };+ expect(verdictToneOf(zeroed, "paused", false, false)).toBe("starting");++ renderWithQuery(+ <VerdictCard+ progress={zeroed}+ pipeline={{ running: false, state: "paused", processed: {} }}+ usable={false}+ started={false}+ />,+ );+ const card = screen.getByTestId("ultrawiki-verdict");+ expect(card.getAttribute("data-tone")).toBe("starting");+ expect(card.textContent).not.toContain("Nothing stored yet");+ // And no bar, because there is nothing measured to draw.+ expect(screen.queryByTestId("ultrawiki-intake-bar")).toBeNull();+ });});describe("IntakeBar — the corpus at true scale", () => {diff --git a/jarvis/ui/web/frontend/src/components/ultrawiki/overview/OverviewTab.tsx b/jarvis/ui/web/frontend/src/components/ultrawiki/overview/OverviewTab.tsxindex 1446fc1b20..ad2ff7731b 100644--- a/jarvis/ui/web/frontend/src/components/ultrawiki/overview/OverviewTab.tsx+++ b/jarvis/ui/web/frontend/src/components/ultrawiki/overview/OverviewTab.tsx@@ -79,6 +79,7 @@ export function OverviewTab({progress={progress}pipeline={status.pipeline}usable={health?.usable ?? false}+ started={status.started}/><SourceRosterdiff --git a/jarvis/ui/web/frontend/src/components/ultrawiki/overview/VerdictCard.tsx b/jarvis/ui/web/frontend/src/components/ultrawiki/overview/VerdictCard.tsxindex fb0aee60b7..76a646693d 100644--- a/jarvis/ui/web/frontend/src/components/ultrawiki/overview/VerdictCard.tsx+++ b/jarvis/ui/web/frontend/src/components/ultrawiki/overview/VerdictCard.tsx@@ -17,7 +17,7 @@ import { Eyebrow, Num, formatCount } from "@/components/ultrawiki/overview/primiimport { IntakeBar } from "@/components/ultrawiki/overview/IntakeBar";import type { UltraWikiPipeline, UltraWikiProgress } from "@/lib/ultrawikiApi";-type Tone = "done" | "working" | "stalled" | "notready" | "empty";+type Tone = "done" | "working" | "stalled" | "notready" | "empty" | "starting";const TONE_STYLE: Record<Tone, { headline: string; rule: string }> = {done: { headline: "text-[#5bd4a4]", rule: "bg-[#5bd4a4]" },@@ -25,21 +25,30 @@ const TONE_STYLE: Record<Tone, { headline: string; rule: string }> = {stalled: { headline: "text-[#ffb84d]", rule: "bg-[#ffb84d]" },notready: { headline: "text-[#ffb84d]", rule: "bg-[#ffb84d]" },empty: { headline: "text-foreground", rule: "bg-muted-foreground/40" },+ starting: { headline: "text-muted-foreground", rule: "bg-muted-foreground/40" },};/**- * Which of the five situations the store is in.+ * Which of the six situations the store is in.** Ordered by what a reader needs to hear first: an empty store is not a* fault, a stalled queue outranks a busy one, and a backlog never demotes a* usable knowledge base to "not ready" — the processed part answers questions* while the rest catches up.+ *+ * ``started`` comes first for a reason found in live testing: while the app+ * boots, the status route answers with zeroed counts, and the screen read+ * "Nothing stored yet." over a store holding 4 712 items. A closed store+ * cannot report what is in it, so the honest answer is that it is not open —+ * not a claim about its contents.*/export function verdictToneOf(progress: UltraWikiProgress,pipelineState: string,usable: boolean,+ started = true,): Tone {+ if (!started) return "starting";if (progress.total === 0) return "empty";if (!usable) return "notready";if (progress.waiting > 0) {@@ -52,37 +61,48 @@ export function VerdictCard({progress,pipeline,usable,+ started = true,}: {progress: UltraWikiProgress;pipeline: UltraWikiPipeline;usable: boolean;+ /** Is the knowledge store actually open? A closed store reports zeros. */+ started?: boolean;}): JSX.Element {const t = useT();const pipelineState = String(pipeline.state ?? "");- const tone = verdictToneOf(progress, pipelineState, usable);+ const tone = verdictToneOf(progress, pipelineState, usable, started);const style = TONE_STYLE[tone];const step = t(`ultrawiki.overview.step_${progress.next_step ?? "processing"}`,);- const detail =- tone === "empty"- ? t("ultrawiki.overview.detail_empty")- : tone === "notready"- ? t("ultrawiki.overview.detail_notready")- : tone === "done"- ? t("ultrawiki.overview.detail_done").replace(- "{0}",- formatCount(progress.total),- )- : t(- tone === "stalled"- ? "ultrawiki.overview.detail_stalled"- : "ultrawiki.overview.detail_working",- )- .replace("{0}", formatCount(progress.waiting))- .replace("{1}", formatCount(progress.total))- .replace("{2}", step);+ // One line per situation, spelled out rather than nested into a ternary+ // chain — these sentences are the point of the screen and have to stay easy+ // to read in the source too.+ let detail: string;+ switch (tone) {+ case "starting":+ case "empty":+ case "notready":+ detail = t(`ultrawiki.overview.detail_${tone}`);+ break;+ case "done":+ detail = t("ultrawiki.overview.detail_done").replace(+ "{0}",+ formatCount(progress.total),+ );+ break;+ default:+ detail = t(+ tone === "stalled"+ ? "ultrawiki.overview.detail_stalled"+ : "ultrawiki.overview.detail_working",+ )+ .replace("{0}", formatCount(progress.waiting))+ .replace("{1}", formatCount(progress.total))+ .replace("{2}", step);+ }return (<section data-testid="ultrawiki-verdict" data-tone={tone}>@@ -135,7 +155,9 @@ export function VerdictCard({</p>)}- {progress.total > 0 && (+ {/* No bar while the store is closed: its numbers would be zeros the+ backend never measured. */}+ {started && progress.total > 0 && (<div className="mt-4"><IntakeBarprogress={progress}diff --git a/jarvis/ui/web/frontend/src/i18n/locales/de.json b/jarvis/ui/web/frontend/src/i18n/locales/de.jsonindex cb4abfff4a..88bc4ab173 100644--- a/jarvis/ui/web/frontend/src/i18n/locales/de.json+++ b/jarvis/ui/web/frontend/src/i18n/locales/de.json@@ -2712,6 +2712,21 @@},"ultrawiki": {"explore": {+ "vault": {+ "title": "Obsidian-Vault",+ "hint": "Dieselben Inhalte als Markdown-Dateien auf der Festplatte.",+ "export": "Exportieren",+ "exporting": "Wird geschrieben …",+ "exported": "{0} Notizen geschrieben, {1} unverändert.",+ "notes": "{0} Notizen",+ "never": "Noch nie exportiert",+ "last": "Zuletzt am {0}",+ "register": "Bei Obsidian anmelden",+ "registering": "Wird angemeldet …",+ "registered": "In Obsidian eingetragen",+ "not_installed": "Obsidian ist auf diesem Gerät nicht installiert. Die Dateien liegen trotzdem bereit — du kannst sie mit jedem Markdown-Programm öffnen.",+ "error": "Hat nicht geklappt: {0}"+ },"vault": {"title": "Obsidian-Vault","hint": "Dieselben Inhalte als Markdown-Dateien auf der Festplatte.",@@ -2893,7 +2908,7 @@"retry_failed_done": "{0} Eintrag/Einträge erneut eingereiht - sie machen an ihrer letzten fertigen Stufe weiter.","retry_failed_error": "Neuversuch konnte nicht starten: {0}","state_waiting_for_sources": "Wartet auf freigegebene Quellen — es wird noch nichts gelesen.",- "state_processing": "Arbeitet — noch {0}",+ "state_processing": "Arbeitet","state_paused": "Pausiert","state_idle": "Bereit — alles verarbeitet","open_sources": "Quellen öffnen",@@ -3223,6 +3238,8 @@"headline_stalled": "Bereit für Fragen, aber die Warteschlange steht.","headline_notready": "Noch nicht bereit für Fragen.","headline_empty": "Noch nichts gespeichert.",+ "headline_starting": "Der Wissensspeicher ist noch nicht geöffnet.",+ "detail_starting": "Solange er nicht offen ist, kann er nicht sagen, was er enthält — deshalb stehen hier keine Zahlen. Das erledigt sich meist Sekunden nach dem Start; wenn nicht, sagen die Prüfungen unten warum.","detail_done": "Alle {0} Einträge sind durchsuchbar und zusammengefasst.","detail_working": "{0} von {1} werden noch {2}. Alles andere ist schon durchsuchbar — du musst nicht warten.","detail_stalled": "{0} von {1} werden noch {2} — aber im Moment arbeitet nichts daran.",diff --git a/jarvis/ui/web/frontend/src/i18n/locales/en.json b/jarvis/ui/web/frontend/src/i18n/locales/en.jsonindex b26077914e..65c46036de 100644--- a/jarvis/ui/web/frontend/src/i18n/locales/en.json+++ b/jarvis/ui/web/frontend/src/i18n/locales/en.json@@ -2894,7 +2894,7 @@"retry_failed_done": "{0} item(s) queued again - they resume from their last completed stage.","retry_failed_error": "Retry did not start: {0}","state_waiting_for_sources": "Waiting for approved sources — nothing is being read yet.",- "state_processing": "Working — {0} left",+ "state_processing": "Working","state_paused": "Paused","state_idle": "Idle — everything is processed","open_sources": "Open Sources",@@ -3224,6 +3224,8 @@"headline_stalled": "Ready to answer, but the queue is standing still.","headline_notready": "Not ready to answer yet.","headline_empty": "Nothing stored yet.",+ "headline_starting": "The knowledge store is not open yet.",+ "detail_starting": "Until it opens it cannot say what it holds, so no numbers are shown. This usually clears within seconds of starting the app; if it does not, the checks below say why.","detail_done": "All {0} items are searchable and summarised.","detail_working": "{0} of {1} are still {2}. Everything else can be searched right now — you do not have to wait.","detail_stalled": "{0} of {1} are still {2} — but nothing is processing them right now.",diff --git a/jarvis/ui/web/frontend/src/i18n/locales/es.json b/jarvis/ui/web/frontend/src/i18n/locales/es.jsonindex 8135c334c7..e6d375046a 100644--- a/jarvis/ui/web/frontend/src/i18n/locales/es.json+++ b/jarvis/ui/web/frontend/src/i18n/locales/es.json@@ -2893,7 +2893,7 @@"retry_failed_done": "{0} elemento(s) en cola de nuevo - continúan desde su última etapa completada.","retry_failed_error": "El reintento no pudo iniciarse: {0}","state_waiting_for_sources": "Esperando fuentes aprobadas: todavía no se lee nada.",- "state_processing": "Trabajando: quedan {0}",+ "state_processing": "Trabajando","state_paused": "En pausa","state_idle": "Inactivo: todo está procesado","open_sources": "Abrir Fuentes",@@ -3223,6 +3223,8 @@"headline_stalled": "Listo para responder, pero la cola está parada.","headline_notready": "Todavía no puede responder.","headline_empty": "Aún no hay nada guardado.",+ "headline_starting": "El almacén de conocimiento aún no está abierto.",+ "detail_starting": "Mientras no se abra no puede decir qué contiene, por eso no se muestran cifras. Suele resolverse a los pocos segundos de arrancar; si no, las comprobaciones de abajo dicen por qué.","detail_done": "Los {0} elementos son buscables y están resumidos.","detail_working": "{0} de {1} siguen {2}. Todo lo demás ya se puede buscar: no hace falta esperar.","detail_stalled": "{0} de {1} siguen {2}, pero ahora mismo nada los está procesando.",