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

@@ -3228,6 +3228,16 @@
"L1_report_only": "L1 僅報告",
"L2_approval_package_only": "L2 僅批准包",
"L3_draft_change_after_gate": "L3 批准後草案"
},
"approvalGates": {
"read_only_allowed": "只讀允許",
"km_write_owner_review_required": "KM 寫入需 owner 審查",
"secret_value_handling_forbidden": "機密值處理禁止",
"owner_review_required": "需 owner 審查",
"runtime_worker_gate_required": "需 runtime worker 關卡",
"db_migration_required": "需 DB migration 關卡",
"replay_shadow_canary_gate_required": "需 replay / shadow / canary 關卡",
"cost_data_approval_required": "需費用與資料邊界批准"
}
},
"hostStateful": {
@@ -3847,7 +3857,8 @@
},
"labels": {
"requiredFields": "必填欄位 {count}",
"forbiddenFields": "禁止欄位 {count}"
"forbiddenFields": "禁止欄位 {count}",
"reviewOnly": "只讀審查"
}
},
"ownerDryRunPackage": {

View File

@@ -3228,6 +3228,16 @@
"L1_report_only": "L1 僅報告",
"L2_approval_package_only": "L2 僅批准包",
"L3_draft_change_after_gate": "L3 批准後草案"
},
"approvalGates": {
"read_only_allowed": "只讀允許",
"km_write_owner_review_required": "KM 寫入需 owner 審查",
"secret_value_handling_forbidden": "機密值處理禁止",
"owner_review_required": "需 owner 審查",
"runtime_worker_gate_required": "需 runtime worker 關卡",
"db_migration_required": "需 DB migration 關卡",
"replay_shadow_canary_gate_required": "需 replay / shadow / canary 關卡",
"cost_data_approval_required": "需費用與資料邊界批准"
}
},
"hostStateful": {
@@ -3847,7 +3857,8 @@
},
"labels": {
"requiredFields": "必填欄位 {count}",
"forbiddenFields": "禁止欄位 {count}"
"forbiddenFields": "禁止欄位 {count}",
"reviewOnly": "只讀審查"
}
},
"ownerDryRunPackage": {

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>

View File

@@ -1630,10 +1630,6 @@ export interface AiAgentRuntimeWriteGateReviewSnapshot {
truth_note: string
}
write_gate_review: {
review_id: string
display_name: string
owner_agent: 'openclaw' | 'hermes' | 'nemotron'
status: string
operator_meaning: string
required_fields: string[]
forbidden_fields: string[]
@@ -1641,12 +1637,10 @@ export interface AiAgentRuntimeWriteGateReviewSnapshot {
write_targets: Array<{
target_id: string
display_name: string
target_surface: string
status: string
owner_agent: 'openclaw' | 'hermes' | 'nemotron'
required_approval: string
blocked_runtime_action: string
operator_instruction: string
required_before_write: string
blocked_write_action: string
}>
approval_gates: Array<{
gate_id: string
@@ -1654,13 +1648,11 @@ export interface AiAgentRuntimeWriteGateReviewSnapshot {
status: string
required_evidence: string
blocked_runtime_action: string
operator_instruction: string
}>
post_write_verification: {
verification_required: true
rollback_required: true
verification_steps: string[]
failure_escalation: string
}
approval_boundaries: Record<string, false>
display_redaction_contract: {