From f7a999e3173a2f81e3db4e6c57ff86ace14892ce Mon Sep 17 00:00:00 2001 From: Sam Catlow Date: Sat, 7 Nov 2026 00:25:36 +1100 Subject: [PATCH] fix(ui): failed task pages keep rows with an inline error; refreshes don't flash (#1745) A failed Load more or live refresh sets moreError beside the Load more button instead of replacing the table; only a first-load failure takes the table down. The no-match empty state says search covers loaded rows when more pages exist. refreshAll keeps attempts/events (keep=true) and a failed task-list read keeps the last known list, so panels no longer flash to loading on every live update. --- ui/src/tasks/TasksPage.vue | 15 +++++++++++---- ui/src/tasks/use-task-run.ts | 7 ++++--- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/ui/src/tasks/TasksPage.vue b/ui/src/tasks/TasksPage.vue index 935580b64..0a19ba452 100644 --- a/ui/src/tasks/TasksPage.vue +++ b/ui/src/tasks/TasksPage.vue @@ -46,6 +46,9 @@ const router = useRouter(); const tasks = ref(null); const next = ref(null); const loadingMore = ref(false); +// A failed page load keeps the rows already shown; only a first-load failure +// takes the whole table down (error). +const moreError = ref(null); const error = ref(null); const search = ref(""); @@ -116,10 +119,12 @@ async function load() { if (current !== loadGeneration) return; tasks.value = page.tasks; next.value = page.next; + moreError.value = null; } catch (err) { if (current !== loadGeneration) return; - error.value = String((err as Error).message || err); - tasks.value = null; + const message = String((err as Error).message || err); + if (tasks.value === null) error.value = message; + else moreError.value = message; } } @@ -136,9 +141,10 @@ async function loadMore() { if (current !== loadGeneration) return; tasks.value = [...(tasks.value ?? []), ...page.tasks]; next.value = page.next; + moreError.value = null; } catch (err) { if (current !== loadGeneration) return; - error.value = String((err as Error).message || err); + moreError.value = String((err as Error).message || err); } finally { loadingMore.value = false; } @@ -217,10 +223,11 @@ async function reveal(id: number) { --> + diff --git a/ui/src/tasks/use-task-run.ts b/ui/src/tasks/use-task-run.ts index 384d04e3b..378b9d763 100644 --- a/ui/src/tasks/use-task-run.ts +++ b/ui/src/tasks/use-task-run.ts @@ -211,7 +211,8 @@ export function provideTaskRun(id: ComputedRef): TaskRun { taskList.value = res; }) .catch(() => { - taskList.value = null; + // Keep the last known list: a failed refresh must not flash the + // panels to their loading state. }); } @@ -295,8 +296,8 @@ export function provideTaskRun(id: ComputedRef): TaskRun { function refreshAll(): void { dropCaches(); loadTaskList(); - loadAttempts(); - loadEvents(); + loadAttempts(true); + loadEvents(true); refreshToken.value += 1; }