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(automations): the Runs tab is no longer permanently empty, and the dialog speaks the section's language

rubenluetke10-beep1f53c482558b
diff --git a/jarvis/ui/web/frontend/src/i18n/locales/de.json b/jarvis/ui/web/frontend/src/i18n/locales/de.json
index 537ebf1847..961ea0563d 100644
--- a/jarvis/ui/web/frontend/src/i18n/locales/de.json
+++ b/jarvis/ui/web/frontend/src/i18n/locales/de.json
@@ -804,8 +804,8 @@
"finished_at": "Beendet",
"no_steps": "Noch keine Schritte.",
"create": {
- "title": "Neue geplante Aufgabe",
- "subtitle": "Führt deinen Prompt nach Zeitplan aus, mit den Plugins, die du erlaubst.",
+ "title": "Neue Automatisierung",
+ "subtitle": "Läuft nach Zeitplan oder bei einem Ereignis — mit den Plugins, die du erlaubst.",
"name_label": "Name",
"name_placeholder": "z. B. Morgen-Briefing",
"prompt_label": "Was soll sie tun?",
@@ -852,7 +852,7 @@
"announce_placeholder": "z. B. Deine Mission ist fertig — ich habe sie im Browser geöffnet.",
"when_then_hint": "Wird jedes Mal ausgelöst. Du kannst {result_uri}, {summary_de} oder {mission_id} als Platzhalter im Text oben verwenden.",
"cancel": "Abbrechen",
- "save": "Aufgabe erstellen",
+ "save": "Anlegen",
"save_error": "Aufgabe konnte nicht erstellt werden."
},
"untitled": "(ohne Titel)",
@@ -899,7 +899,7 @@
"new_schedule": "Neuer Zeitplan",
"cancel_schedule": "Termin absagen",
"runs_heading": "Läufe",
- "runs_subtitle": "Was gelaufen ist und was dabei herauskam.",
+ "runs_subtitle": "Der letzte Lauf von allem, was schon gelaufen ist — mit dem Ergebnis.",
"runs_filter_label": "Filter",
"category_all": "Alle",
"category_label": "Kategorie",
diff --git a/jarvis/ui/web/frontend/src/i18n/locales/en.json b/jarvis/ui/web/frontend/src/i18n/locales/en.json
index 60102f09cb..e22881d489 100644
--- a/jarvis/ui/web/frontend/src/i18n/locales/en.json
+++ b/jarvis/ui/web/frontend/src/i18n/locales/en.json
@@ -804,8 +804,8 @@
"finished_at": "Finished",
"no_steps": "No steps yet.",
"create": {
- "title": "New scheduled task",
- "subtitle": "Runs your prompt on a schedule, with the plugins you allow.",
+ "title": "New automation",
+ "subtitle": "Runs on a schedule or on an event — with the plugins you allow.",
"name_label": "Name",
"name_placeholder": "e.g. Morning Briefing",
"prompt_label": "What should it do?",
@@ -852,7 +852,7 @@
"announce_placeholder": "e.g. Your mission is ready — I opened it in the browser.",
"when_then_hint": "Fires every time this happens. You can use {result_uri}, {summary_en} or {mission_id} as placeholders in the text above.",
"cancel": "Cancel",
- "save": "Create task",
+ "save": "Create",
"save_error": "Could not create the task."
},
"untitled": "(untitled)",
@@ -899,7 +899,7 @@
"new_schedule": "New schedule",
"cancel_schedule": "Cancel schedule",
"runs_heading": "Runs",
- "runs_subtitle": "What ran, and what came out of it.",
+ "runs_subtitle": "The latest run of everything that has run — with what it produced.",
"runs_filter_label": "Filter",
"category_all": "All",
"category_label": "Category",
diff --git a/jarvis/ui/web/frontend/src/i18n/locales/es.json b/jarvis/ui/web/frontend/src/i18n/locales/es.json
index 1b4168e05f..3d3f22bfed 100644
--- a/jarvis/ui/web/frontend/src/i18n/locales/es.json
+++ b/jarvis/ui/web/frontend/src/i18n/locales/es.json
@@ -802,8 +802,8 @@
"finished_at": "Finalizada",
"no_steps": "Aún no hay pasos.",
"create": {
- "title": "Nueva tarea programada",
- "subtitle": "Ejecuta tu prompt según un horario, con los plugins que permitas.",
+ "title": "Nueva automatización",
+ "subtitle": "Se ejecuta según un horario o ante un evento, con los plugins que permitas.",
"name_label": "Nombre",
"name_placeholder": "p. ej. Resumen matutino",
"prompt_label": "¿Qué debe hacer?",
@@ -850,7 +850,7 @@
"announce_placeholder": "p. ej. Tu misión está lista — la abrí en el navegador.",
"when_then_hint": "Se activa cada vez que ocurre. Puedes usar {result_uri}, {summary_en} o {mission_id} como variables en el texto de arriba.",
"cancel": "Cancelar",
- "save": "Crear tarea",
+ "save": "Crear",
"save_error": "No se pudo crear la tarea."
},
"untitled": "(sin título)",
@@ -897,7 +897,7 @@
"new_schedule": "Nueva programación",
"cancel_schedule": "Cancelar programación",
"runs_heading": "Ejecuciones",
- "runs_subtitle": "Qué se ejecutó y qué resultado dio.",
+ "runs_subtitle": "La última ejecución de todo lo que ya se ejecutó, con su resultado.",
"runs_filter_label": "Filtro",
"category_all": "Todas",
"category_label": "Categoría",
diff --git a/jarvis/ui/web/frontend/src/views/AutomationsView.tsx b/jarvis/ui/web/frontend/src/views/AutomationsView.tsx
index db78cebda1..07110f9dc2 100644
--- a/jarvis/ui/web/frontend/src/views/AutomationsView.tsx
+++ b/jarvis/ui/web/frontend/src/views/AutomationsView.tsx
@@ -233,7 +233,7 @@ export function AutomationsView() {
)}
<ScrollArea className="flex-1">
- <div className="mx-auto flex max-w-[1180px] flex-col gap-4 px-6 py-6">
+ <div className="mx-auto flex max-w-[1440px] flex-col gap-4 px-6 py-6">
{notice && (
<div
role="status"
diff --git a/jarvis/ui/web/frontend/src/views/automations/RunsPanel.tsx b/jarvis/ui/web/frontend/src/views/automations/RunsPanel.tsx
index 8adc8f16aa..1757d3d6a2 100644
--- a/jarvis/ui/web/frontend/src/views/automations/RunsPanel.tsx
+++ b/jarvis/ui/web/frontend/src/views/automations/RunsPanel.tsx
@@ -27,6 +27,7 @@ import {
formatDuration,
isActive,
isRecurringTrigger,
+ runStateOf,
selectRuns,
type RunFilter,
type TaskSummary,
@@ -73,7 +74,10 @@ export function RunsPanel({ tasks, filter, onNotice }: RunsPanelProps) {
<Table label={t("automations_view.tab_runs")}>
<TableHead columns={columns} />
{runs.map((run) => {
- const active = isActive(run.state);
+ // A recurring automation sits at "scheduled" between runs; the row is
+ // about the run, so it reads the derived state, not the task's.
+ const state = runStateOf(run);
+ const active = run.state === "running";
// A recurring automation's row is its latest run; deleting it is the
// Automations tab's job, so only one-shots offer Delete here.
const canDelete = !isRecurringTrigger(run.trigger_type) || !active;
@@ -89,13 +93,13 @@ export function RunsPanel({ tasks, filter, onNotice }: RunsPanelProps) {
>
<Cell>
<span className="flex min-w-0 items-center gap-2.5">
- <StateDot state={run.state} />
+ <StateDot state={state} />
<span className="min-w-0">
<span className="block truncate font-medium text-foreground">
{run.title || t("tasks_view.untitled")}
</span>
<span className="block truncate text-xs text-muted-foreground">
- {stateLabels[run.state]}
+ {stateLabels[state]}
</span>
</span>
</span>
diff --git a/jarvis/ui/web/frontend/src/views/automations/automationsModel.test.ts b/jarvis/ui/web/frontend/src/views/automations/automationsModel.test.ts
index cf8d88b6a4..7e03c630fb 100644
--- a/jarvis/ui/web/frontend/src/views/automations/automationsModel.test.ts
+++ b/jarvis/ui/web/frontend/src/views/automations/automationsModel.test.ts
@@ -118,6 +118,22 @@ describe("selection", () => {
expect(onTabs("e")).toBe(1);
});
+ it("a recurring automation joins the runs once it has one behind it", () => {
+ // Without this the Runs tab was permanently empty for anyone whose
+ // automations all recur: such a task returns to "scheduled" after a run,
+ // so only `last_run_state` remembers that anything happened.
+ const ran = task({
+ id: "h",
+ trigger_type: "every",
+ state: "scheduled",
+ last_run_state: "failed",
+ finished_at_ns: 12,
+ });
+ const runs = selectRuns([...all, ran]);
+ expect(runs.map((t) => t.id)).toEqual(["h", "e", "f", "c"]);
+ expect(filterRuns(runs, "problems").map((t) => t.id)).toEqual(["h", "c"]);
+ });
+
it("filters runs by chip", () => {
const runs = selectRuns(all);
expect(filterRuns(runs, "done").map((t) => t.id)).toEqual(["e"]);
diff --git a/jarvis/ui/web/frontend/src/views/automations/automationsModel.ts b/jarvis/ui/web/frontend/src/views/automations/automationsModel.ts
index 82ceb0751f..2faa7d7b89 100644
--- a/jarvis/ui/web/frontend/src/views/automations/automationsModel.ts
+++ b/jarvis/ui/web/frontend/src/views/automations/automationsModel.ts
@@ -176,13 +176,32 @@ export function selectSchedules(tasks: TaskSummary[]): TaskSummary[] {
}
/**
- * The run history: everything that ran or is running, newest activity first.
+ * The state a run row should show.
+ *
+ * A recurring automation goes straight back to `scheduled` after a run, so its
+ * own `state` says nothing about how that run went — `last_run_state` does.
+ * One value, derived in one place, so the dot, the label and the "problems"
+ * filter can never disagree about the same row.
+ */
+export function runStateOf(task: TaskSummary): TaskState {
+ if (isTerminal(task.state) || task.state === "running") return task.state;
+ return task.last_run_state ?? task.state;
+}
+
+/**
+ * The run history: everything that has actually run, newest activity first.
+ *
+ * A recurring automation belongs here once it has a run behind it — the task
+ * row carries only its LATEST one, which is why the tab is worded as the last
+ * run of each rather than a full log. Without this the tab was permanently
+ * empty for anyone whose automations are all recurring, which is everyone.
+ *
* A still-waiting one-shot is NOT a run — it lives on the Schedules tab until
* it fires.
*/
export function selectRuns(tasks: TaskSummary[]): TaskSummary[] {
return tasks
- .filter((t) => isTerminal(t.state) || t.state === "running")
+ .filter((t) => isTerminal(t.state) || t.state === "running" || Boolean(t.last_run_state))
.sort((a, b) => activityNs(b) - activityNs(a));
}
@@ -250,13 +269,14 @@ export type RunFilter = "all" | "running" | "done" | "problems";
export function filterRuns(runs: TaskSummary[], filter: RunFilter): TaskSummary[] {
switch (filter) {
case "running":
- return runs.filter((r) => r.state === "running" || r.state === "pending" || r.state === "scheduled");
+ return runs.filter((r) => r.state === "running");
case "done":
- return runs.filter((r) => r.state === "completed");
+ return runs.filter((r) => runStateOf(r) === "completed");
case "problems":
- return runs.filter(
- (r) => r.state === "failed" || r.state === "interrupted" || r.state === "cancelled",
- );
+ return runs.filter((r) => {
+ const state = runStateOf(r);
+ return state === "failed" || state === "interrupted" || state === "cancelled";
+ });
default:
return runs;
}
diff --git a/jarvis/ui/web/frontend/src/views/tasks/TaskCreateDialog.test.tsx b/jarvis/ui/web/frontend/src/views/tasks/TaskCreateDialog.test.tsx
index c01bb194e6..4ffeb96c45 100644
--- a/jarvis/ui/web/frontend/src/views/tasks/TaskCreateDialog.test.tsx
+++ b/jarvis/ui/web/frontend/src/views/tasks/TaskCreateDialog.test.tsx
@@ -74,7 +74,7 @@ describe("TaskCreateDialog", () => {
fireEvent.change(boxes[0], { target: { value: "Morning Briefing" } });
fireEvent.change(boxes[1], { target: { value: "Summarize inbox" } });
fireEvent.click(screen.getByRole("switch")); // enable gmail (default scope read)
- fireEvent.click(screen.getByText("Create task"));
+ fireEvent.click(screen.getByText("Create"));
await waitFor(() => expect(posted.length).toBe(1));
const spec = posted[0] as {
@@ -146,7 +146,7 @@ describe("TaskCreateDialog", () => {
installFetch();
renderDialog();
await screen.findByText("Gmail");
- const saveBtn = screen.getByText("Create task").closest("button") as HTMLButtonElement;
+ const saveBtn = screen.getByText("Create").closest("button") as HTMLButtonElement;
expect(saveBtn.disabled).toBe(true);
const boxes = screen.getAllByRole("textbox");
fireEvent.change(boxes[0], { target: { value: "X" } });
diff --git a/jarvis/ui/web/frontend/src/views/tasks/TaskCreateDialog.tsx b/jarvis/ui/web/frontend/src/views/tasks/TaskCreateDialog.tsx
index fdf6a3b463..d2f218477a 100644
--- a/jarvis/ui/web/frontend/src/views/tasks/TaskCreateDialog.tsx
+++ b/jarvis/ui/web/frontend/src/views/tasks/TaskCreateDialog.tsx
@@ -19,6 +19,7 @@ import { Button } from "@/components/ui/button";
import { Switch } from "@/components/ui/switch";
import { cn } from "@/lib/utils";
import { useT, useUiLanguage } from "@/i18n";
+import { humanizeToolName } from "@/views/automations/automationsModel";
import {
buildTaskSpec,
defaultAtTimeLocal,
@@ -541,7 +542,10 @@ export function TaskCreateDialog({ onClose, initialDraft }: TaskCreateDialogProp
>
<div className="flex items-center gap-2.5">
<Switch checked={on} onCheckedChange={() => togglePlugin(p.id)} />
- <span className="text-sm">{p.name || p.id}</span>
+ {/* A catalog entry without a display name would
+ otherwise show its raw id — "google_calendar",
+ "youtube_music" — in a list a person reads. */}
+ <span className="text-sm">{p.name || humanizeToolName(p.id)}</span>
</div>
{on && (
<Segmented