-
Notifications
You must be signed in to change notification settings - Fork 4
fix(tasks): make failure triage directly actionable #82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
acef679
bd90692
323c56e
3c79fca
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -409,6 +409,7 @@ function OpinionMonitorPanel({ data, isLoading, isError }: { data?: OpinionMonit | |
| function runsToStream( | ||
| runs: Array<{ | ||
| id: string | ||
| task_id: string | ||
| source_name: string | ||
| task_trigger_type: string | ||
| status: string | ||
|
|
@@ -419,6 +420,7 @@ function runsToStream( | |
| ): StreamTask[] { | ||
| return runs.map((r) => ({ | ||
| id: r.id, | ||
| href: `/tasks/${r.task_id}`, | ||
| lane: 'collect' as const, | ||
| title: `${r.source_name} 采集`, | ||
| endpoint: r.source_name, | ||
|
|
@@ -521,6 +523,7 @@ export default function DashboardPage() { | |
| .filter((task) => task.phase === 'failed') | ||
| .map((task) => ({ | ||
| id: `f-${task.id}`, | ||
| href: task.href, | ||
| lane: task.lane, | ||
| title: task.title, | ||
| workerName: task.workerName, | ||
|
|
@@ -582,7 +585,7 @@ export default function DashboardPage() { | |
| </div> | ||
| <div className="flex flex-wrap items-center gap-2 md:justify-end"> | ||
| <Link | ||
| href="/tasks" | ||
| href={hasAttention ? '/tasks?status=failed' : '/tasks'} | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When a failed execution attempt is followed by a successful retry, Useful? React with 👍 / 👎. |
||
| className={buttonVariants({ | ||
| variant: hasAttention ? 'destructive' : 'default', | ||
| size: 'sm', | ||
|
|
@@ -683,7 +686,7 @@ export default function DashboardPage() { | |
| /> | ||
|
|
||
| <section className="grid gap-4" aria-label="运行与异常"> | ||
| <FailureFeed failures={failures} /> | ||
| <FailureFeed failures={failures} totalFailed={s.tasks.failed} /> | ||
| <TaskStream tasks={stream} /> | ||
| </section> | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When a task has a failed attempt followed by a newer successful retry, this new per-failure link retains only the task ID and discards
r.id. The detail page orders runs newest-first and automatically selectsruns.data[0], so clicking the failed entry opens the successful attempt and its events instead of the failure being triaged. Include the run ID in the destination and use it as the initial selected run.Useful? React with 👍 / 👎.