feat(governance): persist remediation dry run history
This commit is contained in:
@@ -159,6 +159,9 @@ interface RemediationDryRunResponse {
|
||||
tool_name?: string
|
||||
required_scope?: string
|
||||
} | null
|
||||
history?: {
|
||||
recorded?: boolean
|
||||
}
|
||||
}
|
||||
|
||||
interface RemediationActionState {
|
||||
@@ -490,27 +493,40 @@ function VerificationCoveragePanel({ coverage }: { coverage?: Adr100Verification
|
||||
<span>{actionState[item.work_item_id]?.status === 'loading' ? t('dryRunLoading') : t('dryRunButton')}</span>
|
||||
</button>
|
||||
{actionState[item.work_item_id]?.status === 'done' && (
|
||||
<div style={{
|
||||
display: 'flex',
|
||||
alignItems: 'flex-start',
|
||||
gap: 5,
|
||||
fontFamily: "'DM Mono', monospace",
|
||||
fontSize: 9,
|
||||
color: actionState[item.work_item_id].data?.allowed === false ? '#7c5a10' : '#166534',
|
||||
lineHeight: 1.4,
|
||||
overflowWrap: 'anywhere',
|
||||
}}>
|
||||
<SearchCheck size={12} style={{ flexShrink: 0, marginTop: 1 }} />
|
||||
<span>
|
||||
{actionState[item.work_item_id].data?.allowed === false
|
||||
? t('dryRunBlocked')
|
||||
: t('dryRunResult', {
|
||||
mode: actionState[item.work_item_id].data?.mode ?? '--',
|
||||
result: actionState[item.work_item_id].data?.verification_result_preview ?? '--',
|
||||
tools: actionState[item.work_item_id].data?.post_state_summary?.tool_count ?? 0,
|
||||
})}
|
||||
</span>
|
||||
</div>
|
||||
<>
|
||||
<div style={{
|
||||
display: 'flex',
|
||||
alignItems: 'flex-start',
|
||||
gap: 5,
|
||||
fontFamily: "'DM Mono', monospace",
|
||||
fontSize: 9,
|
||||
color: actionState[item.work_item_id].data?.allowed === false ? '#7c5a10' : '#166534',
|
||||
lineHeight: 1.4,
|
||||
overflowWrap: 'anywhere',
|
||||
}}>
|
||||
<SearchCheck size={12} style={{ flexShrink: 0, marginTop: 1 }} />
|
||||
<span>
|
||||
{actionState[item.work_item_id].data?.allowed === false
|
||||
? t('dryRunBlocked')
|
||||
: t('dryRunResult', {
|
||||
mode: actionState[item.work_item_id].data?.mode ?? '--',
|
||||
result: actionState[item.work_item_id].data?.verification_result_preview ?? '--',
|
||||
tools: actionState[item.work_item_id].data?.post_state_summary?.tool_count ?? 0,
|
||||
})}
|
||||
</span>
|
||||
</div>
|
||||
{actionState[item.work_item_id].data?.history?.recorded && (
|
||||
<div style={{
|
||||
fontFamily: "'DM Mono', monospace",
|
||||
fontSize: 9,
|
||||
color: '#166534',
|
||||
lineHeight: 1.4,
|
||||
overflowWrap: 'anywhere',
|
||||
}}>
|
||||
{t('dryRunHistoryRecorded')}
|
||||
</div>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
{actionState[item.work_item_id]?.status === 'error' && (
|
||||
<div style={{ fontFamily: "'DM Mono', monospace", fontSize: 9, color: '#FF3300', lineHeight: 1.4 }}>
|
||||
|
||||
Reference in New Issue
Block a user