From f8e3a3e5b4e74e6c547887897e0635c2cbda44be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=89=E9=91=AB=E5=8D=87?= Date: Fri, 22 May 2026 16:38:44 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=AC=E5=BC=80=E5=AE=9A=E6=97=B6=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E9=A1=B5:=E6=AF=8F=E6=9D=A1=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E6=A0=87=E9=A2=98=E5=89=8D=E5=8A=A0=20M=E6=9C=88D=E6=97=A5=20?= =?UTF-8?q?=E5=89=8D=E7=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 同名任务多次执行后列表全是同一行,加上日期前缀方便扫描; 用 muted-foreground + text-xs + font-normal 弱化,不喧宾夺主。 Tooltip / title / 删除确认弹窗内的文案也同步带上日期。 Co-Authored-By: Claude Opus 4.7 (1M context) --- .../src/pages/PublicScheduledTaskPage.tsx | 23 +++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/frontend-web/src/pages/PublicScheduledTaskPage.tsx b/frontend-web/src/pages/PublicScheduledTaskPage.tsx index dd5570f5..ef623b9d 100644 --- a/frontend-web/src/pages/PublicScheduledTaskPage.tsx +++ b/frontend-web/src/pages/PublicScheduledTaskPage.tsx @@ -193,6 +193,19 @@ function formatDate(value?: string | null): string { return value ? new Date(value).toLocaleString() : "暂无"; } +/** + * Compact "M月D日" badge prefixed to each run title so visually identical + * names (the agent often emits the same title every run) become scannable. + * Returns empty string for an invalid / missing date so the title falls back + * to its bare form instead of rendering "Invalid Date". + */ +function formatScheduledDatePrefix(value?: string | null): string { + if (!value) return ""; + const date = new Date(value); + if (Number.isNaN(date.getTime())) return ""; + return `${date.getMonth() + 1}月${date.getDate()}日`; +} + function isMarkdownFile(file: { name: string; kind?: string | null; mime_type?: string | null }): boolean { const name = file.name.toLowerCase(); return ( @@ -373,6 +386,7 @@ export default function PublicScheduledTaskPage() { const runTitle = stripTimestampSuffix( run.result?.title || formatDate(run.scheduled_for), ); + const datePrefix = formatScheduledDatePrefix(run.scheduled_for); const isDeletingThis = deleteRunMutation.isPending && deleteRunMutation.variables === run.id; return ( @@ -398,13 +412,18 @@ export default function PublicScheduledTaskPage() {
+ {datePrefix && ( + + {datePrefix} + + )} {runTitle}
- {runTitle} + {datePrefix ? `${datePrefix} · ${runTitle}` : runTitle}