refactor: UI consistency — shared CSS, design system colors, no inline styles
All checks were successful
CI / cleanup-branch (push) Has been skipped
CI / build (push) Successful in 1m22s
CI / docker (push) Successful in 1m9s
CI / deploy-feature (push) Has been skipped
CI / deploy (push) Successful in 36s

Phase 1: Extract 6 shared CSS modules (table-section, log-panel,
rate-colors, refresh-indicator, chart-card, section-card) eliminating
~135 duplicate class definitions across 11 files.

Phase 2: Replace all hardcoded hex colors in CSS modules with design
system variables. Strip ~55 hex fallbacks from var() patterns. Fix 4
undefined variable names (--accent, --bg-base, --surface, --bg-surface-raised).

Phase 3: Replace ~45 hardcoded hex values in ProcessDiagram SVG
components with var() CSS custom properties. Fix Dashboard.tsx color prop.

Phase 4: Create CSS modules for AdminLayout, DatabaseAdminPage,
OidcCallback (previously 100% inline). Extract shared PageLoader
component (replaces 3 copy-pasted spinner patterns). Move AppsTab
static inline styles to CSS classes. Extract LayoutShell StarredList styles.

58 files changed, net -219 lines.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
hsiegeln
2026-04-09 14:55:54 +02:00
parent bfed8174ca
commit ff62a34d89
58 changed files with 770 additions and 989 deletions

View File

@@ -36,6 +36,10 @@ import type { ExecutionSummary } from '../../api/types';
import type { CatalogApp, CatalogRoute } from '../../api/queries/catalog';
import { buildFlowSegments } from '../../utils/diagram-mapping';
import styles from './RouteDetail.module.css';
import tableStyles from '../../styles/table-section.module.css';
import rateStyles from '../../styles/rate-colors.module.css';
import chartCardStyles from '../../styles/chart-card.module.css';
import tapModalStyles from '../../components/TapConfigModal.module.css';
// ── Row types ────────────────────────────────────────────────────────────────
@@ -714,11 +718,11 @@ export default function RouteDetail() {
</div>
{/* Processor Performance table (full width) */}
<div className={styles.tableSection}>
<div className={styles.tableHeader}>
<span className={styles.tableTitle}>Processor Performance</span>
<div className={styles.tableRight}>
<span className={styles.tableMeta}>{processorRows.length} processors</span>
<div className={`${tableStyles.tableSection} ${styles.tableSection}`}>
<div className={tableStyles.tableHeader}>
<span className={tableStyles.tableTitle}>Processor Performance</span>
<div className={tableStyles.tableRight}>
<span className={tableStyles.tableMeta}>{processorRows.length} processors</span>
<Badge label="AUTO" color="success" />
</div>
</div>
@@ -732,8 +736,8 @@ export default function RouteDetail() {
{/* Route Flow section */}
{diagramFlows.length > 0 && (
<div className={styles.routeFlowSection}>
<div className={styles.tableHeader}>
<span className={styles.tableTitle}>Route Flow</span>
<div className={tableStyles.tableHeader}>
<span className={tableStyles.tableTitle}>Route Flow</span>
</div>
<RouteFlow flows={diagramFlows} />
</div>
@@ -745,7 +749,7 @@ export default function RouteDetail() {
{activeTab === 'performance' && (
<div className={styles.chartGrid} style={{ marginTop: 16 }}>
<div className={styles.chartCard}>
<div className={chartCardStyles.chartCard}>
<div className={styles.chartTitle}>Throughput</div>
<AreaChart
series={[{
@@ -755,7 +759,7 @@ export default function RouteDetail() {
height={200}
/>
</div>
<div className={styles.chartCard}>
<div className={chartCardStyles.chartCard}>
<div className={styles.chartTitle}>Latency</div>
<LineChart
series={[{
@@ -766,7 +770,7 @@ export default function RouteDetail() {
threshold={{ value: 300, label: 'SLA 300ms' }}
/>
</div>
<div className={styles.chartCard}>
<div className={chartCardStyles.chartCard}>
<div className={styles.chartTitle}>Errors</div>
<BarChart
series={[{
@@ -776,7 +780,7 @@ export default function RouteDetail() {
height={200}
/>
</div>
<div className={styles.chartCard}>
<div className={chartCardStyles.chartCard}>
<div className={styles.chartTitle}>Success Rate</div>
<AreaChart
series={[{
@@ -890,13 +894,13 @@ export default function RouteDetail() {
</FormField>
<FormField label="Type">
<div className={styles.typeSelector}>
<div className={tapModalStyles.typeSelector}>
{typeChoices.map(tc => (
<button
key={tc.value}
type="button"
title={tc.tooltip}
className={`${styles.typeOption} ${tapType === tc.value ? styles.typeOptionActive : ''}`}
className={`${tapModalStyles.typeOption} ${tapType === tc.value ? tapModalStyles.typeOptionActive : ''}`}
onClick={() => setTapType(tc.value)}
>
{tc.label}
@@ -913,18 +917,18 @@ export default function RouteDetail() {
{/* Test Expression */}
<Collapsible title="Test Expression" defaultOpen>
<div className={styles.testSection}>
<div className={styles.testTabs}>
<div className={tapModalStyles.testSection}>
<div className={tapModalStyles.testTabs}>
<button
type="button"
className={`${styles.testTabBtn} ${testTab === 'recent' ? styles.testTabBtnActive : ''}`}
className={`${tapModalStyles.testTabBtn} ${testTab === 'recent' ? tapModalStyles.testTabBtnActive : ''}`}
onClick={() => setTestTab('recent')}
>
Recent Exchange
</button>
<button
type="button"
className={`${styles.testTabBtn} ${testTab === 'custom' ? styles.testTabBtnActive : ''}`}
className={`${tapModalStyles.testTabBtn} ${testTab === 'custom' ? tapModalStyles.testTabBtnActive : ''}`}
onClick={() => setTestTab('custom')}
>
Custom Payload
@@ -932,7 +936,7 @@ export default function RouteDetail() {
</div>
{testTab === 'recent' && (
<div className={styles.testBody}>
<div className={tapModalStyles.testBody}>
<Select
options={recentExchangeOptions.length > 0 ? recentExchangeOptions : [{ value: '', label: 'No recent exchanges' }]}
value={testExchangeId}
@@ -942,7 +946,7 @@ export default function RouteDetail() {
)}
{testTab === 'custom' && (
<div className={styles.testBody}>
<div className={tapModalStyles.testBody}>
<Textarea
className={styles.monoTextarea}
value={testPayload}
@@ -953,7 +957,7 @@ export default function RouteDetail() {
</div>
)}
<div className={styles.testBody}>
<div className={tapModalStyles.testBody}>
<Button
variant="secondary"
size="sm"
@@ -966,7 +970,7 @@ export default function RouteDetail() {
</div>
{testResult && (
<div className={`${styles.testResult} ${testResult.error ? styles.testError : styles.testSuccess}`}>
<div className={`${tapModalStyles.testResult} ${testResult.error ? tapModalStyles.testError : tapModalStyles.testSuccess}`}>
{testResult.error ?? testResult.result ?? 'No result'}
</div>
)}