Adopt shared WebUI structural primitives

This commit is contained in:
2026-08-18 13:17:32 +02:00
parent 504255a0bd
commit dabc568429
2 changed files with 13 additions and 63 deletions
@@ -32,6 +32,7 @@ import { FormGrid, ActionToolbar, ToolbarSpacer,
SegmentedControl,
SelectionList,
SelectionListItem,
StatePanel,
StatusBadge,
ToggleSwitch,
hasScope,
@@ -494,9 +495,7 @@ function SourcesPane({
</div>
))}
{!imported.length && (
<div className="risk-empty">
No source snapshot has been imported.
</div>
<StatePanel size="compact" description="No source snapshot has been imported." />
)}
</div>
</div>
@@ -665,26 +664,15 @@ function ScreenPane({
{run && <StatusBadge status={run.outcome} />}
</header>
{!run && (
<div className="risk-empty">
Run a screening to inspect the result.
</div>
<StatePanel size="compact" description="Run a screening to inspect the result." />
)}
{run && (
<div className="risk-result-body">
<div className="risk-metrics">
<span>
<strong>{run.candidate_count}</strong>
candidates
</span>
<span>
<strong>{run.matcher_version}</strong>
matcher
</span>
<span>
<strong>{run.list_snapshot.source_version}</strong>
list
</span>
</div>
<MetricGrid columns={3} density="compact" spacing="none" minimum="compact">
<MetricCard density="compact" surface="flat" label="Candidates" value={run.candidate_count} />
<MetricCard density="compact" surface="flat" label="Matcher" value={run.matcher_version} />
<MetricCard density="compact" surface="flat" label="List" value={run.list_snapshot.source_version} />
</MetricGrid>
{run.candidates.map((item) => (
<div className="risk-candidate-summary" key={item.id}>
<span className="risk-score">{item.score}</span>
@@ -826,9 +814,7 @@ function ReviewPane({
</SelectionList>
)}
{!queue.length && (
<div className="risk-empty">
No candidates currently need review.
</div>
<StatePanel size="compact" description="No candidates currently need review." />
)}
</div>
</aside>
@@ -851,9 +837,7 @@ function ReviewPane({
</div>
</header>
{!detail && (
<div className="risk-empty">
Select a candidate from the queue.
</div>
<StatePanel size="compact" description="Select a candidate from the queue." />
)}
{detail && (
<div className="risk-evidence-body">
@@ -1318,7 +1302,7 @@ function AssurancePane({
</SelectionList>
)}
{!visibleNodes.length && (
<div className="risk-empty">No assurance objects match.</div>
<StatePanel size="compact" description="No assurance objects match." />
)}
</div>
</aside>
@@ -1340,7 +1324,7 @@ function AssurancePane({
</div>
</header>
{!selected && (
<div className="risk-empty">Select an assurance object.</div>
<StatePanel size="compact" description="Select an assurance object." />
)}
{selected && (
<div className="risk-assurance-detail-body">
@@ -1380,7 +1364,7 @@ function AssurancePane({
/>
))}
{!graph?.edges.length && (
<div className="risk-empty">No relationships are recorded.</div>
<StatePanel size="inline" description="No relationships are recorded." />
)}
</div>
{graph?.truncated && (
-34
View File
@@ -327,12 +327,6 @@
font-size: 11px;
}
.risk-empty {
color: var(--muted);
padding: 24px;
text-align: center;
}
.risk-form-body {
display: grid;
align-content: start;
@@ -354,34 +348,6 @@
justify-self: start;
}
.risk-metrics {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
border-bottom: var(--border-line);
}
.risk-metrics > span {
display: grid;
min-width: 0;
gap: 4px;
border-right: var(--border-line);
color: var(--muted);
padding: 12px;
font-size: 11px;
}
.risk-metrics > span:last-child {
border-right: 0;
}
.risk-metrics strong {
overflow: hidden;
color: var(--text-strong);
text-overflow: ellipsis;
white-space: nowrap;
font-size: 14px;
}
.risk-score {
display: inline-grid;
width: 38px;