/** Visualization-heavy stage views: distribution shift, conditional
* performance heatmap (Simpson's paradox surface), paired transition matrix,
* significance CI plot, feature parity ranked deltas. */
import Box from '@mui/material/Box';
import Chip from '@mui/material/Chip';
import Tooltip from '@mui/material/Tooltip';
import Typography from '@mui/material/Typography';
import {
BORDER,
DeltaBar,
Explainer,
KV,
PsiBadge,
SectionCard,
StatusPill,
tableSx,
} from './common';
// ------------------------------------------------ stage 3: distribution shift
export function ShiftView({ data }: { data: any }) {
if (data.volume_ok === false) {
return (
<>
Too little data to assess shift: PSI estimates are upward-biased at
this volume, so shift can be neither confirmed nor excluded. This
is itself a finding — record it and proceed with the unknown
acknowledged.
>
);
}
const renderRows = (rows: any[]) => (