razancodes's picture
feat: Add PLR curriculum engine, GRPO trainer, and 5th AGUI panel; merge frontend updates
dd6813e
/* ═══════════════════════════════════════════════════════════════
MEMEX β€” Case Intelligence Terminal Styles
═══════════════════════════════════════════════════════════════ */
/* ── Container & Top Bar ──────────────────── */
.caseContainer {
display: flex;
flex-direction: column;
width: 100%;
height: 100%;
background: var(--nx-black);
animation: nx-fade-in 0.6s ease;
}
.caseTopBar {
display: flex;
align-items: center;
gap: 16px;
padding: 8px 16px;
background: var(--nx-surface);
border-bottom: 1px solid var(--nx-border);
flex-shrink: 0;
height: 44px;
}
.caseInfo {
display: flex;
align-items: center;
gap: 8px;
flex: 1;
overflow: hidden;
}
.caseId {
font-size: 11px;
font-weight: 700;
color: var(--nx-orange);
text-transform: uppercase;
letter-spacing: 0.06em;
}
.caseSep {
color: var(--nx-border);
font-size: 14px;
}
.caseSummary {
font-size: 10px;
color: var(--nx-text-dim);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.caseProgress {
display: flex;
align-items: center;
gap: 6px;
}
.caseStep {
font-size: 14px;
font-weight: 700;
color: var(--nx-text);
font-variant-numeric: tabular-nums;
}
/* ── Two-Panel Layout ────────────────────── */
.panelLayoutGrid {
display: grid;
grid-template-columns: 65% 35%;
grid-template-rows: 50% 50%;
grid-template-areas:
"graph env"
"graph terminal";
flex: 1;
overflow: hidden;
gap: 1px;
background: var(--nx-border);
}
.panelLayoutGrid > *:nth-child(1) { grid-area: graph; background: var(--nx-black); }
.panelLayoutGrid > *:nth-child(2) { grid-area: env; background: var(--nx-black); }
.panelLayoutGrid > *:nth-child(3) { grid-area: terminal; background: var(--nx-black); }
.panel {
display: flex;
flex-direction: column;
overflow: hidden;
min-width: 0;
}
/* Panel header bar (shared for fullscreen toggle) */
.panelHeaderBar {
display: flex;
align-items: center;
justify-content: space-between;
padding: 6px 12px;
border-bottom: 1px solid var(--nx-border);
background: var(--nx-surface-alt);
flex-shrink: 0;
min-height: 32px;
}
.panelHeaderActions {
display: flex;
align-items: center;
gap: 8px;
}
/* ── Right Stack (Env + Terminal) ─────────── */
.rightStack {
display: flex;
flex-direction: column;
height: 100%;
overflow: hidden;
}
.rightStackPanel {
display: flex;
flex-direction: column;
flex: 1;
min-height: 0;
overflow: hidden;
border-bottom: 1px solid var(--nx-border);
}
.rightStackPanel:last-child {
border-bottom: none;
}
.rightStackContent {
flex: 1;
min-height: 0;
overflow-y: auto;
overflow-x: hidden;
}
/* ── Fullscreen Overlay ───────────────────── */
.fullscreenOverlay {
position: fixed !important;
inset: 0 !important;
width: 100vw !important;
height: 100vh !important;
z-index: 9999 !important;
background: var(--nx-black) !important;
animation: nx-fade-in 0.25s ease;
}
/* ── Environment State Panel (Left) ───────── */
.envPanel {
display: flex;
flex-direction: column;
gap: 4px;
padding: 4px;
height: 100%;
overflow-y: auto;
background: var(--nx-black);
}
.envEmpty {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100%;
color: var(--nx-muted);
font-size: 11px;
gap: 8px;
}
.envEmptyIcon {
font-size: 28px;
opacity: 0.3;
}
.envRamFull {
animation: nx-pulse-red 2s ease-in-out infinite;
}
/* RAM */
.ramBar {
height: 4px;
background: var(--nx-border);
border-radius: 2px;
overflow: hidden;
margin-bottom: 8px;
}
.ramFill {
height: 100%;
border-radius: 2px;
transition: width 0.4s, background 0.4s;
}
.ramSlots {
display: flex;
flex-direction: column;
gap: 4px;
}
.ramSlot {
padding: 6px 8px;
background: var(--nx-surface-alt);
border: 1px solid var(--nx-border);
border-radius: 2px;
}
.ramSlotEmpty {
opacity: 0.3;
border-style: dashed;
}
.ramSlotLabel {
font-size: 8px;
color: var(--nx-muted);
text-transform: uppercase;
letter-spacing: 0.08em;
display: block;
margin-bottom: 2px;
}
.ramSlotText {
font-size: 9px;
color: var(--nx-text-dim);
line-height: 1.4;
word-break: break-word;
}
/* Disk */
.diskBody {
max-height: 120px;
overflow-y: auto;
}
.diskEmpty {
font-size: 10px;
color: var(--nx-muted);
}
.diskEntry {
display: flex;
gap: 6px;
padding: 4px 0;
border-bottom: 1px solid var(--nx-surface-alt);
animation: nx-highlight-flash 1s ease-out;
}
.diskIndex {
font-size: 9px;
color: var(--nx-green);
flex-shrink: 0;
min-width: 16px;
}
.diskText {
font-size: 10px;
color: var(--nx-text);
line-height: 1.4;
}
/* Async Jobs */
.asyncJob {
display: flex;
align-items: center;
gap: 6px;
padding: 4px 0;
font-size: 10px;
}
.asyncId {
color: var(--nx-orange);
font-weight: 600;
min-width: 60px;
}
.asyncTool {
color: var(--nx-text-dim);
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
}
/* Kernel */
.kernelBody {
max-height: 100px;
overflow-y: auto;
}
.kernelEntry {
display: flex;
align-items: flex-start;
gap: 6px;
padding: 4px 0;
font-size: 10px;
}
.kernelText {
color: var(--nx-text);
line-height: 1.4;
}
/* Reward */
.rewardRow {
display: flex;
gap: 16px;
margin-bottom: 8px;
}
.rewardMetric {
display: flex;
flex-direction: column;
gap: 2px;
}
.rewardValue {
font-size: 18px;
font-weight: 700;
}
.rewardValueSm {
font-size: 14px;
font-weight: 600;
}
/* Progress */
.progressBar {
height: 4px;
background: var(--nx-border);
border-radius: 2px;
overflow: hidden;
}
.progressFill {
height: 100%;
background: var(--nx-orange);
border-radius: 2px;
transition: width 0.4s ease;
}
/* ── Entity Graph (Left, wide) ───────────── */
.graphContainer {
display: flex;
flex-direction: column;
height: 100%;
background-color: var(--nx-black);
background-image:
radial-gradient(circle at 50% 50%, rgba(234, 88, 12, 0.04) 0%, transparent 60%),
linear-gradient(rgba(42, 42, 45, 0.4) 1px, transparent 1px),
linear-gradient(90deg, rgba(42, 42, 45, 0.4) 1px, transparent 1px);
background-size: 100% 100%, 20px 20px, 20px 20px;
background-position: center center;
position: relative;
}
.graphCanvas {
flex: 1;
min-height: 0;
}
.graphTooltip {
position: absolute;
z-index: 100;
background: rgba(28, 28, 31, 0.95);
border: 1px solid var(--nx-border);
border-radius: 2px;
padding: 10px 12px;
min-width: 160px;
max-width: 220px;
pointer-events: none;
backdrop-filter: blur(8px);
animation: tooltipFadeIn 0.15s ease;
}
@keyframes tooltipFadeIn {
from { opacity: 0; transform: translateY(4px); }
to { opacity: 1; transform: translateY(0); }
}
.ttHeader {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 4px;
}
.ttType {
font-size: 9px;
color: var(--nx-muted);
text-transform: uppercase;
letter-spacing: 0.06em;
}
.ttRisk {
font-size: 9px;
font-weight: 700;
text-transform: uppercase;
}
.ttName {
font-size: 12px;
font-weight: 600;
color: var(--nx-text-bright);
margin-bottom: 4px;
}
.ttRow {
display: flex;
justify-content: space-between;
font-size: 10px;
color: var(--nx-text-dim);
padding: 2px 0;
}
.ttRow span:last-child {
color: var(--nx-text);
}
.ttFlag {
font-size: 9px;
color: var(--nx-red);
margin-top: 4px;
padding-top: 4px;
border-top: 1px solid var(--nx-border);
}
/* Detail Tray */
.detailTray {
position: absolute;
right: 0;
top: 32px;
bottom: 0;
width: 240px;
background: rgba(28, 28, 31, 0.97);
border-left: 1px solid var(--nx-border);
z-index: 50;
animation: slideInRight 0.3s ease;
display: flex;
flex-direction: column;
overflow-y: auto;
}
@keyframes slideInRight {
from { transform: translateX(100%); }
to { transform: translateX(0); }
}
.detailHeader {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px 12px;
border-bottom: 1px solid var(--nx-border);
}
.detailTitle {
font-size: 12px;
font-weight: 700;
color: var(--nx-text-bright);
}
.detailBody {
padding: 12px;
display: flex;
flex-direction: column;
gap: 8px;
}
.detailRow {
display: flex;
justify-content: space-between;
font-size: 11px;
color: var(--nx-text);
}
.detailFlag {
font-size: 10px;
color: var(--nx-red);
padding: 6px 8px;
background: rgba(212, 51, 74, 0.08);
border: 1px solid rgba(212, 51, 74, 0.2);
border-radius: 2px;
}
/* ── Agent Terminal (Right, stacked) ─────── */
.terminalContainer {
display: flex;
flex-direction: column;
height: 100%;
background: var(--nx-black);
}
.terminalBody {
flex: 1;
overflow-y: auto;
padding: 8px;
}
.termEntry {
padding: 8px;
margin-bottom: 4px;
border: 1px solid var(--nx-surface-alt);
border-radius: 2px;
background: var(--nx-surface);
}
.termEntryFinal {
border-color: var(--nx-green);
background: rgba(34, 197, 94, 0.03);
}
.termStepHeader {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 4px;
}
.termStepNum {
font-size: 9px;
font-weight: 700;
color: var(--nx-orange);
text-transform: uppercase;
letter-spacing: 0.08em;
}
.termReward {
font-size: 10px;
font-weight: 700;
font-variant-numeric: tabular-nums;
}
.termReasoning {
margin-bottom: 6px;
padding: 4px 6px;
background: var(--nx-surface-alt);
border-left: 2px solid var(--nx-orange);
border-radius: 0 2px 2px 0;
}
.termReasonLabel {
font-size: 8px;
color: var(--nx-muted);
text-transform: uppercase;
letter-spacing: 0.06em;
display: block;
margin-bottom: 2px;
}
.termReasonText {
font-size: 10px;
color: var(--nx-text);
line-height: 1.4;
margin: 0;
}
.termPrompt {
display: flex;
align-items: center;
gap: 6px;
margin-bottom: 4px;
}
.termPS1 {
font-size: 10px;
color: var(--nx-green);
flex-shrink: 0;
}
.termCmd {
font-size: 11px;
color: var(--nx-text-bright);
font-weight: 600;
}
.termParams {
padding: 4px 8px;
margin: 2px 0 4px 0;
background: var(--nx-surface-alt);
border-radius: 2px;
}
.termParam {
font-size: 9px;
display: flex;
gap: 6px;
padding: 1px 0;
}
.termParamKey {
color: var(--nx-cyan);
flex-shrink: 0;
}
.termParamVal {
color: var(--nx-text-dim);
word-break: break-all;
}
.termOutput {
font-size: 10px;
color: var(--nx-text-dim);
line-height: 1.4;
padding-left: 2px;
}
.termFinal {
margin-top: 6px;
padding: 8px;
background: rgba(34, 197, 94, 0.06);
border: 1px solid rgba(34, 197, 94, 0.2);
border-radius: 2px;
font-size: 10px;
font-weight: 700;
color: var(--nx-green);
text-transform: uppercase;
letter-spacing: 0.06em;
}
.termFinalIcon {
margin-right: 6px;
animation: nx-pulse 1s ease infinite;
}
.termCursor {
display: flex;
align-items: center;
gap: 6px;
padding: 4px 8px;
}
.termBlink {
color: var(--nx-green);
animation: blink 1s step-end infinite;
}
@keyframes blink {
0%, 100% { opacity: 1; }
50% { opacity: 0; }
}
/* ── Curriculum Panel (5th AGUI Panel) ──────── */
.curriculumPanel {
background: var(--nx-surface);
border: 1px solid var(--nx-border);
border-radius: 4px;
padding: 10px 12px;
margin-top: 8px;
}
.curriculumHeader {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 10px;
padding-bottom: 6px;
border-bottom: 1px solid var(--nx-border);
}
.curriculumTitle {
font-family: var(--font-mono);
font-size: 10px;
letter-spacing: 1.5px;
color: var(--nx-dim);
text-transform: uppercase;
}
.curriculumBadge {
font-family: var(--font-mono);
font-size: 9px;
letter-spacing: 1px;
padding: 2px 6px;
border-radius: 2px;
background: rgba(249, 115, 22, 0.15);
color: var(--accent-orange, #f97316);
border: 1px solid rgba(249, 115, 22, 0.3);
}
.curriculumGrid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 8px 12px;
}
.curriculumMetric {
display: flex;
flex-direction: column;
gap: 3px;
}
.curriculumLabel {
font-family: var(--font-mono);
font-size: 9px;
letter-spacing: 1px;
color: var(--nx-dim);
text-transform: uppercase;
}
.curriculumValue {
font-family: var(--font-mono);
font-size: 12px;
color: var(--nx-text);
}
.curriculumDifficulty {
font-family: var(--font-mono);
font-size: 11px;
font-weight: 700;
letter-spacing: 1px;
padding: 2px 6px;
border: 1px solid;
border-radius: 2px;
display: inline-block;
width: fit-content;
}
.curriculumBar {
position: relative;
height: 16px;
background: rgba(255, 255, 255, 0.05);
border-radius: 2px;
overflow: hidden;
border: 1px solid var(--nx-border);
}
.curriculumBarFill {
height: 100%;
border-radius: 1px;
transition: width 0.4s ease, background-color 0.4s ease;
min-width: 2px;
}
.curriculumBarValue {
position: absolute;
top: 50%;
right: 6px;
transform: translateY(-50%);
font-family: var(--font-mono);
font-size: 9px;
color: var(--nx-text);
text-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
}