Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

feat: organize Jev into focused task views with decision evidence (#7793)

[._.]/ Adam Eivyc08da98d0078
diff --git a/client/src/App.jsx b/client/src/App.jsx
index 366fb20954..1e366e15dc 100644
--- a/client/src/App.jsx
+++ b/client/src/App.jsx
@@ -404,6 +404,8 @@ export default function App() {
TAB_DETAIL there. */}
<Route path="models/:tab" element={<Models />} />
<Route path="models/:tab/:recordId" element={<Models />} />
+ <Route path="models/decision-classifiers/jev/:taskView" element={<Models fixedTab="decision-classifiers" fixedRecordId="jev" />} />
+ <Route path="models/llms/jev/:taskView" element={<Models fixedTab="llms" fixedRecordId="jev" />} />
<Route path="local-llm/playground" element={<LocalLlmPlayground />} />
<Route path="uploads" element={<Uploads />} />
<Route path="shell" element={<Shell />} />
diff --git a/client/src/components/models/JevIntegrations.jsx b/client/src/components/models/JevIntegrations.jsx
index 059bbd0ed7..2b8e85f5ed 100644
--- a/client/src/components/models/JevIntegrations.jsx
+++ b/client/src/components/models/JevIntegrations.jsx
@@ -8,6 +8,7 @@ const SOURCES = [
['email', 'Message triage action and priority'],
['stacker-news', 'Stacker News classification and risk'],
];
+const CONSEQUENCES = { disabled: 'No Jev scoring for this source.', off: 'Compare with chat without changing its answer.', prefer: 'Use local decisions; fall back to chat on abstention or failure.', only: 'Use local decisions; skip unresolved items.' };
const MODES = { disabled: 'Disabled', off: 'Shadow', prefer: 'Prefer local', only: 'Local only' };
export default function JevIntegrations({ registry, status }) {
@@ -56,9 +57,9 @@ export default function JevIntegrations({ registry, status }) {
<p className="text-xs text-gray-400">Shadow compares with the chat provider without changing its answer. Prefer local falls back to chat on abstention or failure. Local only skips unresolved items. Disabled runs no Jev scoring for that source. All sources also require the global switch and an installed model.</p>
{(error || saveError) && <p role="alert" className="text-xs text-port-warning">{saveError || 'Could not refresh integration settings; displayed settings may be stale.'} <button type="button" onClick={refetch} className="underline">Retry</button></p>}
{!policy && !error && <p className="text-xs text-gray-400">Loading integration settings…</p>}
- <fieldset disabled={saving || !!error || !policy} className="grid grid-cols-1 sm:grid-cols-2 gap-4">
+ <fieldset disabled={saving || !!error || !policy} className="grid grid-cols-1 lg:grid-cols-2 gap-4">
{SOURCES.map(([source, label]) => (
- <div key={source}>
+ <div key={source} className="min-w-0">
<label htmlFor={`jev-source-${source}`} className="block text-xs text-gray-300 mb-1">{label}</label>
<select id={`jev-source-${source}`} value={policy?.sources?.[source]?.jevMode || 'off'}
disabled={!policy?.sources?.[source]}
@@ -66,6 +67,7 @@ export default function JevIntegrations({ registry, status }) {
className="w-full bg-port-bg border border-port-border rounded p-2 text-sm text-white">
{Object.entries(MODES).map(([value, name]) => <option key={value} value={value}>{name}</option>)}
</select>
+ <p className="text-xs text-gray-300 mt-1">{CONSEQUENCES[policy?.sources?.[source]?.jevMode] || 'Awaiting saved policy.'}</p>
{policy && !policy.sources?.[source] && <p className="text-xs text-port-warning">Invalid policy; repair content safety settings.</p>}
<p className="text-xs text-gray-500 mt-1">Additional margin floor: {policy?.sources?.[source]?.jevMinMargin ?? 'per-decision default'}</p>
</div>
diff --git a/client/src/components/models/JevPanel.jsx b/client/src/components/models/JevPanel.jsx
index 139069dc4a..e5ddb8a848 100644
--- a/client/src/components/models/JevPanel.jsx
+++ b/client/src/components/models/JevPanel.jsx
@@ -1,7 +1,10 @@
import { useCallback, useEffect, useRef, useState } from 'react';
-import { CheckCircle2, Circle, Download, ExternalLink, GraduationCap, RefreshCw, Scale } from 'lucide-react';
+import { CheckCircle2, Circle, Download, ExternalLink, GraduationCap, RefreshCw, Scale, Plug, BarChart3, Wrench } from 'lucide-react';
+import { useLocation, useNavigate, useParams } from 'react-router';
+import TabPills from '../ui/TabPills';
import toast from '../ui/Toast';
import JevIntegrations from './JevIntegrations';
+import { useInstanceFeatures } from '../../hooks/useInstanceFeatures';
import { useAutoRefetch } from '../../hooks/useAutoRefetch';
import BrailleSpinner from '../BrailleSpinner';
import { formatBytes, formatCount, formatPercent } from '../../utils/formatters';
@@ -46,7 +49,28 @@ const formatRate = (rate) => formatPercent(rate === null ? null : rate * 100);
const TRAINABLE_DECISION_ID = 'scope-adherence';
+const TASK_VIEWS = [
+ { id: 'try', label: 'Try a decision', icon: Scale },
+ { id: 'integrations', label: 'Integrations', icon: Plug },
+ { id: 'results', label: 'Results', icon: BarChart3 },
+ { id: 'training', label: 'Training', icon: GraduationCap },
+ { id: 'setup', label: 'Setup', icon: Wrench },
+];
+const JEV_PATH = '/models/decision-classifiers/jev';
+
export default function JevPanel() {
+ const { taskView } = useParams();
+ const { features, error: featureError } = useInstanceFeatures();
+ const feature = features?.find(item => item.id === 'jev');
+ const navigate = useNavigate();
+ const location = useLocation();
+ const validView = TASK_VIEWS.some(item => item.id === taskView);
+ const activeView = validView ? taskView : 'try';
+ const openView = (view) => navigate({ pathname: `${JEV_PATH}/${view}`, search: location.search });
+ useEffect(() => {
+ if (!validView) navigate({ pathname: `${JEV_PATH}/try`, search: location.search }, { replace: true });
+ }, [validView, navigate, location.search]);
+
const [status, setStatus] = useState(null);
const [statusError, setStatusError] = useState(false);
const [installing, setInstalling] = useState(false);
@@ -208,10 +232,9 @@ export default function JevPanel() {
return (
<section
id="llm-management-panel-jev"
- role="tabpanel"
aria-labelledby="jev-heading"
data-testid="jev-card"
- className="max-w-6xl bg-port-card border border-port-border rounded-xl p-4 sm:p-6 space-y-5"
+ className="min-w-0 bg-port-card border border-port-border rounded-xl p-4 sm:p-6 space-y-5"
>
<div className="flex items-start justify-between gap-3 flex-wrap">
<div className="flex items-start gap-2">
@@ -232,333 +255,355 @@ export default function JevPanel() {
)}
</div>
- <JevIntegrations registry={decisionStats?.registry} status={statusError ? null : status} />
-
- <p className="text-sm text-gray-300 max-w-2xl leading-relaxed">
- Answers closed-set questions — &ldquo;which of these options does this text entail?&rdquo; — without generating text
- or spending provider quota. When the top two options are too close to separate, it <strong>abstains</strong> rather
- than guessing.
- </p>
-
- <div className="space-y-3">
- <div className="flex flex-wrap items-baseline justify-between gap-2">
- <h3 className="text-sm font-semibold text-white">Installation</h3>
- <span className="text-xs text-gray-400">{stages.filter((stage) => stage.ready).length} of {stages.length} checks ready</span>
+ <p className="text-xs text-gray-400">Integrations: {featureError || !feature ? 'unknown' : feature.enabled ? 'enabled' : 'disabled'}. Manual scoring and training are explicit actions.</p>
+ <TabPills tabs={TASK_VIEWS} activeTab={activeView} onChange={openView}
+ ariaLabel="Jev tasks" controlsIdPrefix="jev-task" mobileCompact />
+ {(installing || trainingActive || scoring) && (
+ <div role="status" className="flex flex-wrap gap-3 text-xs text-port-accent">
+ {installing && <button type="button" onClick={() => openView('setup')} className="underline">Installation in progress</button>}
+ {trainingActive && <button type="button" onClick={() => openView('training')} className="underline">Training in progress</button>}
+ {scoring && <button type="button" onClick={() => openView('try')} className="underline">Scoring in progress</button>}
</div>
- <ol className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-2 list-none p-0" aria-label="jev setup stages">
- {stages.map((stage) => {
- const current = installing && currentStageId === stage.id;
- const waiting = installing && !stage.ready && currentStageId && currentStageId !== stage.id;
- return (
- <li
- key={stage.id}
- data-testid={`jev-stage-${stage.id}`}
- data-ready={stage.ready ? 'true' : 'false'}
- className="flex items-start gap-2 rounded-lg border border-port-border/70 bg-port-bg/40 px-3 py-2"
- >
- <span className="mt-0.5 shrink-0" aria-hidden="true">
- {stage.ready ? (
- <CheckCircle2 size={14} className="text-port-success" />
- ) : current ? (
- <BrailleSpinner />
- ) : (
- <Circle size={14} className={waiting ? 'text-gray-600' : 'text-port-warning'} />
- )}
- </span>
- <div className="min-w-0">
- <div className="flex items-center gap-2 flex-wrap">
- <p className="text-xs font-medium text-white">{stage.label}</p>
- <span className={`text-[11px] ${stage.ready ? 'text-port-success' : current ? 'text-gray-300' : 'text-gray-500'}`}>
- {stage.ready ? 'Ready' : current ? 'Installing…' : waiting ? 'Waiting' : 'Not ready'}
- </span>
+ )}
+ <div hidden={activeView !== 'integrations'} id="jev-task-integrations" role="tabpanel" aria-labelledby="tab-integrations">
+ <JevIntegrations registry={decisionStats?.registry} status={statusError ? null : status} />
+ </div>
+ <div hidden={activeView !== 'setup'} id="jev-task-setup" role="tabpanel" aria-labelledby="tab-setup">
+ <div className="space-y-3">
+ <div className="flex flex-wrap items-baseline justify-between gap-2">
+ <h3 className="text-sm font-semibold text-white">Installation</h3>
+ <span className="text-xs text-gray-400">{stages.filter((stage) => stage.ready).length} of {stages.length} checks ready</span>
+ </div>
+ <ol className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-2 list-none p-0" aria-label="jev setup stages">
+ {stages.map((stage) => {
+ const current = installing && currentStageId === stage.id;
+ const waiting = installing && !stage.ready && currentStageId && currentStageId !== stage.id;
+ return (
+ <li
+ key={stage.id}
+ data-testid={`jev-stage-${stage.id}`}
+ data-ready={stage.ready ? 'true' : 'false'}
+ className="flex items-start gap-2 rounded-lg border border-port-border/70 bg-port-bg/40 px-3 py-2"
+ >
+ <span className="mt-0.5 shrink-0" aria-hidden="true">
+ {stage.ready ? (
+ <CheckCircle2 size={14} className="text-port-success" />
+ ) : current ? (
+ <BrailleSpinner />
+ ) : (
+ <Circle size={14} className={waiting ? 'text-gray-600' : 'text-port-warning'} />
+ )}
+ </span>
+ <div className="min-w-0">
+ <div className="flex items-center gap-2 flex-wrap">
+ <p className="text-xs font-medium text-white">{stage.label}</p>
+ <span className={`text-[11px] ${stage.ready ? 'text-port-success' : current ? 'text-gray-300' : 'text-gray-500'}`}>
+ {stage.ready ? 'Ready' : current ? 'Installing…' : waiting ? 'Waiting' : 'Not ready'}
+ </span>
+ </div>
+ <details className="mt-1 text-xs text-gray-400">
+ <summary className="cursor-pointer hover:text-port-accent">Details</summary>
+ <p className="mt-1 leading-relaxed">{stage.description}</p>
+ </details>
+ {stage.id === 'python' && !stage.ready && (
+ <a href="https://www.python.org/downloads/" target="_blank" rel="noopener noreferrer" className="text-xs text-port-accent hover:underline">Install Python, then refresh status</a>
+ )}
+ {current && progressMsg && <p className="text-[11px] text-gray-400 mt-1">{progressMsg}</p>}
</div>
- <details className="mt-1 text-xs text-gray-400">
- <summary className="cursor-pointer hover:text-port-accent">Details</summary>
- <p className="mt-1 leading-relaxed">{stage.description}</p>
- </details>
- {stage.id === 'python' && !stage.ready && (
- <a href="https://www.python.org/downloads/" target="_blank" rel="noopener noreferrer" className="text-xs text-port-accent hover:underline">Install Python, then refresh status</a>
- )}
- {current && progressMsg && <p className="text-[11px] text-gray-400 mt-1">{progressMsg}</p>}
- </div>
- </li>
- );
- })}
- </ol>
-
- <div className="flex items-center gap-2 flex-wrap text-[11px] text-gray-500">
- <span>{status?.name || 'OpenJEV Qwen3.5 4B NLI'}</span>
- <span>·</span>
- <span>{status?.weightsBytes ? formatBytes(status.weightsBytes) : '~9 GB'} · offline · no tools</span>
- <a
- href={status?.sourceUrl || 'https://huggingface.co/AlexWortega/openjev'}
- target="_blank"
- rel="noopener noreferrer"
- className="text-port-accent hover:underline inline-flex items-center gap-1"
- >
- Model card <ExternalLink size={11} />
- </a>
- </div>
-
- <div className="flex items-center gap-2 flex-wrap">
- <button type="button" onClick={() => { loadStatus(); loadStats(); loadHeads(); }} disabled={installing} className="px-2.5 py-1 text-xs border border-port-border text-gray-300 rounded flex items-center gap-1 disabled:opacity-50">
- <RefreshCw size={12} /> Refresh status
- </button>
- {ready ? (
- <span className="text-xs text-port-success">Installed from the pinned model revision.</span>
- ) : installing ? (
- <>
- <span className="flex items-center gap-1.5 text-xs text-gray-300"><BrailleSpinner /> Installing the jev scorer…</span>
- <button type="button" onClick={cancel} className="px-2.5 py-1 text-xs bg-port-border hover:bg-port-border/70 text-gray-300 rounded">Cancel</button>
- </>
- ) : (
- <button
- type="button"
- onClick={install}
- disabled={!status || status.pythonAvailable !== true}
- className="px-2.5 py-1 text-xs bg-port-accent/20 hover:bg-port-accent/30 text-port-accent rounded disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-1"
+ </li>
+ );
+ })}
+ </ol>
+
+ <div className="flex items-center gap-2 flex-wrap text-[11px] text-gray-500">
+ <span>{status?.name || 'OpenJEV Qwen3.5 4B NLI'}</span>
+ <span>·</span>
+ <span>{status?.weightsBytes ? formatBytes(status.weightsBytes) : '~9 GB'} · offline · no tools</span>
+ <a
+ href={status?.sourceUrl || 'https://huggingface.co/AlexWortega/openjev'}
+ target="_blank"
+ rel="noopener noreferrer"
+ className="text-port-accent hover:underline inline-flex items-center gap-1"
>
- <Download size={12} /> {incomplete ? 'Repair jev' : 'Install jev'}
+ Model card <ExternalLink size={11} />
+ </a>
+ </div>
+
+ <div className="flex items-center gap-2 flex-wrap">
+ <button type="button" onClick={() => { loadStatus(); loadStats(); loadHeads(); }} disabled={installing} className="px-2.5 py-1 text-xs border border-port-border text-gray-300 rounded flex items-center gap-1 disabled:opacity-50">
+ <RefreshCw size={12} /> Refresh status
</button>
+ {ready ? (
+ <span className="text-xs text-port-success">Installed from the pinned model revision.</span>
+ ) : installing ? (
+ <>
+ <span className="flex items-center gap-1.5 text-xs text-gray-300"><BrailleSpinner /> Installing the jev scorer…</span>
+ <button type="button" onClick={cancel} className="px-2.5 py-1 text-xs bg-port-border hover:bg-port-border/70 text-gray-300 rounded">Cancel</button>
+ </>
+ ) : (
+ <button
+ type="button"
+ onClick={install}
+ disabled={!status || status.pythonAvailable !== true}
+ className="px-2.5 py-1 text-xs bg-port-accent/20 hover:bg-port-accent/30 text-port-accent rounded disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-1"
+ >
+ <Download size={12} /> {incomplete ? 'Repair jev' : 'Install jev'}
+ </button>
+ )}
+ {status?.resident && (
+ <>
+ <span className="text-xs text-gray-400">Model resident on port {status.port}</span>
+ <button type="button" onClick={unload} className="px-2.5 py-1 text-xs border border-port-border text-gray-300 rounded">Unload now</button>
+ </>
+ )}
+ {installing && progressMsg && !installingStage && <span className="text-[11px] text-gray-500">{progressMsg}</span>}
+ </div>
+
+ {(installError || status?.lastInstallFailure) && (
+ <div role="alert" className="text-xs text-port-warning space-y-1 break-words">
+ {installError && <p>{installError}</p>}
+ {status?.lastInstallFailure && <p>{status.lastInstallFailure.stage}: {status.lastInstallFailure.code}. {status.lastInstallFailure.message} {status.lastInstallFailure.action}</p>}
+ </div>
)}
- {status?.resident && (
- <>
- <span className="text-xs text-gray-400">Model resident on port {status.port}</span>
- <button type="button" onClick={unload} className="px-2.5 py-1 text-xs border border-port-border text-gray-300 rounded">Unload now</button>
- </>
- )}
- {installing && progressMsg && !installingStage && <span className="text-[11px] text-gray-500">{progressMsg}</span>}
+ {status?.runtimeIssue && <p className="text-xs text-port-warning">{status.runtimeIssue.message} {status.runtimeIssue.action}</p>}
+ <p className="text-xs text-gray-400">
+ Install downloads Python packages and the pinned 4B weights only — the repository&rsquo;s larger variants are never fetched.
+ The scorer loads on the first question and unloads itself after ten idle minutes.
+ </p>
</div>
- {(installError || status?.lastInstallFailure) && (
- <div role="alert" className="text-xs text-port-warning space-y-1 break-words">
- {installError && <p>{installError}</p>}
- {status?.lastInstallFailure && <p>{status.lastInstallFailure.stage}: {status.lastInstallFailure.code}. {status.lastInstallFailure.message} {status.lastInstallFailure.action}</p>}
- </div>
- )}
- {status?.runtimeIssue && <p className="text-xs text-port-warning">{status.runtimeIssue.message} {status.runtimeIssue.action}</p>}
- <p className="text-xs text-gray-400">
- Install downloads Python packages and the pinned 4B weights only — the repository&rsquo;s larger variants are never fetched.
- The scorer loads on the first question and unloads itself after ten idle minutes.
- </p>
</div>
-
- <div className="space-y-3 border-t border-port-border pt-4">
- <h3 className="text-sm font-semibold text-white">Agreement with the chat model</h3>
- <p className="text-xs text-gray-400 max-w-2xl">
- When the global feature is enabled and a source is set to <strong>Shadow</strong>, PortOS still asks the scorer each closed-set question and compares
- its answer to the one the chat model gave — without changing anything. Use these rates to decide whether a source
- is ready for <strong>Prefer</strong>. Counts only: no message, comment, or diff text is recorded.
- </p>
- {statsError && <p role="alert" className="text-xs text-port-warning">Decision metrics unavailable; any displayed counts may be stale.</p>}
- {!decisionStats?.decisions?.length ? (
- <p className="text-xs text-gray-500">{statsError ? 'Refresh status to retry.' : decisionStats ? 'No decisions measured yet on this machine.' : 'Loading decision metrics…'}</p>
- ) : (
- <div className="overflow-x-auto">
- <table className="w-full text-xs" data-testid="jev-decision-stats">
- <thead>
- <tr className="text-gray-400 text-left">
- <th scope="col" className="py-1 pr-3 font-medium">Decision</th>
- <th scope="col" className="py-1 pr-3 font-medium">Observed</th>
- <th scope="col" className="py-1 pr-3 font-medium">Abstained</th>
- <th scope="col" className="py-1 pr-3 font-medium">Unavailable</th>
- <th scope="col" className="py-1 pr-3 font-medium">Agreed</th>
- </tr>
- </thead>
- <tbody>
- {decisionStats.decisions.map((row) => (
- <tr key={row.decisionId} className="border-t border-port-border/60 text-gray-300">
- <th scope="row" className="py-1.5 pr-3 font-normal text-white">{row.label}</th>
- <td className="py-1.5 pr-3">{formatCount(row.observed, { fallback: '0' })}</td>
- <td className="py-1.5 pr-3">{formatRate(row.abstentionRate)}</td>
- <td className="py-1.5 pr-3">{formatCount(row.unavailable, { fallback: '0' })}</td>
- <td className="py-1.5 pr-3">
- {formatRate(row.agreementRate)}
- <span className="text-gray-500"> of {formatCount(row.compared, { fallback: '0' })}</span>
- </td>
+ <div hidden={activeView !== 'results'} id="jev-task-results" role="tabpanel" aria-labelledby="tab-results">
+ <div className="space-y-3">
+ <h3 className="text-sm font-semibold text-white">Agreement with the chat model</h3>
+ <p className="text-xs text-gray-400 max-w-2xl">
+ When the global feature is enabled and a source is set to <strong>Shadow</strong>, PortOS still asks the scorer each closed-set question and compares
+ its answer to the one the chat model gave — without changing anything. Use these rates to decide whether a source
+ is ready for <strong>Prefer</strong>. Counts only: no message, comment, or diff text is recorded.
+ </p>
+ {statsError && <p role="alert" className="text-xs text-port-warning">Decision metrics unavailable; any displayed counts may be stale.</p>}
+ {!decisionStats?.decisions?.length ? (
+ <p className="text-xs text-gray-500">{statsError ? 'Refresh status to retry.' : decisionStats ? 'No decisions measured yet on this machine.' : 'Loading decision metrics…'}</p>
+ ) : (
+ <div className="overflow-x-auto">
+ <table className="w-full text-xs" data-testid="jev-decision-stats">
+ <thead>
+ <tr className="text-gray-400 text-left">
+ <th scope="col" className="py-1 pr-3 font-medium">Decision</th>
+ <th scope="col" className="py-1 pr-3 font-medium">Observed</th>
+ <th scope="col" className="py-1 pr-3 font-medium">Abstained</th>
+ <th scope="col" className="py-1 pr-3 font-medium">Unavailable</th>
+ <th scope="col" className="py-1 pr-3 font-medium">Agreed</th>
</tr>
- ))}
- </tbody>
- </table>
- </div>
- )}
- <a href="/models/llms/abuse" className="text-xs text-port-accent hover:underline">Configure advanced content safety policies</a>
- </div>
+ </thead>
+ <tbody>
+ {decisionStats.decisions.map((row) => (
+ <tr key={row.decisionId} className="border-t border-port-border/60 text-gray-300">
+ <th scope="row" className="py-1.5 pr-3 font-normal text-white">{row.label}</th>
+ <td className="py-1.5 pr-3">{formatCount(row.observed, { fallback: '0' })}</td>
+ <td className="py-1.5 pr-3">{formatRate(row.abstentionRate)}</td>
+ <td className="py-1.5 pr-3">{formatCount(row.unavailable, { fallback: '0' })}</td>
+ <td className="py-1.5 pr-3">
+ {formatRate(row.agreementRate)}
+ <span className="text-gray-500"> of {formatCount(row.compared, { fallback: '0' })}</span>
+ </td>
+ </tr>
+ ))}
+ </tbody>
+ </table>
+ </div>
+ )}
+ <a href="/models/llms/abuse" className="text-xs text-port-accent hover:underline">Configure advanced content safety policies</a>
+ </div>
- <div className="space-y-3 border-t border-port-border pt-4">
- <h3 className="text-sm font-semibold text-white">Project-specific head</h3>
- <p className="text-xs text-gray-400 max-w-2xl">
- Fits a small classifier on the frozen scorer using this machine&rsquo;s own history — merged pull requests,
- closed-unmerged ones, and issues closed as not planned or parked — so scope adherence learns <em>this</em>{' '}
- codebase&rsquo;s notion of in-scope instead of answering zero-shot. Everything stays on this machine: the corpus,
- the cached embeddings and the trained head never leave it and never reach a peer.
- </p>
- <p className="text-xs text-gray-400 max-w-2xl">
- A trained head is <strong>only adoptable if it beats both baselines</strong> on a held-out set it was never
- trained on — the stock zero-shot scorer and always predicting the most common answer. A head that does not is
- discarded, which is an ordinary result rather than a failure.
- </p>
-
- {headStatusError && <p role="alert" className="text-xs text-port-warning">Head status unavailable; refresh status to retry. Displayed head data may be stale.</p>}
- {(headState?.heads || []).length === 0 ? (
- <p className="text-xs text-gray-500">{headStatusError ? 'Training and adoption state could not be verified.' : headState ? 'No project head trained on this machine. Scope adherence answers zero-shot.' : 'Loading project heads…'}</p>
- ) : (
- <div className="overflow-x-auto">
- <table className="w-full text-xs" data-testid="jev-head-table">
- <thead>
- <tr className="text-gray-400 text-left">
- <th scope="col" className="py-1 pr-3 font-medium">Head</th>
- <th scope="col" className="py-1 pr-3 font-medium">Trained</th>
- <th scope="col" className="py-1 pr-3 font-medium">Zero-shot</th>
- <th scope="col" className="py-1 pr-3 font-medium">Majority class</th>
- <th scope="col" className="py-1 pr-3 font-medium">Actions</th>
- </tr>
- </thead>
- <tbody>
- {headState.heads.map((row) => (
- <tr key={`${row.decisionId}-${row.adopted}`} className="border-t border-port-border/60 text-gray-300 align-top">
- <th scope="row" className="py-1.5 pr-3 font-normal text-white">
- {row.decisionId}
- <span className="block text-[11px] text-gray-500">
- {row.adopted ? 'Adopted' : 'Candidate'}
- {row.ok && row.compatible === false && ' · fit on a different model revision'}
- </span>
- </th>
- {row.ok ? (
- <>
- <td className="py-1.5 pr-3 text-white">{formatRate(row.metrics.trained)}</td>
- <td className="py-1.5 pr-3">{formatRate(row.metrics.stockZeroShot)}</td>
- <td className="py-1.5 pr-3">{formatRate(row.metrics.majorityClass)}</td>
- </>
- ) : (
- <td className="py-1.5 pr-3 text-port-warning" colSpan={3}>Unreadable: {row.code}</td>
- )}
- <td className="py-1.5 pr-3">
- <div className="flex flex-wrap items-center gap-2">
- {!row.adopted && row.ok && (
+ </div>
+ <div hidden={activeView !== 'training'} id="jev-task-training" role="tabpanel" aria-labelledby="tab-training">
+ <div className="space-y-3">
+ <h3 className="text-sm font-semibold text-white">Project-specific head</h3>
+ <p className="text-xs text-gray-400 max-w-2xl">
+ Fits a small classifier on the frozen scorer using this machine&rsquo;s own history — merged pull requests,
+ closed-unmerged ones, and issues closed as not planned or parked — so scope adherence learns <em>this</em>{' '}
+ codebase&rsquo;s notion of in-scope instead of answering zero-shot. Everything stays on this machine: the corpus,
+ the cached embeddings and the trained head never leave it and never reach a peer.
+ </p>
+ <p className="text-xs text-gray-400 max-w-2xl">
+ A trained head is <strong>only adoptable if it beats both baselines</strong> on a held-out set it was never
+ trained on — the stock zero-shot scorer and always predicting the most common answer. A head that does not is
+ discarded, which is an ordinary result rather than a failure.
+ </p>
+
+ {headStatusError && <p role="alert" className="text-xs text-port-warning">Head status unavailable; refresh status to retry. Displayed head data may be stale.</p>}
+ {(headState?.heads || []).length === 0 ? (
+ <p className="text-xs text-gray-500">{headStatusError ? 'Training and adoption state could not be verified.' : headState ? 'No project head trained on this machine. Scope adherence answers zero-shot.' : 'Loading project heads…'}</p>
+ ) : (
+ <div className="overflow-x-auto">
+ <table className="w-full text-xs" data-testid="jev-head-table">
+ <thead>
+ <tr className="text-gray-400 text-left">
+ <th scope="col" className="py-1 pr-3 font-medium">Head</th>
+ <th scope="col" className="py-1 pr-3 font-medium">Trained</th>
+ <th scope="col" className="py-1 pr-3 font-medium">Zero-shot</th>
+ <th scope="col" className="py-1 pr-3 font-medium">Majority class</th>
+ <th scope="col" className="py-1 pr-3 font-medium">Actions</th>
+ </tr>
+ </thead>
+ <tbody>
+ {headState.heads.map((row) => (
+ <tr key={`${row.decisionId}-${row.adopted}`} className="border-t border-port-border/60 text-gray-300 align-top">
+ <th scope="row" className="py-1.5 pr-3 font-normal text-white">
+ {row.decisionId}
+ <span className="block text-[11px] text-gray-500">
+ {row.adopted ? 'Adopted' : 'Candidate'}
+ {row.ok && row.compatible === false && ' · fit on a different model revision'}
+ </span>
+ </th>
+ {row.ok ? (
+ <>
+ <td className="py-1.5 pr-3 text-white">{formatRate(row.metrics.trained)}</td>
+ <td className="py-1.5 pr-3">{formatRate(row.metrics.stockZeroShot)}</td>
+ <td className="py-1.5 pr-3">{formatRate(row.metrics.majorityClass)}</td>
+ </>
+ ) : (
+ <td className="py-1.5 pr-3 text-port-warning" colSpan={3}>Unreadable: {row.code}</td>
+ )}
+ <td className="py-1.5 pr-3">
+ <div className="flex flex-wrap items-center gap-2">
+ {!row.adopted && row.ok && (
+ <button
+ type="button"
+ onClick={() => adoptHead(row.decisionId)}
+ disabled={row.beatsBaselines !== true || row.compatible === false}
+ className="px-2 py-0.5 text-[11px] bg-port-accent/20 hover:bg-port-accent/30 text-port-accent rounded disabled:opacity-50 disabled:cursor-not-allowed"
+ >
+ Adopt
+ </button>
+ )}
<button
type="button"
- onClick={() => adoptHead(row.decisionId)}
- disabled={row.beatsBaselines !== true || row.compatible === false}
- className="px-2 py-0.5 text-[11px] bg-port-accent/20 hover:bg-port-accent/30 text-port-accent rounded disabled:opacity-50 disabled:cursor-not-allowed"
+ onClick={() => discardHead(row.decisionId, row.adopted)}
+ className="px-2 py-0.5 text-[11px] border border-port-border text-gray-300 rounded"
>
- Adopt
+ Discard
</button>
+ </div>
+ {row.ok && row.blocker && (
+ <p className="text-[11px] text-port-warning mt-1 max-w-xs">{jevHeadBlockerLabel(row.blocker)}</p>
)}
- <button
- type="button"
- onClick={() => discardHead(row.decisionId, row.adopted)}
- className="px-2 py-0.5 text-[11px] border border-port-border text-gray-300 rounded"
- >
- Discard
- </button>
- </div>
- {row.ok && row.blocker && (
- <p className="text-[11px] text-port-warning mt-1 max-w-xs">{jevHeadBlockerLabel(row.blocker)}</p>
- )}
- {row.ok && (
- <p className="text-[11px] text-gray-500 mt-1">
- {formatCount(row.metrics.goldSize, { fallback: '0' })} held-out ·{' '}
- {formatCount(row.metrics.trainSize, { fallback: '0' })} trained
- </p>
- )}
- </td>
- </tr>
- ))}
- </tbody>
- </table>
- </div>
- )}
-
- <div className="flex items-center gap-2 flex-wrap">
- <button
- type="button"
- onClick={runTraining}
- disabled={!ready || trainingActive || !headState || headStatusError}
- className="px-2.5 py-1 text-xs bg-port-accent/20 hover:bg-port-accent/30 text-port-accent rounded disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-1"
- >
- <GraduationCap size={12} /> {trainingActive ? 'Training…' : 'Train a project head'}
- </button>
- <label htmlFor="jev-head-architecture" className="text-xs text-gray-400">Head</label>
- <select
- id="jev-head-architecture"
- value={architecture}
- onChange={(event) => setArchitecture(event.target.value)}
- disabled={trainingActive}
- className="text-xs bg-port-bg border border-port-border rounded px-2 py-1 text-gray-200 disabled:opacity-50"
- >
- <option value="linear">Linear</option>
- <option value="mlp1">One hidden layer</option>
- </select>
- {!ready && <span className="text-xs text-gray-500">Install jev first.</span>}
- {trainingActive && (
- <span className="flex items-center gap-1.5 text-xs text-gray-300">
- <BrailleSpinner /> Reading this repository&rsquo;s history and encoding it once — minutes on a cold cache, seconds after.
- </span>
+ {row.ok && (
+ <p className="text-[11px] text-gray-500 mt-1">
+ {formatCount(row.metrics.goldSize, { fallback: '0' })} held-out ·{' '}
+ {formatCount(row.metrics.trainSize, { fallback: '0' })} trained
+ </p>
+ )}
+ </td>
+ </tr>
+ ))}
+ </tbody>
+ </table>
+ </div>
)}
- <span className="text-[11px] text-gray-500">Trains {TRAINABLE_DECISION_ID}. Never adopts on its own.</span>
- </div>
- {headError && <p role="alert" className="text-xs text-port-warning">{headError}</p>}
- </div>
- <div className="space-y-3 border-t border-port-border pt-4">
- <h3 className="text-sm font-semibold text-white">Try a decision</h3>
- <p className="text-xs text-gray-400 max-w-2xl">
- Paste the text to reason over, then one option per line. At least two options: the confidence margin is the gap
- between the best two, so a single option has nothing to be measured against.
- </p>
- <div>
- <label htmlFor="jev-premise" className="block text-xs text-gray-400 mb-1">Premise</label>
- <textarea
- id="jev-premise"
- value={premise}
- onChange={(event) => setPremise(event.target.value)}
- rows={4}
- className="w-full text-sm bg-port-bg border border-port-border rounded p-2 text-gray-200"
- placeholder="The text to reason over."
- />
- </div>
- <div>
- <label htmlFor="jev-hypotheses" className="block text-xs text-gray-400 mb-1">Options (one per line)</label>
- <textarea
- id="jev-hypotheses"
- value={hypothesesText}
- onChange={(event) => setHypothesesText(event.target.value)}
- rows={4}
- className="w-full text-sm bg-port-bg border border-port-border rounded p-2 text-gray-200"
- placeholder={'This warrants a reply.\nThis warrants no reply.'}
- />
- </div>
- <div className="flex items-center gap-2 flex-wrap">
- <button
- type="button"
- onClick={runScore}
- disabled={!canScore || scoring}
- className="px-2.5 py-1 text-xs bg-port-accent/20 hover:bg-port-accent/30 text-port-accent rounded disabled:opacity-50 disabled:cursor-not-allowed"
- >
- {scoring ? 'Scoring…' : 'Score'}
- </button>
- {!ready && <span className="text-xs text-gray-500">Install jev first.</span>}
- {ready && hypotheses.length < 2 && <span className="text-xs text-gray-500">Add at least two options.</span>}
- {scoring && <span className="flex items-center gap-1.5 text-xs text-gray-300"><BrailleSpinner /> The first question loads the model, which can take a minute.</span>}
- </div>
- {decision && (
- <div role="status" data-testid="jev-decision" className="text-sm rounded-lg border border-port-border p-3 space-y-1">
- {decision.ok === false ? (
- <p className="text-port-warning">Scoring failed: {decision.code}</p>
- ) : decision.abstained ? (
- <>
- <p className="text-port-warning">Abstained — the top two options were too close to separate.</p>
- <p className="text-xs text-gray-400">Margin {decision.margin?.toFixed(3)}. A caller treats this as &ldquo;ask something else&rdquo;, never as &ldquo;take the top one anyway&rdquo;.</p>
- </>
- ) : (
- <>
- <p className="text-port-success break-words">Chose: {decision.choice}</p>
- <p className="text-xs text-gray-400">Entailment {decision.confidence?.toFixed(3)} · margin {decision.margin?.toFixed(3)}</p>
- </>
+ <div className="flex items-center gap-2 flex-wrap">
+ <button
+ type="button"
+ onClick={runTraining}
+ disabled={!ready || trainingActive || !headState || headStatusError}
+ className="px-2.5 py-1 text-xs bg-port-accent/20 hover:bg-port-accent/30 text-port-accent rounded disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-1"
+ >
+ <GraduationCap size={12} /> {trainingActive ? 'Training…' : 'Train a project head'}
+ </button>
+ <label htmlFor="jev-head-architecture" className="text-xs text-gray-400">Head</label>
+ <select
+ id="jev-head-architecture"
+ value={architecture}
+ onChange={(event) => setArchitecture(event.target.value)}
+ disabled={trainingActive}
+ className="text-xs bg-port-bg border border-port-border rounded px-2 py-1 text-gray-200 disabled:opacity-50"
+ >
+ <option value="linear">Linear</option>
+ <option value="mlp1">One hidden layer</option>
+ </select>
+ {!ready && <span className="text-xs text-gray-500">Install jev first.</span>}
+ {trainingActive && (
+ <span className="flex items-center gap-1.5 text-xs text-gray-300">
+ <BrailleSpinner /> Reading this repository&rsquo;s history and encoding it once — minutes on a cold cache, seconds after.
+ </span>
)}
+ <span className="text-[11px] text-gray-500">Trains {TRAINABLE_DECISION_ID}. Never adopts on its own.</span>
</div>
- )}
+ {headError && <p role="alert" className="text-xs text-port-warning">{headError}</p>}
+ </div>
+
+ </div>
+ <div hidden={activeView !== 'try'} id="jev-task-try" role="tabpanel" aria-labelledby="tab-try">
+ <div className="space-y-3">
+ <h3 className="text-sm font-semibold text-white">Try a decision</h3>
+ <p className="text-xs text-gray-400 max-w-2xl">
+ Paste the text to reason over, then one option per line. At least two options: the confidence margin is the gap
+ between the best two, so a single option has nothing to be measured against.
+ </p>
+ {!ready && <button type="button" onClick={() => openView('setup')} className="text-sm text-port-accent underline">Open Setup to prepare the scorer</button>}
+ <div className="grid grid-cols-1 xl:grid-cols-2 gap-6 items-start">
+ <div className="min-w-0 space-y-3">
+ <div>
+ <label htmlFor="jev-premise" className="block text-xs text-gray-400 mb-1">Premise</label>
+ <textarea
+ id="jev-premise"
+ value={premise}
+ onChange={(event) => setPremise(event.target.value)}
+ rows={4}
+ className="w-full text-sm bg-port-bg border border-port-border rounded p-2 text-gray-200"
+ placeholder="The text to reason over."
+ />
+ </div>
+ <div>
+ <label htmlFor="jev-hypotheses" className="block text-xs text-gray-400 mb-1">Options (one per line)</label>
+ <textarea
+ id="jev-hypotheses"
+ value={hypothesesText}
+ onChange={(event) => setHypothesesText(event.target.value)}
+ rows={4}
+ className="w-full text-sm bg-port-bg border border-port-border rounded p-2 text-gray-200"
+ placeholder={'This warrants a reply.\nThis warrants no reply.'}
+ />
+ </div>
+ <div className="flex items-center gap-2 flex-wrap">
+ <button
+ type="button"
+ onClick={runScore}
+ disabled={!canScore || scoring}
+ className="px-2.5 py-1 text-xs bg-port-accent/20 hover:bg-port-accent/30 text-port-accent rounded disabled:opacity-50 disabled:cursor-not-allowed"
+ >
+ {scoring ? 'Scoring…' : 'Score'}
+ </button>
+ {!ready && <span className="text-xs text-gray-500">Install jev first.</span>}
+ {ready && hypotheses.length < 2 && <span className="text-xs text-gray-500">Add at least two options.</span>}
+ {scoring && <span className="flex items-center gap-1.5 text-xs text-gray-300"><BrailleSpinner /> The first question loads the model, which can take a minute.</span>}
+ </div>
+ </div>
+ <div className="min-w-0 space-y-3">
+ <h4 className="text-sm font-semibold text-white">Decision evidence</h4>
+ {!decision && <p role="status" className="text-sm text-gray-400">{scoring ? 'Scoring the supplied options…' : 'Score at least two options to see the choice or abstention here.'}</p>}
+ {decision && (
+ <div role="status" data-testid="jev-decision" className="text-sm rounded-lg border border-port-border p-3 space-y-1">
+ {decision.ok === false ? (
+ <p className="text-port-warning">Scoring failed: {decision.code}</p>
+ ) : decision.abstained ? (
+ <>
+ <p className="text-port-warning">Abstained — the top two options were too close to separate.</p>
+ <p className="text-xs text-gray-400">Margin {decision.margin?.toFixed(3)}. A caller treats this as &ldquo;ask something else&rdquo;, never as &ldquo;take the top one anyway&rdquo;.</p>
+ </>
+ ) : (
+ <>
+ <p className="text-port-success break-words">Chose: {decision.choice}</p>
+ <p className="text-xs text-gray-400">Entailment {decision.confidence?.toFixed(3)} · margin {decision.margin?.toFixed(3)}</p>
+ </>
+ )}
+ </div>
+ )}
+ </div>
+ </div>
+ </div>
</div>
</section>
);
diff --git a/client/src/components/models/JevPanel.test.jsx b/client/src/components/models/JevPanel.test.jsx
index 808776214c..19a913d157 100644
--- a/client/src/components/models/JevPanel.test.jsx
+++ b/client/src/components/models/JevPanel.test.jsx
@@ -13,6 +13,7 @@ vi.mock('../../services/api', () => ({
adoptJevHead: vi.fn(),
discardJevHead: vi.fn(),
}));
+vi.mock('../../hooks/useInstanceFeatures', () => ({ useInstanceFeatures: () => ({ features: [{ id: 'jev', enabled: false }] }) }));
vi.mock('./JevIntegrations', () => ({ default: () => <div>Integration controls</div> }));
vi.mock('../../services/socket', () => ({ default: { on: vi.fn(), off: vi.fn() } }));
vi.mock('../ui/Toast', () => ({
@@ -25,6 +26,8 @@ import {
} from '../../services/api';
import socket from '../../services/socket';
import JevPanel from './JevPanel';
+import { MemoryRouter, Routes, Route } from 'react-router';
+let initialView = 'try';
const stages = (ready) => [
{ id: 'python', label: 'Host Python', description: 'A Python interpreter.', ready: true },
@@ -77,13 +80,16 @@ const headRow = (overrides = {}) => ({
});
const renderPanel = async () => {
- render(<JevPanel />);
+ render(<MemoryRouter initialEntries={['/models/decision-classifiers/jev/' + initialView]}><Routes>
+ <Route path="/models/decision-classifiers/jev/:taskView?" element={<JevPanel />} />
+ </Routes></MemoryRouter>);
const heading = await screen.findByRole('heading', { name: 'jev decision scorer' });
expect(heading).toBeInTheDocument();
- expect(screen.getByRole('tabpanel')).toHaveAttribute('aria-labelledby', heading.id);
+ expect(screen.getByTestId('jev-card')).toHaveAttribute('aria-labelledby', heading.id);
};
describe('JevPanel install', () => {
+ beforeEach(() => { initialView = 'setup'; });
it('shows four stages and no Hugging Face token step — openjev is ungated', async () => {
await renderPanel();
await waitFor(() => expect(screen.getByTestId('jev-stage-model')).toBeInTheDocument());
@@ -130,6 +136,7 @@ describe('JevPanel install', () => {
});
describe('JevPanel try-it box', () => {
+ beforeEach(() => { initialView = 'try'; });
const ready = () => getJevStatus.mockResolvedValue(status({ ready: true, setupState: 'ready', stages: stages(true) }));
const fill = (premise, options) => {
@@ -189,6 +196,7 @@ describe('JevPanel try-it box', () => {
});
it('offers an immediate unload only while the model is resident', async () => {
+ initialView = 'setup';
await renderPanel();
expect(screen.queryByRole('button', { name: 'Unload now' })).not.toBeInTheDocument();
@@ -200,6 +208,7 @@ describe('JevPanel try-it box', () => {
});
describe('JevPanel decision agreement', () => {
+ beforeEach(() => { initialView = 'results'; });
it('reads an unmeasured decision as no data rather than as zero agreement', async () => {
getJevDecisionStats.mockResolvedValue({ updatedAt: null, decisions: [
{ decisionId: 'issue-comment-reply', label: 'Issue comment reply gate', observed: 0, decided: 0, abstained: 0, unavailable: 0, compared: 0, agreed: 0, agreementRate: null, abstentionRate: null },
@@ -229,6 +238,7 @@ describe('JevPanel decision agreement', () => {
});
describe('JevPanel project head', () => {
+ beforeEach(() => { initialView = 'training'; });
it('says scope adherence answers zero-shot when no head is trained', async () => {
await renderPanel();
expect(await screen.findByText(/answers zero-shot/)).toBeInTheDocument();
@@ -330,6 +340,7 @@ describe('JevPanel project head', () => {
});
describe('JevPanel head architecture', () => {
+ beforeEach(() => { initialView = 'training'; });
// `mlp1` is in the artifact contract and the trainer; a knob only a
// hand-written request could reach is a knob nobody tunes.
it('trains the architecture the operator picked', async () => {
@@ -342,3 +353,40 @@ describe('JevPanel head architecture', () => {
expect(trainJevHead).toHaveBeenCalledWith({ architecture: 'mlp1' }, { silent: true });
});
});
+
+
+describe('Jev task navigation', () => {
+ it('retains drafts and an in-flight result through task switches without resubscribing', async () => {
+ initialView = 'try';
+ getJevStatus.mockResolvedValue(status({ ready: true }));
+ let resolveScore;
+ scoreJev.mockImplementation(() => new Promise(resolve => { resolveScore = resolve; }));
+ await renderPanel();
+ fireEvent.change(screen.getByLabelText('Premise'), { target: { value: 'Example premise' } });
+ fireEvent.change(screen.getByLabelText('Options (one per line)'), { target: { value: 'First\nSecond' } });
+ fireEvent.click(screen.getByRole('button', { name: 'Score' }));
+ const subscriptions = socket.on.mock.calls.length;
+ fireEvent.click(screen.getByRole('tab', { name: 'Results' }));
+ expect(screen.queryByRole('button', { name: 'Score' })).not.toBeInTheDocument();
+ await act(async () => resolveScore({ ok: true, abstained: true, margin: 0.01 }));
+ fireEvent.click(screen.getByRole('tab', { name: 'Try a decision' }));
+ expect(screen.getByLabelText('Premise')).toHaveValue('Example premise');
+ expect(screen.getByLabelText('Options (one per line)')).toHaveValue('First\nSecond');
+ expect(screen.getByTestId('jev-decision')).toHaveTextContent('Abstained');
+ expect(scoreJev).toHaveBeenCalledTimes(1);
+ expect(socket.on).toHaveBeenCalledTimes(subscriptions);
+ expect(socket.off).not.toHaveBeenCalled();
+ });
+
+ it('recovers an invalid view to Try and exposes setup recovery without starting work', async () => {
+ initialView = 'unknown';
+ await renderPanel();
+ expect(screen.getByRole('tab', { name: 'Try a decision' })).toHaveAttribute('aria-selected', 'true');
+ fireEvent.click(screen.getByRole('button', { name: 'Open Setup to prepare the scorer' }));
+ expect(screen.getByRole('tab', { name: 'Setup' })).toHaveAttribute('aria-selected', 'true');
+ expect(screen.getByRole('button', { name: 'Install jev' })).toBeInTheDocument();
+ expect(installJev).not.toHaveBeenCalled();
+ expect(scoreJev).not.toHaveBeenCalled();
+ expect(trainJevHead).not.toHaveBeenCalled();
+ });
+});
diff --git a/client/src/pages/Models.jsx b/client/src/pages/Models.jsx
index 200daf3651..e8edc51d19 100644
--- a/client/src/pages/Models.jsx
+++ b/client/src/pages/Models.jsx
@@ -83,9 +83,12 @@ const TAB_DETAIL = {
training: LoraDatasetDetail,
};
-export default function Models() {
- const { tab, recordId } = useParams();
- if (tab === 'llms' && recordId === 'jev') return <Navigate to="/models/decision-classifiers/jev" replace />;
+export default function Models({ fixedTab, fixedRecordId } = {}) {
+ const params = useParams();
+ const tab = fixedTab || params.tab;
+ const recordId = fixedRecordId || params.recordId;
+ const { taskView } = params;
+ if (tab === 'llms' && recordId === 'jev') return <Navigate to={`/models/decision-classifiers/jev${taskView ? '/' + taskView : ''}`} replace />;
// An unknown slug lands on LLMs rather than rendering a blank page, matching
// the section's default destination in App and the primary navigation.
//
diff --git a/client/src/pages/Models.test.jsx b/client/src/pages/Models.test.jsx
index 2c78099d2f..f9cc8f261b 100644
--- a/client/src/pages/Models.test.jsx
+++ b/client/src/pages/Models.test.jsx
@@ -64,6 +64,8 @@ const renderAt = (path) => render(
<Routes>
<Route path="/models/:tab" element={<Models />} />
<Route path="/models/:tab/:recordId" element={<Models />} />
+ <Route path="/models/decision-classifiers/jev/:taskView" element={<Models fixedTab="decision-classifiers" fixedRecordId="jev" />} />
+ <Route path="/models/llms/jev/:taskView" element={<Models fixedTab="llms" fixedRecordId="jev" />} />
</Routes>
</MemoryRouter>
);
@@ -211,3 +213,9 @@ it('redirects the old Jev URL into Decision Classifiers', async () => {
expect(await screen.findByText('classifiers panel jev')).toBeInTheDocument();
expect(screen.getByRole('tab', { name: 'Decision Classifiers' })).toHaveAttribute('aria-selected', 'true');
});
+
+it('keeps the Jev task legacy alias within the Decision Classifiers host', async () => {
+ renderAt('/models/llms/jev/results');
+ expect(await screen.findByText('classifiers panel jev')).toBeInTheDocument();
+ expect(screen.getByRole('tab', { name: 'Decision Classifiers' })).toHaveAttribute('aria-selected', 'true');
+});
diff --git a/docs/UX_DESIGN_AUDIT.md b/docs/UX_DESIGN_AUDIT.md
index 60c87fde84..b76837c1be 100644
--- a/docs/UX_DESIGN_AUDIT.md
+++ b/docs/UX_DESIGN_AUDIT.md
@@ -58,3 +58,28 @@ Each slice needs a behavior inventory, a content map, responsive review, and a s
| New task views could collide with generic `recordId` routes or reset active work. | Specify explicit Jev/Performance route matrices, legacy defaults, invalid-route recovery, measurement identity, drawer compatibility, and state/subscription ownership. |
The review also confirmed missing Jev and Abuse Guard entries in `client/src/lib/navPresentation.js`; promotion must add distinct icon mappings. Navigation changes must preserve the shared registry, not copy icons into a second list. The earlier conversation mockup is exploratory; its text-only navigation and menu-only mobile shell do not override the reviewed icon requirements.
+
+## Jev pilot (#7793)
+
+The pilot retains the newer Decision Classifiers home introduced after the
+specification: `/models/decision-classifiers/jev/:taskView`. The proposed
+`/models/llms/jev/:taskView` links redirect there. Try a decision is the default;
+unknown views recover to Try. Integrations, Results, Training and Setup are
+named destinations with desktop labels and compact mobile icons. Mutable state
+and subscriptions remain mounted across local view changes; hidden panels are
+excluded from keyboard and accessibility navigation. No new draft store exists.
+
+Synthetic, isolated-component Chromium checks compared the previous panel with
+the pilot at 1920, 1440, 1024, 390 and 320px widths. The Score button's bottom
+moved from approximately 1861 to 569 document pixels at desktop widths, and from
+3211 to 677 at 320px. No page-level horizontal overflow appeared in those checks.
+Input and decision evidence share columns at wide widths and stack on phones.
+Browser Back retained the synthetic draft; switching to Integrations exposed
+source controls. These are component geometry and interaction observations,
+not human task timings or certification of the complete application shell.
+
+Rendered regressions cover scoring success, abstention and failure; setup and
+training gates; source-save failure; legacy host routing; invalid task recovery;
+and a scoring result arriving while another task is selected without duplicate
+subscriptions. The same explicit API actions and adoption criteria remain in
+place. The pilot provides a composition example, not a new universal component.
diff --git a/docs/features/decision-classifiers.md b/docs/features/decision-classifiers.md
index 5f87f4acd8..e0d8afb82c 100644
--- a/docs/features/decision-classifiers.md
+++ b/docs/features/decision-classifiers.md
@@ -12,6 +12,13 @@ switches, per-source policies and agreement counters. Its stored feature ID,
API endpoints and defaults are unchanged. Disabling Jev integrations does not
disable its explicit manual experiments. No migration is necessary.
+Jev opens **Try a decision**, with input and evidence alongside each other on
+wide screens. **Integrations**, **Results**, **Training**, and **Setup** have
+shareable URLs under `/models/decision-classifiers/jev/`. Local view switches
+retain drafts, the last score and active work; reloading does not persist text
+drafts. Legacy `/models/llms/jev/:taskView` links redirect to the corresponding
+view. Installation, scoring, training and adoption still require explicit actions.
+
## Laya-MLX
`/models/decision-classifiers/laya-mlx` offers native Apple Silicon experiments
diff --git a/server/lib/navManifest.js b/server/lib/navManifest.js
index ef8354eb22..b67c507cde 100644
--- a/server/lib/navManifest.js
+++ b/server/lib/navManifest.js
@@ -327,6 +327,11 @@ const RAW_NAV_COMMANDS = [
{ id: 'nav.settings.local-llm', path: '/models/llms', label: 'Model Library', section: 'Models', tabId: 'llms', navGroup: 'Library', previousPaths: ['/settings/local-llm'], aliases: ['local-llm', 'local-llms', 'llms', 'models-llms', 'ollama', 'lm-studio', 'lmstudio'], keywords: ['ollama', 'lm studio', 'local model', 'local llm', 'gguf', 'pull model', 'install model', 'migrate', 'switch backend', 'llama.cpp'] },
{ id: 'nav.models.llms.abuse', path: '/models/llms/abuse', label: 'Abuse Guard', section: 'Models', tabId: 'abuse', navGroup: 'Policies', aliases: ['abuse-guard', 'model-abuse', 'model-abuse-guard', 'prompt-guard', 'prompt guard'], keywords: ['classifier', 'prompt injection', 'security scan', 'llama prompt guard', 'install guard'] },
{ id: 'nav.models.llms.jev', path: '/models/decision-classifiers/jev', label: 'Jev', section: 'Models', previousPaths: ['/models/llms/jev'], aliases: ['jev', 'openjev', 'entailment', 'nli', 'decision-scorer'], keywords: ['entailment', 'nli', 'closed set', 'abstain', 'margin', 'scorer', 'decision', 'install jev'] },
+ { id: 'nav.models.jev.try', path: '/models/decision-classifiers/jev/try', label: 'Jev Try a decision', section: 'Models', aliases: ['jev-try'], keywords: ['jev', 'try'] },
+ { id: 'nav.models.jev.integrations', path: '/models/decision-classifiers/jev/integrations', label: 'Jev Integrations', section: 'Models', aliases: ['jev-integrations'], keywords: ['jev', 'integrations'] },
+ { id: 'nav.models.jev.results', path: '/models/decision-classifiers/jev/results', label: 'Jev Results', section: 'Models', aliases: ['jev-results'], keywords: ['jev', 'results'] },
+ { id: 'nav.models.jev.training', path: '/models/decision-classifiers/jev/training', label: 'Jev Training', section: 'Models', aliases: ['jev-training'], keywords: ['jev', 'training'] },
+ { id: 'nav.models.jev.setup', path: '/models/decision-classifiers/jev/setup', label: 'Jev Setup', section: 'Models', aliases: ['jev-setup'], keywords: ['jev', 'setup'] },
// Split out of the LLMs page (#7414): managing the SERVERS that run models is
// a different job from browsing the weights they serve, and it was the LLMs
// default view, not a drill-down — so it gets a sibling tab rather than a