From 84df5c452f11717e58ab5bbba6ffab1fde07aac4 Mon Sep 17 00:00:00 2001 From: LegGasai Date: Tue, 10 Nov 2026 11:36:44 +0800 Subject: [PATCH] refactor(jobs): name the stop control without an unreachable fallback The stop tooltip renders only beside a running row's kill state, so its label is always one of the three kill strings. --- packages/client/ui-jobs/src/client/JobsSection.tsx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/client/ui-jobs/src/client/JobsSection.tsx b/packages/client/ui-jobs/src/client/JobsSection.tsx index 10f21c51ca..9b21953a6d 100644 --- a/packages/client/ui-jobs/src/client/JobsSection.tsx +++ b/packages/client/ui-jobs/src/client/JobsSection.tsx @@ -215,11 +215,9 @@ function JobItem({ job, view, expanded, now, onToggle, kill, t }: { {duration} ) - const killTitle = kill === undefined - ? undefined - : kill.state === 'armed' - ? t('kill.confirm') - : kill.state === 'failed' ? t('kill.failed') : t('kill.stop', { label: job.label }) + const killTitle = kill?.state === 'armed' + ? t('kill.confirm') + : kill?.state === 'failed' ? t('kill.failed') : t('kill.stop', { label: job.label }) return (
  • {/* A command its cell clips crawls into view while the pointer rests on the row. */} @@ -239,7 +237,7 @@ function JobItem({ job, view, expanded, now, onToggle, kill, t }: { : {body}} {kill !== undefined ? ( - +