fix(ui): dashboard shows five tasks needing attention, not every one
deploy / plan (push) Successful in 7s
deploy / gate (push) Failing after 1m14s
deploy / archied-image (push) Skipped
deploy / agent-image (push) Skipped
deploy / dist-zip (push) Skipped

This commit is contained in:
sam committed 2026-11-09 09:05:47 +11:00
1 parent e0eb1dfdb7
commit eb4b2fab5a
1 file changed
+6 -2
+6 -2
View File
@@ -22,6 +22,10 @@ const waiting = computed(() => {
return ((tasks.value ?? []) as AttentionTask[]).filter((t) => t.status && ids.has(t.status));
});
// Each row mounts its own action menu, so an unbounded list freezes the page
// when many tasks park at once; the rest are one click away on the tasks page.
const shown = computed(() => waiting.value.slice(0, 5));
function meta(task: AttentionTask): string {
const where = task.owner && task.repo ? `${task.owner}/${task.repo}${task.issue_url && task.issue_number ? ` #${task.issue_number}` : ""}` : "";
return [where, task.workflow, task.park_reason || task.plan].filter(Boolean).join(" · ");
@@ -31,10 +35,10 @@ function meta(task: AttentionTask): string {
<template>
<Section v-if="waiting.length" title="Needs attention" class="mb-0">
<template #action>
<Button variant="ghost" size="sm" as-child><RouterLink to="/tasks?status=needs_attention">All tasks</RouterLink></Button>
<Button variant="ghost" size="sm" as-child><RouterLink to="/tasks?status=needs_attention">{{ waiting.length > shown.length ? `All ${waiting.length}` : "All tasks" }}</RouterLink></Button>
</template>
<ItemGroup>
<Item v-for="task in waiting" :key="task.id" as="li" variant="outline" size="xs">
<Item v-for="task in shown" :key="task.id" as="li" variant="outline" size="xs">
<Badge variant="warn">{{ statusLabel(task.status ?? "") }}</Badge>
<div class="min-w-0 flex-1">
<RouterLink :to="`/tasks/${task.id}`" class="block truncate font-medium hover:underline">{{