Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion apps/ui/src/components/DiagnosticLog.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, { useEffect, useState } from 'react';

import { Phase2ConsistencyReport } from './Phase2ConsistencyReport';
import { LedIndicator } from './ui';
import { BackendTimingDiagnostics, DiagnosticLogEntry, DiagnosticLogStatus } from '../types';
import { assertNever } from '../utils/assertNever';

Expand Down Expand Up @@ -71,7 +72,7 @@ export function DiagnosticLog({ logs, defaultExpanded }: DiagnosticLogProps) {
aria-expanded={isExpanded}
aria-label="Toggle diagnostic log"
>
<span className="w-2 h-2 bg-accent rounded-full mr-2"></span>
<LedIndicator status="active" className="mr-2" />
System Diagnostics
<span className="ml-2 text-meta">{isExpanded ? '▾' : '▸'}</span>
<span className="ml-auto text-meta text-text-secondary/50">{logs.length} {logs.length === 1 ? 'entry' : 'entries'}</span>
Expand Down
52 changes: 15 additions & 37 deletions apps/ui/src/components/Phase2ConsistencyReport.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react';

import { DataTable, type DataTableColumn } from './ui';
import type { ValidationReport, ValidationViolation } from '../services/phase2Validator';

interface Phase2ConsistencyReportProps {
Expand Down Expand Up @@ -27,6 +28,19 @@ function severityClass(severity: ValidationViolation['severity']): string {
return severity === 'ERROR' ? 'text-error' : 'text-warning';
}

const violationColumns: DataTableColumn<ValidationViolation>[] = [
{
key: 'severity',
label: 'Severity',
render: (v) => (
<span className={`font-mono ${severityClass(v.severity)}`}>{v.severity}</span>
),
},
{ key: 'type', label: 'Type', render: (v) => formatViolationType(v.type) },
{ key: 'field', label: 'Field', render: (v) => v.field },
{ key: 'detail', label: 'Detail', render: (v) => truncateDetail(v.message) },
];

export function Phase2ConsistencyReport({ report, hideWhenClean = false }: Phase2ConsistencyReportProps) {
// Audit Finding #1E: dev-audience violations (currently NEW_FIELD_UNCITED
// coverage signals) stay in `report.violations` and `report.summary` so
Expand Down Expand Up @@ -59,43 +73,7 @@ export function Phase2ConsistencyReport({ report, hideWhenClean = false }: Phase
{report.summary.checkedFields} checked fields
</div>

<div className="overflow-x-auto">
<table className="w-full text-sm border-collapse">
<thead>
<tr className="border-b border-border">
{['Severity', 'Type', 'Field', 'Detail'].map((label) => (
<th
key={label}
className="px-2 py-1 text-left text-meta font-mono uppercase tracking-wide text-text-secondary font-normal"
>
{label}
</th>
))}
</tr>
</thead>
<tbody>
{userVisible.map((violation, rowIndex) => (
<tr
key={`${violation.field}-${violation.type}-${rowIndex}`}
className={`border-b border-border ${
rowIndex % 2 === 0 ? 'bg-bg-secondary' : ''
}`}
>
<td className={`px-2 py-1 text-sm font-mono ${severityClass(violation.severity)}`}>
{violation.severity}
</td>
<td className="px-2 py-1 text-sm text-text-primary">
{formatViolationType(violation.type)}
</td>
<td className="px-2 py-1 text-sm text-text-primary">{violation.field}</td>
<td className="px-2 py-1 text-sm text-text-primary">
{truncateDetail(violation.message)}
</td>
</tr>
))}
</tbody>
</table>
</div>
<DataTable data={userVisible} columns={violationColumns} />
</div>
);
}
8 changes: 2 additions & 6 deletions apps/ui/src/components/WaveformPlayer.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useCallback, useEffect, useRef, useState } from 'react';
import WaveSurfer from 'wavesurfer.js';
import { Play, Pause, Loader2, Activity } from 'lucide-react';
import { Play, Pause, Loader2 } from 'lucide-react';

import { RetroVisualizer } from './RetroVisualizer';

Expand Down Expand Up @@ -269,11 +269,7 @@ export function WaveformPlayer({ audioUrl, audioFile, onAudioElement }: Waveform
beatPulse ? 'border-accent/50' : 'border-border'
}`}
>
<div className={`flex items-center justify-between px-4 pt-1 border-b border-border/30 pb-2 transition-colors duration-200 ${hasJustLoaded ? 'bg-accent/8' : ''}`}>
<div className="flex items-center space-x-2">
<Activity className="w-4 h-4 text-accent" />
<span className="text-xs font-bold text-text-primary tracking-widest uppercase">Signal Monitor</span>
</div>
<div className={`flex items-center justify-end px-4 pt-1 border-b border-border/30 pb-2 transition-colors duration-200 ${hasJustLoaded ? 'bg-accent/8' : ''}`}>
<div className="flex items-center space-x-1">
<div className={`w-2 h-2 rounded-full transition-all duration-200 ${
isReady
Expand Down
Loading