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
feat(ultrawiki): one-click retry for dead-lettered items in the status strip
Ruben Lütkec51e50f47755
diff --git a/jarvis/ui/web/frontend/src/components/ultrawiki/ImportProgress.test.tsx b/jarvis/ui/web/frontend/src/components/ultrawiki/ImportProgress.test.tsxindex a9a0ae6202..fdc37b58ba 100644--- a/jarvis/ui/web/frontend/src/components/ultrawiki/ImportProgress.test.tsx+++ b/jarvis/ui/web/frontend/src/components/ultrawiki/ImportProgress.test.tsx@@ -142,3 +142,42 @@ describe("ImportProgress — honest pipeline state", () => {).toBe("idle");});});++describe("ImportProgress — retry-failed button", () => {+ const IDLE: UltraWikiPipeline = { running: true, state: "processing", processed: {} };++ it("is absent while nothing has failed", () => {+ renderStrip(IDLE, { ...NO_COUNTS, failed: 0 });+ expect(screen.queryByTestId("ultrawiki-retry-failed")).toBeNull();+ });++ it("appears with failed items and posts the requeue, then refreshes", async () => {+ const calls: string[] = [];+ vi.stubGlobal(+ "fetch",+ vi.fn(async (url: RequestInfo | URL) => {+ calls.push(String(url));+ return new Response(+ JSON.stringify({ ok: true, requeued: 32, source_id: "", detail: "" }),+ { status: 200, headers: { "Content-Type": "application/json" } },+ );+ }),+ );+ const onChanged = vi.fn();+ render(+ <ImportProgress+ counts={{ ...NO_COUNTS, failed: 32 }}+ pipeline={IDLE}+ jobs={[]}+ onChanged={onChanged}+ />,+ );++ const button = screen.getByTestId("ultrawiki-retry-failed");+ fireEvent.click(button);+ await vi.waitFor(() => expect(onChanged).toHaveBeenCalledTimes(1));+ expect(+ calls.some((u) => u.includes("/api/ultrawiki/pipeline/requeue-failed")),+ ).toBe(true);+ });+});diff --git a/jarvis/ui/web/frontend/src/components/ultrawiki/ImportProgress.tsx b/jarvis/ui/web/frontend/src/components/ultrawiki/ImportProgress.tsxindex 40e123fc8f..577bed9211 100644--- a/jarvis/ui/web/frontend/src/components/ultrawiki/ImportProgress.tsx+++ b/jarvis/ui/web/frontend/src/components/ultrawiki/ImportProgress.tsx@@ -9,7 +9,14 @@* poll up to a few seconds while a job is active).*/import { useState } from "react";-import { AlertTriangle, CheckCircle2, Loader2, PauseCircle, XCircle } from "lucide-react";+import {+ AlertTriangle,+ CheckCircle2,+ Loader2,+ PauseCircle,+ RotateCcw,+ XCircle,+} from "lucide-react";import { cn } from "@/lib/utils";import { useT } from "@/i18n";@@ -17,6 +24,7 @@ import { useEventStore } from "@/store/events";import {ULTRAWIKI_ACTIVE_JOB_STATUSES,cancelUltraWikiJob,+ requeueUltraWikiFailed,type UltraWikiCounts,type UltraWikiJob,type UltraWikiPipeline,@@ -46,6 +54,32 @@ export function ImportProgress({const t = useT();const pushToast = useEventStore((s) => s.pushToast);const [cancelling, setCancelling] = useState<string | null>(null);+ const [retrying, setRetrying] = useState(false);++ async function handleRetryFailed() {+ setRetrying(true);+ try {+ const result = await requeueUltraWikiFailed();+ pushToast(+ "success",+ t("ultrawiki.progress.retry_failed_done").replace(+ "{0}",+ String(result.requeued),+ ),+ );+ onChanged();+ } catch (e) {+ pushToast(+ "error",+ t("ultrawiki.progress.retry_failed_error").replace(+ "{0}",+ (e as Error).message,+ ),+ );+ } finally {+ setRetrying(false);+ }+ }async function handleCancel(jobId: string) {setCancelling(jobId);@@ -116,6 +150,22 @@ export function ImportProgress({);})}</dl>+ {(counts.failed ?? 0) > 0 && (+ <button+ type="button"+ onClick={() => void handleRetryFailed()}+ disabled={retrying}+ data-testid="ultrawiki-retry-failed"+ className="inline-flex items-center gap-1 rounded-md border border-destructive/40 px-1.5 py-0.5 text-destructive hover:bg-destructive/10 disabled:opacity-50"+ >+ {retrying ? (+ <Loader2 className="h-3 w-3 animate-spin" aria-hidden />+ ) : (+ <RotateCcw className="h-3 w-3" aria-hidden />+ )}+ {t("ultrawiki.progress.retry_failed")}+ </button>+ )}</div>{pipeline.reason && (diff --git a/jarvis/ui/web/frontend/src/i18n/locales/de.json b/jarvis/ui/web/frontend/src/i18n/locales/de.jsonindex 21a38865cc..f40052cc2f 100644--- a/jarvis/ui/web/frontend/src/i18n/locales/de.json+++ b/jarvis/ui/web/frontend/src/i18n/locales/de.json@@ -2745,6 +2745,9 @@"pipeline_idle": "Pipeline wartet","cancel": "Abbrechen","cancel_failed": "Job konnte nicht abgebrochen werden: {0}",+ "retry_failed": "Fehlgeschlagene erneut versuchen",+ "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": "Verarbeitet ({0} offen)","state_paused": "Pausiert",@@ -3029,5 +3032,15 @@"partial": "{0} von {1} Quellen vollständig angekommen.","numbers": "gelesen {0} · {1} neu · {2} geändert · {3} unverändert · {4} gespeichert"}+ },+ "edit_menu": {+ "label": "Bearbeiten",+ "cut": "Ausschneiden",+ "copy": "Kopieren",+ "paste": "Einfügen",+ "select_all": "Alles auswählen",+ "copy_failed": "Kopieren in die Zwischenablage nicht möglich.",+ "paste_unavailable": "Zwischenablage konnte nicht gelesen werden.",+ "paste_failed": "Hier kann nicht eingefügt werden."}}diff --git a/jarvis/ui/web/frontend/src/i18n/locales/en.json b/jarvis/ui/web/frontend/src/i18n/locales/en.jsonindex 9bac5ea7a4..6c398bc7fc 100644--- a/jarvis/ui/web/frontend/src/i18n/locales/en.json+++ b/jarvis/ui/web/frontend/src/i18n/locales/en.json@@ -2746,6 +2746,9 @@"pipeline_idle": "Pipeline idle","cancel": "Cancel","cancel_failed": "Could not cancel the job: {0}",+ "retry_failed": "Retry failed items",+ "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": "Processing ({0} pending)","state_paused": "Paused",@@ -3030,5 +3033,15 @@"partial": "{0} of {1} source(s) fully landed.","numbers": "read {0} · {1} new · {2} changed · {3} unchanged · {4} stored"}+ },+ "edit_menu": {+ "label": "Edit",+ "cut": "Cut",+ "copy": "Copy",+ "paste": "Paste",+ "select_all": "Select all",+ "copy_failed": "Could not copy to the clipboard.",+ "paste_unavailable": "Could not read the clipboard.",+ "paste_failed": "Cannot paste here."}}diff --git a/jarvis/ui/web/frontend/src/i18n/locales/es.json b/jarvis/ui/web/frontend/src/i18n/locales/es.jsonindex 3902880097..9c6e08f9db 100644--- a/jarvis/ui/web/frontend/src/i18n/locales/es.json+++ b/jarvis/ui/web/frontend/src/i18n/locales/es.json@@ -2745,6 +2745,9 @@"pipeline_idle": "Canal en espera","cancel": "Cancelar","cancel_failed": "No se pudo cancelar el trabajo: {0}",+ "retry_failed": "Reintentar elementos fallidos",+ "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": "Procesando ({0} pendientes)","state_paused": "En pausa",@@ -3029,5 +3032,15 @@"partial": "{0} de {1} fuentes llegaron completas.","numbers": "leídos {0} · {1} nuevos · {2} cambiados · {3} sin cambios · {4} guardados"}+ },+ "edit_menu": {+ "label": "Editar",+ "cut": "Cortar",+ "copy": "Copiar",+ "paste": "Pegar",+ "select_all": "Seleccionar todo",+ "copy_failed": "No se pudo copiar al portapapeles.",+ "paste_unavailable": "No se pudo leer el portapapeles.",+ "paste_failed": "Aquí no se puede pegar."}}