fix(web): 修正 P2-403G 治理頁欄位對齊
Some checks failed
CD Pipeline / tests (push) Successful in 1m27s
Code Review / ai-code-review (push) Successful in 15s
CD Pipeline / post-deploy-checks (push) Has been cancelled
CD Pipeline / build-and-deploy (push) Has been cancelled

This commit is contained in:
Your Name
2026-06-12 01:09:47 +08:00
parent 6ff0c2e526
commit 32fdce4cd9
5 changed files with 63 additions and 16 deletions

View File

@@ -1249,6 +1249,14 @@ export function AutomationInventoryTab() {
}
}
const proactiveApprovalGateLabel = (value: string) => {
try {
return t(`proactiveOperations.approvalGates.${value}` as never)
} catch {
return value
}
}
const proofValueLabel = (group: string, value: string) => {
try {
return t(`interactionProof.${group}.${value}` as never)
@@ -1666,7 +1674,7 @@ export function AutomationInventoryTab() {
<div style={{ display: 'flex', flexWrap: 'wrap', gap: 6 }}>
<Chip value={t('runtimeWriteGateReview.labels.requiredFields', { count: runtimeWriteGateReview.rollups.required_field_count })} />
<Chip value={t('runtimeWriteGateReview.labels.forbiddenFields', { count: runtimeWriteGateReview.rollups.forbidden_field_count })} muted />
<Chip value={redisDryRunValueLabel('agents', runtimeWriteGateReview.write_gate_review.owner_agent)} muted />
<Chip value={t('runtimeWriteGateReview.labels.reviewOnly')} muted />
</div>
</div>
@@ -1708,11 +1716,11 @@ export function AutomationInventoryTab() {
{target.display_name}
</span>
<span style={{ fontFamily: "'DM Mono', monospace", fontSize: 10, color: '#87867f', lineHeight: 1.45, overflowWrap: 'anywhere' }}>
{target.operator_instruction}
{target.required_before_write}
</span>
<div style={{ display: 'flex', flexWrap: 'wrap', gap: 6 }}>
<Chip value={redisDryRunValueLabel('agents', target.owner_agent)} muted />
<Chip value={target.blocked_runtime_action} muted />
<Chip value={target.blocked_write_action} muted />
</div>
</div>
))}
@@ -2583,7 +2591,7 @@ export function AutomationInventoryTab() {
<div style={{ display: 'flex', flexWrap: 'wrap', gap: 6, minWidth: 0 }}>
<Chip value={`${t('proactiveOperations.labels.owner')}: ${proactiveValueLabel('agents', capability.primary_owner)}`} />
<Chip value={`${t('proactiveOperations.labels.level')}: ${proactiveValueLabel('autonomyLevels', capability.automation_level)}`} muted />
<Chip value={`${t('proactiveOperations.labels.gate')}: ${capability.approval_gate}`} muted={capability.approval_gate === 'read_only_allowed'} />
<Chip value={`${t('proactiveOperations.labels.gate')}: ${proactiveApprovalGateLabel(capability.approval_gate)}`} muted={capability.approval_gate === 'read_only_allowed'} />
<Chip value={`${t('proactiveOperations.labels.outputs')}: ${capability.outputs.length}`} muted />
</div>
<SmallLabel>{t('proactiveOperations.labels.telegram')}</SmallLabel>