fix(knowledge): reduce knowledge base text density
All checks were successful
CD Pipeline / workflow-shape (push) Successful in 0s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Successful in 1m2s
CD Pipeline / build-and-deploy (push) Successful in 5m12s
CD Pipeline / post-deploy-checks (push) Successful in 1m55s

This commit is contained in:
Your Name
2026-07-03 14:29:55 +08:00
parent 850cccafa9
commit 3ebeeeb4b2

View File

@@ -1260,7 +1260,6 @@ export default function KnowledgeBasePage({
) )
})} })}
</div> </div>
<p className="mt-2 text-[10px] font-body leading-4 text-muted">{t('assetLens.filterHelp')}</p>
</div> </div>
<div className="mt-3 flex items-center justify-between px-2"> <div className="mt-3 flex items-center justify-between px-2">
@@ -1314,11 +1313,6 @@ export default function KnowledgeBasePage({
<p className="mt-1 text-sm font-heading font-semibold text-primary"> <p className="mt-1 text-sm font-heading font-semibold text-primary">
{selectedAssetLens ? t(`assetLens.${selectedAssetLens}` as never) : t('allCategories')} {selectedAssetLens ? t(`assetLens.${selectedAssetLens}` as never) : t('allCategories')}
</p> </p>
<p className="mt-1 text-[10px] font-body leading-4 text-muted">
{selectedAssetLens
? t(`assetLens.detail.${selectedAssetLens}` as never)
: t('assetLens.activeDescription')}
</p>
</div> </div>
<div className="mt-4 grid grid-cols-2 gap-2 lg:grid-cols-1"> <div className="mt-4 grid grid-cols-2 gap-2 lg:grid-cols-1">
{[ {[
@@ -1463,9 +1457,6 @@ export default function KnowledgeBasePage({
<h1 className="mt-2 text-xl font-heading font-semibold text-primary"> <h1 className="mt-2 text-xl font-heading font-semibold text-primary">
{t('decision.title')} {t('decision.title')}
</h1> </h1>
<p className="mt-1 max-w-4xl text-xs font-body leading-5 text-secondary">
{t('decision.subtitle')}
</p>
</div> </div>
<Link <Link
href={governanceSummary.workItemsHref as never} href={governanceSummary.workItemsHref as never}
@@ -1579,7 +1570,6 @@ export default function KnowledgeBasePage({
<div className="mb-3 flex flex-col gap-1 sm:flex-row sm:items-start sm:justify-between"> <div className="mb-3 flex flex-col gap-1 sm:flex-row sm:items-start sm:justify-between">
<div className="min-w-0"> <div className="min-w-0">
<p className="text-[10px] font-label uppercase tracking-wider text-muted">{t('assetLens.matrixTitle')}</p> <p className="text-[10px] font-label uppercase tracking-wider text-muted">{t('assetLens.matrixTitle')}</p>
<p className="mt-0.5 text-[10px] font-body text-muted">{t('assetLens.matrixSubtitle')}</p>
</div> </div>
<span className="shrink-0 rounded-full border border-claw-blue/20 bg-claw-blue/8 px-2 py-0.5 text-[10px] font-label text-claw-blue"> <span className="shrink-0 rounded-full border border-claw-blue/20 bg-claw-blue/8 px-2 py-0.5 text-[10px] font-label text-claw-blue">
{t('assetLens.autoUpdated')} {t('assetLens.autoUpdated')}
@@ -1592,7 +1582,11 @@ export default function KnowledgeBasePage({
? '--' ? '--'
: formatCount(row.count) : formatCount(row.count)
return ( return (
<div key={row.key} className="rounded-md border border-nothing-gray-200 bg-white/70 p-2"> <div
key={row.key}
className="rounded-md border border-nothing-gray-200 bg-white/70 p-2"
title={t(`assetLens.detail.${row.key}` as never)}
>
<div className="flex items-start justify-between gap-2"> <div className="flex items-start justify-between gap-2">
<Icon className={cn('h-4 w-4 shrink-0', row.tone)} aria-hidden="true" /> <Icon className={cn('h-4 w-4 shrink-0', row.tone)} aria-hidden="true" />
{row.global && ( {row.global && (
@@ -1607,9 +1601,6 @@ export default function KnowledgeBasePage({
<p className={cn('mt-1 text-xl font-heading font-semibold tabular-nums', row.tone)}> <p className={cn('mt-1 text-xl font-heading font-semibold tabular-nums', row.tone)}>
{value} {value}
</p> </p>
<p className="mt-0.5 line-clamp-2 text-[10px] font-body leading-4 text-muted">
{t(`assetLens.detail.${row.key}` as never)}
</p>
</div> </div>
) )
})} })}
@@ -1622,7 +1613,6 @@ export default function KnowledgeBasePage({
<div className="mb-3 flex flex-col gap-1 sm:flex-row sm:items-start sm:justify-between"> <div className="mb-3 flex flex-col gap-1 sm:flex-row sm:items-start sm:justify-between">
<div className="min-w-0"> <div className="min-w-0">
<p className="text-[10px] font-label uppercase tracking-wider text-muted">{t('assetLedger.title')}</p> <p className="text-[10px] font-label uppercase tracking-wider text-muted">{t('assetLedger.title')}</p>
<p className="mt-0.5 text-[10px] font-body text-muted">{t('assetLedger.subtitle')}</p>
</div> </div>
<span className="shrink-0 rounded-full border border-status-healthy/20 bg-status-healthy/10 px-2 py-0.5 text-[10px] font-label text-status-healthy"> <span className="shrink-0 rounded-full border border-status-healthy/20 bg-status-healthy/10 px-2 py-0.5 text-[10px] font-label text-status-healthy">
{t('assetLedger.readOnly')} {t('assetLedger.readOnly')}
@@ -1632,7 +1622,11 @@ export default function KnowledgeBasePage({
{automationAssetRows.map(row => { {automationAssetRows.map(row => {
const Icon = row.icon const Icon = row.icon
return ( return (
<div key={row.key} className="rounded-md border border-nothing-gray-200 bg-white/70 p-2"> <div
key={row.key}
className="rounded-md border border-nothing-gray-200 bg-white/70 p-2"
title={formatAutomationAssetDetail(row.key, row.ready, row.pending)}
>
<div className="flex items-start justify-between gap-2"> <div className="flex items-start justify-between gap-2">
<div className={cn('flex h-7 w-7 shrink-0 items-center justify-center rounded-md border', row.tone)}> <div className={cn('flex h-7 w-7 shrink-0 items-center justify-center rounded-md border', row.tone)}>
<Icon className="h-3.5 w-3.5" aria-hidden="true" /> <Icon className="h-3.5 w-3.5" aria-hidden="true" />
@@ -1655,16 +1649,10 @@ export default function KnowledgeBasePage({
style={{ width: `${row.pct}%` }} style={{ width: `${row.pct}%` }}
/> />
</div> </div>
<p className="mt-1 line-clamp-2 text-[10px] font-body leading-4 text-secondary">
{formatAutomationAssetDetail(row.key, row.ready, row.pending)}
</p>
</div> </div>
) )
})} })}
</div> </div>
<p className="mt-2 text-[10px] font-body text-muted">
{t('assetLedger.boundary')}
</p>
</div> </div>
)} )}
@@ -1701,7 +1689,6 @@ export default function KnowledgeBasePage({
<div className="mb-3 flex items-center justify-between gap-2"> <div className="mb-3 flex items-center justify-between gap-2">
<div className="min-w-0"> <div className="min-w-0">
<p className="text-[10px] font-label uppercase tracking-wider text-muted">{t('lineage.title')}</p> <p className="text-[10px] font-label uppercase tracking-wider text-muted">{t('lineage.title')}</p>
<p className="mt-0.5 truncate text-[10px] font-body text-muted">{t('lineage.scope')}</p>
</div> </div>
<GitBranch className="h-4 w-4 shrink-0 text-claw-blue" aria-hidden="true" /> <GitBranch className="h-4 w-4 shrink-0 text-claw-blue" aria-hidden="true" />
</div> </div>
@@ -1720,7 +1707,6 @@ export default function KnowledgeBasePage({
</div> </div>
<p className="mt-2 truncate text-[10px] font-label uppercase tracking-wider">{t(`lineage.${node.key}`)}</p> <p className="mt-2 truncate text-[10px] font-label uppercase tracking-wider">{t(`lineage.${node.key}`)}</p>
<p className="mt-1 text-lg font-heading font-semibold tabular-nums">{formatCount(node.count)}</p> <p className="mt-1 text-lg font-heading font-semibold tabular-nums">{formatCount(node.count)}</p>
<p className="mt-0.5 truncate text-[10px] font-body opacity-80">{node.detail}</p>
</div> </div>
</div> </div>
) )
@@ -1732,7 +1718,6 @@ export default function KnowledgeBasePage({
<div className="mb-2 flex items-center justify-between gap-2"> <div className="mb-2 flex items-center justify-between gap-2">
<div className="min-w-0"> <div className="min-w-0">
<p className="text-[10px] font-label uppercase tracking-wider text-muted">{t('freshness.title')}</p> <p className="text-[10px] font-label uppercase tracking-wider text-muted">{t('freshness.title')}</p>
<p className="mt-0.5 truncate text-[10px] font-body text-muted">{t('freshness.scope')}</p>
</div> </div>
<Clock3 className="h-4 w-4 shrink-0 text-status-warning" aria-hidden="true" /> <Clock3 className="h-4 w-4 shrink-0 text-status-warning" aria-hidden="true" />
</div> </div>
@@ -1753,7 +1738,6 @@ export default function KnowledgeBasePage({
<div className="h-1.5 overflow-hidden rounded-full bg-nothing-gray-100"> <div className="h-1.5 overflow-hidden rounded-full bg-nothing-gray-100">
<div className={cn('h-full rounded-full', row.tone)} style={{ width: `${row.pct}%` }} /> <div className={cn('h-full rounded-full', row.tone)} style={{ width: `${row.pct}%` }} />
</div> </div>
<p className="mt-0.5 truncate text-[10px] font-body text-muted">{t(`freshness.${row.key}Action`)}</p>
</div> </div>
) )
})} })}
@@ -1770,9 +1754,6 @@ export default function KnowledgeBasePage({
<ListChecks className="h-3.5 w-3.5 text-claw-blue" aria-hidden="true" /> <ListChecks className="h-3.5 w-3.5 text-claw-blue" aria-hidden="true" />
{t('workItems.title')} {t('workItems.title')}
</div> </div>
<p className="mt-1 max-w-3xl text-xs font-body text-secondary">
{t('workItems.subtitle')}
</p>
</div> </div>
<Link <Link
href={governanceSummary.workItemsHref as never} href={governanceSummary.workItemsHref as never}
@@ -1828,7 +1809,6 @@ export default function KnowledgeBasePage({
<div className="flex flex-wrap items-center justify-between gap-2 border-b border-nothing-gray-100 px-3 py-2"> <div className="flex flex-wrap items-center justify-between gap-2 border-b border-nothing-gray-100 px-3 py-2">
<div className="min-w-0"> <div className="min-w-0">
<p className="text-[10px] font-label uppercase tracking-wider text-muted">{t('workItems.flow.title')}</p> <p className="text-[10px] font-label uppercase tracking-wider text-muted">{t('workItems.flow.title')}</p>
<p className="mt-0.5 truncate text-[10px] font-body text-muted">{t('workItems.flow.scope')}</p>
</div> </div>
<span className="shrink-0 text-[10px] font-label text-status-healthy"> <span className="shrink-0 text-[10px] font-label text-status-healthy">
{governanceSummary.writesOnRead ? t('workItems.unexpectedWrites') : t('workItems.noWritesOnRead')} {governanceSummary.writesOnRead ? t('workItems.unexpectedWrites') : t('workItems.noWritesOnRead')}
@@ -1856,9 +1836,6 @@ export default function KnowledgeBasePage({
<p className="mt-1 text-lg font-heading font-semibold tabular-nums text-primary"> <p className="mt-1 text-lg font-heading font-semibold tabular-nums text-primary">
{governanceLoading ? '--' : node.value} {governanceLoading ? '--' : node.value}
</p> </p>
<p className="mt-0.5 line-clamp-2 text-[10px] font-body leading-4 text-muted">
{node.detail}
</p>
</div> </div>
) )
})} })}