From 434d825926be89ab17060f83540657a0181e20ce Mon Sep 17 00:00:00 2001 From: ThearchyHelios Date: Sun, 4 Oct 2026 02:09:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=9B=AE=E5=BD=95=20F2b=20/?= =?UTF-8?q?=20C3=EF=BC=9A=E5=89=96=E6=9E=90=E6=8A=A5=E5=91=8A=E9=87=8C?= =?UTF-8?q?=E5=85=B3=E7=B3=BB=E7=9A=84=E7=BB=93=E8=AE=BA=EF=BC=88=E5=8D=87?= =?UTF-8?q?=E4=B8=BA=E5=B7=B2=E9=AA=8C=E8=AF=81=E3=80=81=E4=BB=8D=E4=B8=BA?= =?UTF-8?q?=E5=B7=B2=E9=AA=8C=E8=AF=81=E3=80=81=E4=BF=9D=E6=8C=81=E6=8E=A8?= =?UTF-8?q?=E6=96=AD=E2=80=A6=E2=80=A6=EF=BC=89=E4=B8=8D=E5=86=8D=E6=98=AF?= =?UTF-8?q?=E5=83=8F=E9=93=BE=E6=8E=A5=E7=9A=84=E8=93=9D=E8=89=B2=E6=AD=A3?= =?UTF-8?q?=E6=96=87=EF=BC=8C=E6=94=B9=E6=88=90=E7=8A=B6=E6=80=81=E6=A0=87?= =?UTF-8?q?=E7=AD=BE=E7=9A=84=E6=A0=B7=E5=AD=90=EF=BC=9A=E5=B8=A6=E6=A1=86?= =?UTF-8?q?=E7=9A=84=E5=B0=8F=E6=A0=87=E7=AD=BE=EF=BC=8C=E5=9B=BE=E6=A0=87?= =?UTF-8?q?=E7=9D=80=E7=8A=B6=E6=80=81=E8=89=B2=EF=BC=8C=E6=96=87=E5=AD=97?= =?UTF-8?q?=E7=94=A8=E6=AC=A1=E8=A6=81=E6=96=87=E5=AD=97=E8=89=B2=EF=BC=9B?= =?UTF-8?q?=E8=A1=A5=E6=A3=80=E6=9F=A5=E8=84=9A=E6=9C=AC=E7=9A=84=E6=96=AD?= =?UTF-8?q?=E8=A8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/pages/catalog/ProfileDialog.tsx | 9 ++++++++- scripts/check-catalog.mjs | 16 ++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/frontend/src/pages/catalog/ProfileDialog.tsx b/frontend/src/pages/catalog/ProfileDialog.tsx index 3919c46f..1c64d1e3 100644 --- a/frontend/src/pages/catalog/ProfileDialog.tsx +++ b/frontend/src/pages/catalog/ProfileDialog.tsx @@ -408,6 +408,7 @@ function relationOutcome(f: CatalogProfileRelationFinding): { kind: RelationOutc function RelationLine({ f }: { f: CatalogProfileRelationFinding }) { const outcome = relationOutcome(f) + const Icon = outcome.icon return (
  • @@ -421,7 +422,13 @@ function RelationLine({ f }: { f: CatalogProfileRelationFinding }) { {' · '} {PT.sampled(f.sample, f.matched)}
    -
    {outcome.text}
    + {/* 结论是状态说明,不是链接:用状态标识的样子(带框的小标签、图标着状态色),正文用次要文字色 */} +
    + + + {outcome.text} + +
  • ) } diff --git a/scripts/check-catalog.mjs b/scripts/check-catalog.mjs index 5c65e48d..c6902a2a 100644 --- a/scripts/check-catalog.mjs +++ b/scripts/check-catalog.mjs @@ -1496,6 +1496,22 @@ await section('数据目录 · 数据剖析', async () => { && (await gate.locator('[data-profile-cardinality]').innerText()) === '多对一' && (await gate.innerText()).includes('抽样 300 个键值,对上 296 个') && (await gate.locator('[data-profile-outcome]').innerText()) === '升为已验证' && (await gate.getAttribute('data-status')) === 'verified', (await gate.innerText()).replace(/\s+/g, ' ')) + // 结论是状态说明,不是链接:带框的小标签,文字用次要文字色(不是强调蓝),不能点 + const outcomeLook = await gate.locator('[data-profile-outcome]').evaluate((el) => { + const probe = document.createElement('span') + probe.style.color = 'var(--accent)' + document.body.append(probe) + const accent = getComputedStyle(probe).color + probe.style.color = 'var(--text-dim)' + const dim = getComputedStyle(probe).color + probe.remove() + const cs = getComputedStyle(el) + return { tag: el.tagName, color: cs.color, accent, dim, border: cs.borderTopStyle, cursor: cs.cursor, kind: el.getAttribute('data-profile-outcome'), + clickable: !!el.closest('a, button') } + }) + check('……结论用状态标签的样子:带框、次要文字色,不是蓝色正文、不像链接', outcomeLook.kind === 'raised' && outcomeLook.color === outcomeLook.dim + && outcomeLook.color !== outcomeLook.accent && outcomeLook.border === 'solid' && outcomeLook.cursor !== 'pointer' && !outcomeLook.clickable, + JSON.stringify(outcomeLook)) const member = visitsCard.locator(`[data-profile-finding="relation"][data-path="relations.${MEMBER_REL}"]`) check('……覆盖率不够的保持推断,写明原因', (await member.locator('[data-profile-outcome]').innerText()) === '保持推断:覆盖率不足,可能不是这条关系' && (await member.locator('[data-profile-coverage]').innerText()) === '覆盖率 62%')