feat(web): add iwooos rollout ladder

This commit is contained in:
Your Name
2026-05-24 15:10:19 +08:00
parent a9119561bd
commit f830d362f9
8 changed files with 361 additions and 2 deletions

View File

@@ -958,6 +958,33 @@ const frontstageSecurityEntryRoleBoundaries = [
'gitea_disablement_authorized=false',
]
const iwooosLowFrictionRolloutPhases = [
{ key: 'observe', phase: '01', state: '現在', icon: Radar, tone: 'warn' },
{ key: 'evidence', phase: '02', state: '補證', icon: ClipboardCheck, tone: 'steady' },
{ key: 'humanReview', phase: '03', state: '人控', icon: CheckCircle2, tone: 'steady' },
{ key: 'runtimeGate', phase: '04', state: '批准後', icon: ShieldCheck, tone: 'locked' },
{ key: 'tightening', phase: '05', state: '收嚴', icon: Lock, tone: 'locked' },
] as const
const iwooosLowFrictionRolloutBoundaries = [
'iwooos_rollout_phase_count=5',
'iwooos_rollout_current_phase=observe_first',
'iwooos_rollout_frontstage_source=security_compliance_s2_110',
'iwooos_rollout_runtime_phase_enabled=false',
'iwooos_rollout_enforcement_enabled=false',
'iwooos_rollout_action_buttons_allowed=false',
'runtime_execution_authorized=false',
'active_runtime_gate_count=0',
'action_buttons_allowed=false',
'not_authorization=true',
'secret_value_collection_allowed=false',
'repo_creation_authorized=false',
'refs_sync_authorized=false',
'workflow_modification_authorized=false',
'github_primary_switch_authorized=false',
'gitea_disablement_authorized=false',
] as const
const posturePillars: Pillar[] = [
{ key: 'exposure', icon: Radar, tone: 'warn' },
{ key: 'sourceControl', icon: GitBranch, tone: 'warn' },
@@ -3421,6 +3448,114 @@ function FrontstageSecurityEntryRolesBoard({ locale }: { locale: string }) {
)
}
function IwoooSLowFrictionRolloutLadderBoard() {
const t = useTranslations('iwooos.lowFrictionRollout')
const summaryItems = [
{ key: 'phases', value: '5', tone: 'warn' as const },
{ key: 'current', value: '觀測優先', tone: 'warn' as const },
{ key: 'runtime', value: '0', tone: 'locked' as const },
{ key: 'enforcement', value: '0', tone: 'locked' as const },
]
const textWrap = { overflowWrap: 'anywhere' as const, wordBreak: 'break-word' as const }
return (
<section style={{ marginBottom: 14 }} data-testid="iwooos-low-friction-rollout-ladder-board">
<div style={{ ...band, padding: 16, background: '#fffdf8' }}>
<div style={{ display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(min(100%, 280px), 1fr))', gap: 16 }}>
<div>
<div style={{ marginBottom: 14 }}>
<h2 style={{ fontSize: 17, margin: 0 }}>{t('title')}</h2>
<p style={{ fontSize: 12, color: '#6f6d66', margin: '6px 0 0', lineHeight: 1.55, ...textWrap }}>
{t('subtitle')}
</p>
</div>
<div style={{ display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(126px, 1fr))', gap: 8, marginBottom: 14 }}>
{summaryItems.map(item => (
<div key={item.key} style={{ border: '0.5px solid #eee9dd', borderRadius: 8, padding: 12 }}>
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: 8 }}>
<span style={{ fontSize: 11, color: '#87867f' }}>{t(`summary.${item.key}.label` as never)}</span>
<ToneDot tone={item.tone} />
</div>
<div style={{ fontSize: 20, fontWeight: 700, lineHeight: 1.1, marginTop: 8, color: '#141413', ...textWrap }}>
{item.value}
</div>
<p style={{ fontSize: 11, color: '#6f6d66', lineHeight: 1.45, margin: '8px 0 0', ...textWrap }}>
{t(`summary.${item.key}.detail` as never)}
</p>
</div>
))}
</div>
<div style={{ display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(152px, 1fr))', gap: 9 }}>
{iwooosLowFrictionRolloutPhases.map(item => {
const Icon = item.icon
return (
<div
key={item.key}
style={{
display: 'grid',
alignContent: 'start',
gap: 7,
minHeight: 136,
border: '0.5px solid #e7e1d3',
borderRadius: 8,
background: '#fff',
padding: 12,
color: '#141413',
...textWrap,
}}
>
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: 8 }}>
<span style={{ fontSize: 11, color: '#87867f' }}>{t('phaseLabel')} {item.phase}</span>
<Icon size={17} color={toneColors[item.tone]} />
</div>
<div style={{ fontSize: 19, fontWeight: 700, color: toneColors[item.tone], lineHeight: 1.15 }}>
{item.state}
</div>
<h3 style={{ fontSize: 13, margin: 0, color: '#141413', lineHeight: 1.3 }}>
{t(`items.${item.key}.title` as never)}
</h3>
<p style={{ fontSize: 11, color: '#6f6d66', lineHeight: 1.45, margin: 0, ...textWrap }}>
{t(`items.${item.key}.body` as never)}
</p>
</div>
)
})}
</div>
</div>
<div style={{ ...band, padding: 14, background: '#f7f5ee', alignSelf: 'stretch' }}>
<div style={{ display: 'flex', alignItems: 'center', gap: 8, marginBottom: 10 }}>
<Lock size={16} color={toneColors.locked} />
<h3 style={{ fontSize: 14, margin: 0 }}>{t('boundaryTitle')}</h3>
</div>
<p style={{ fontSize: 12, color: '#6f6d66', lineHeight: 1.55, margin: '0 0 10px', ...textWrap }}>
{t('boundaryIntro')}
</p>
<div style={{ display: 'grid', gap: 7 }}>
{iwooosLowFrictionRolloutBoundaries.map(item => (
<span
key={item}
style={{
border: '0.5px solid #e0ddd4',
borderRadius: 8,
padding: '7px 9px',
color: '#4f4c45',
fontSize: 11,
lineHeight: 1.4,
background: '#fff',
overflowWrap: 'anywhere',
}}
>
{item}
</span>
))}
</div>
</div>
</div>
</div>
</section>
)
}
function PillarCard({ item }: { item: Pillar }) {
const t = useTranslations('iwooos.pillars')
const Icon = item.icon
@@ -7163,6 +7298,8 @@ export default function IwoooSPage({ params }: { params: { locale: string } }) {
<FrontstageSecurityEntryRolesBoard locale={params.locale} />
<IwoooSLowFrictionRolloutLadderBoard />
<S49OwnerResponseDispatchFlowBoard />
<S49OwnerResponseWorkOrderBoard />