From 4c54d250f6652c3d66837c200812e3859de7af66 Mon Sep 17 00:00:00 2001 From: Sam Catlow Date: Fri, 13 Nov 2026 13:37:14 +1100 Subject: [PATCH] fix(ui/tasks): failures read from the error catalogue --- ui/src/copy/errors/dashboard.ts | 6 ++++ ui/src/copy/errors/index.ts | 6 ++++ ui/src/copy/errors/logs.ts | 10 +++++++ ui/src/copy/errors/tasks.ts | 44 ++++++++++++++++++++++++++++++ ui/src/dashboard/DashboardPage.vue | 3 +- ui/src/dashboard/QuickTask.vue | 7 +++-- ui/src/logs/LogList.vue | 3 +- ui/src/logs/logs-empty.ts | 5 ++-- ui/src/logs/state.ts | 7 +++-- ui/src/tasks/AttemptConfig.vue | 5 ++-- ui/src/tasks/ChangedFiles.vue | 5 ++-- ui/src/tasks/DebugView.vue | 6 ++-- ui/src/tasks/NewTaskForm.vue | 7 +++-- ui/src/tasks/StageRail.vue | 5 ++-- ui/src/tasks/TaskHeader.vue | 7 +++-- ui/src/tasks/TaskLogs.vue | 9 +++--- ui/src/tasks/TaskNotes.vue | 5 ++-- ui/src/tasks/TaskRowActions.vue | 9 +++--- ui/src/tasks/TaskRunPanels.vue | 5 ++-- ui/src/tasks/TasksPage.vue | 7 +++-- ui/src/tasks/TasksState.vue | 3 +- 21 files changed, 124 insertions(+), 40 deletions(-) create mode 100644 ui/src/copy/errors/dashboard.ts create mode 100644 ui/src/copy/errors/logs.ts create mode 100644 ui/src/copy/errors/tasks.ts diff --git a/ui/src/copy/errors/dashboard.ts b/ui/src/copy/errors/dashboard.ts new file mode 100644 index 000000000..1aa2d1cdb --- /dev/null +++ b/ui/src/copy/errors/dashboard.ts @@ -0,0 +1,6 @@ +// Failure copy for the dashboard's own page. +export const dashboard = { + page: { + unresponsive: (detail: string) => `Archie is not responding: ${detail}`, + }, +} as const; diff --git a/ui/src/copy/errors/index.ts b/ui/src/copy/errors/index.ts index 2ec798aa3..4f9699b34 100644 --- a/ui/src/copy/errors/index.ts +++ b/ui/src/copy/errors/index.ts @@ -3,8 +3,14 @@ // changed here and nowhere else. import { chat } from "./chat.ts"; import { common } from "./common.ts"; +import { dashboard } from "./dashboard.ts"; +import { logs } from "./logs.ts"; +import { tasks } from "./tasks.ts"; export const errors = { chat, common, + dashboard, + logs, + tasks, } as const; diff --git a/ui/src/copy/errors/logs.ts b/ui/src/copy/errors/logs.ts new file mode 100644 index 000000000..27c9137df --- /dev/null +++ b/ui/src/copy/errors/logs.ts @@ -0,0 +1,10 @@ +// Failure and empty-state copy for the log page. +export const logs = { + read: { + unreadable: "Cannot read logs", + }, + empty: { + streamUnavailable: "Log stream unavailable", + streamUnavailableDetail: "This process is not delivering live daemon logs.", + }, +} as const; diff --git a/ui/src/copy/errors/tasks.ts b/ui/src/copy/errors/tasks.ts new file mode 100644 index 000000000..ab4eaf85a --- /dev/null +++ b/ui/src/copy/errors/tasks.ts @@ -0,0 +1,44 @@ +// Failure copy for the task board, the run page and its panels. +export const tasks = { + state: { + unresponsive: "Archie is not responding", + }, + notes: { + listUnreadable: + "The task list could not be read, so the current status and operator controls are unavailable.", + notInRecentList: (id: string) => + `Task ${id} is not in the recent tasks list, so its status and operator controls are unavailable.`, + }, + panels: { + noAnswer: "Archie did not answer.", + }, + attemptConfig: { + loadFailed: "Could not load this task's events", + }, + // Shared by the stage rail and the attempts panel: both read the same request. + attempts: { + loadFailed: "Could not load this task's attempts", + }, + debug: { + loadFailed: "Could not load the stored record", + }, + changedFiles: { + loadFailed: "Could not load this attempt's changed files", + }, + logs: { + loadFailed: "Could not load this attempt's log.", + pageFailed: "Could not load that page", + }, + header: { + attemptFailed: (attempt: number | null, stage?: string) => + `Attempt ${attempt} failed${stage ? ` during ${stage}` : ""}`, + noErrorLine: "No error log line was recorded for this attempt.", + jumpFailed: "Could not read this attempt’s error log.", + }, + rowActions: { + authRequired: "Authentication required", + sessionExpired: "Dashboard authentication is required.", + broken: (message: string) => `${message}. Try again, or check the daemon.`, + unavailable: (label: string) => `${label} is unavailable`, + }, +} as const; diff --git a/ui/src/dashboard/DashboardPage.vue b/ui/src/dashboard/DashboardPage.vue index c9acf9afe..e5f55342b 100644 --- a/ui/src/dashboard/DashboardPage.vue +++ b/ui/src/dashboard/DashboardPage.vue @@ -1,5 +1,6 @@