token-harness 0.1.26 → 0.1.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/token-harness.mjs CHANGED
@@ -9862,7 +9862,7 @@ var TOOL_VERSION;
9862
9862
  var init_version2 = __esm({
9863
9863
  "apps/cli/dist/src/version.js"() {
9864
9864
  "use strict";
9865
- TOOL_VERSION = "0.1.26";
9865
+ TOOL_VERSION = "0.1.27";
9866
9866
  }
9867
9867
  });
9868
9868
 
@@ -39125,8 +39125,8 @@ var init_guided_product_client = __esm({
39125
39125
  const count = value => new Intl.NumberFormat(undefined, { maximumFractionDigits: 1 }).format(value);
39126
39126
  const date = value => value ? new Date(value).toLocaleString() : 'not recorded';
39127
39127
  const VIEWS = {
39128
- dashboard: ['Overview', 'Your coding agents, optimization stack, health and measured results in one place.'],
39129
- results: ['Results', 'Measured evidence by optimizer, routing and coding app.'],
39128
+ dashboard: ['Overview', 'Your setup, results and next steps.'],
39129
+ results: ['Results', 'See what changed and the evidence behind it.'],
39130
39130
  };
39131
39131
  const TOOL_INFO = {
39132
39132
  rtk: {
@@ -39229,7 +39229,10 @@ var init_guided_product_client = __esm({
39229
39229
  $('view-title').textContent = VIEWS[view][0];
39230
39230
  $('view-description').textContent = VIEWS[view][1];
39231
39231
  if (view === 'results') loadActivity();
39232
- if (focus) $('tab-' + view).focus();
39232
+ if (focus) {
39233
+ $('tab-' + view).focus();
39234
+ $('main').scrollIntoView({ block: 'start' });
39235
+ }
39233
39236
  }
39234
39237
 
39235
39238
  function navigateButton(label, view, cls = 'secondary') {
@@ -39432,7 +39435,7 @@ var init_guided_product_client = __esm({
39432
39435
  const quality = current?.value?.quality;
39433
39436
  if (quality?.state === 'regressed') return { value: 'Regression detected', detail: 'Savings claims are blocked until quality is recovered.', cls: 'warn' };
39434
39437
  if (quality?.state === 'preserved') return { value: 'Preserved', detail: count(quality.pairs) + ' paired benchmark(s) support this result.', cls: 'good' };
39435
- return { value: 'Not measured yet', detail: 'Quality is never inferred from token savings alone.', cls: '' };
39438
+ return { value: 'Not measured yet', detail: 'Quality needs paired benchmarks; output savings alone are not proof.', cls: '' };
39436
39439
  }
39437
39440
 
39438
39441
  function allowanceSummary() {
@@ -39444,7 +39447,7 @@ var init_guided_product_client = __esm({
39444
39447
  if (five?.state === 'measured' && five.savedPercent !== null) parts.push('5h ' + count(five.savedPercent) + '%');
39445
39448
  if (weekly?.state === 'measured' && weekly.savedPercent !== null) parts.push('7d ' + count(weekly.savedPercent) + '%');
39446
39449
  if (parts.length) return { value: parts.join(' · '), detail: 'Based only on authoritative paired allowance evidence.', cls: 'good' };
39447
- return { value: 'Not measured yet', detail: 'Plan savings appear only when before/after allowance evidence exists.', cls: '' };
39450
+ return { value: 'Not measured yet', detail: 'Needs paired before/after allowance readings.', cls: '' };
39448
39451
  }
39449
39452
 
39450
39453
  function metricCard(title, value, detail, cls = '') {
@@ -39470,7 +39473,7 @@ var init_guided_product_client = __esm({
39470
39473
  label: 'Needs attention',
39471
39474
  cls: 'warn',
39472
39475
  title: 'Measured quality needs attention',
39473
- detail: 'A paired benchmark favored the baseline. Token Harness is not crediting the affected savings.',
39476
+ detail: 'A paired benchmark favored the baseline. Affected savings are not credited.',
39474
39477
  action: 'results',
39475
39478
  };
39476
39479
  const routingAttention = agents.filter(agent => agent.promptRouting?.needsRepair ||
@@ -39480,7 +39483,8 @@ var init_guided_product_client = __esm({
39480
39483
  label: 'Routing action required',
39481
39484
  cls: 'warn',
39482
39485
  title: 'Automatic routing needs attention',
39483
- detail: routingAttention.map(agent => agent.name + ': ' + agent.promptRouting.detail).join(' '),
39486
+ detail: routingAttention.map(agent => agent.name + ': ' + (agent.promptRouting.detail ||
39487
+ (agent.promptRouting.enablement === 'untrusted' ? 'Trust the hook in /hooks, then submit a prompt.' : 'Review the hook status in the coding app.'))).join(' '),
39484
39488
  action: 'routing',
39485
39489
  };
39486
39490
  if (stack?.state === 'attention')
@@ -39495,8 +39499,8 @@ var init_guided_product_client = __esm({
39495
39499
  return {
39496
39500
  label: 'Setup available',
39497
39501
  cls: 'warn',
39498
- title: 'Your optimization stack has available setup options',
39499
- detail: 'Choose an optimizer and the coding apps to set it up for. Token Harness shows measured results separately from detected setup.',
39502
+ title: 'Connect your optimization stack',
39503
+ detail: 'Review the recommended optimizers for your coding apps.',
39500
39504
  action: 'configure',
39501
39505
  };
39502
39506
  const unavailable = baselineUnavailableAgents();
@@ -39505,7 +39509,7 @@ var init_guided_product_client = __esm({
39505
39509
  label: 'Setup unavailable',
39506
39510
  cls: '',
39507
39511
  title: 'No automatic optimizer setup is currently available',
39508
- detail: 'The installed providers do not currently expose a compatible managed connection for these coding agents. This is a capability limitation, not unfinished setup.',
39512
+ detail: 'The installed optimizers do not offer a compatible managed connection for these apps.',
39509
39513
  action: 'none',
39510
39514
  };
39511
39515
  if (!(current?.savings?.rows || []).length)
@@ -39513,14 +39517,14 @@ var init_guided_product_client = __esm({
39513
39517
  label: 'Setup detected',
39514
39518
  cls: 'good',
39515
39519
  title: 'Recommended setup is complete',
39516
- detail: 'Setup has been detected. This does not prove an optimizer ran or recorded a result; check the Results page for evidence linked to each agent.',
39520
+ detail: 'Use your coding apps normally. Results will show recorded activity; setup alone is not runtime proof.',
39517
39521
  action: 'results',
39518
39522
  };
39519
39523
  return {
39520
39524
  label: 'Ready',
39521
39525
  cls: 'good',
39522
39526
  title: 'Your setup has been checked',
39523
- detail: 'No setup action is required. The summary below shows which results Token Harness has actually recorded.',
39527
+ detail: 'No setup action required. Open Results to inspect recorded changes.',
39524
39528
  action: 'results',
39525
39529
  };
39526
39530
  }
@@ -39543,9 +39547,12 @@ var init_guided_product_client = __esm({
39543
39547
  if (assessment.action === 'verify') {
39544
39548
  actions.append(actionButton('Re-check health', () => readOnlyOperation('verify')));
39545
39549
  } else if (assessment.action === 'routing') {
39546
- actions.append(actionButton('Review routing', () => $('coding-agents').scrollIntoView({ block: 'start', behavior: 'smooth' })));
39550
+ actions.append(actionButton('Review routing', () => $('coding-agents').scrollIntoView({ block: 'start' })));
39547
39551
  } else if (assessment.action === 'results') {
39548
- actions.append(navigateButton('View detailed results', 'results'));
39552
+ if (current?.value?.quality?.state === 'regressed')
39553
+ actions.append(navigateButton('Review quality evidence', 'results', ''));
39554
+ } else if (assessment.action === 'configure') {
39555
+ actions.append(actionButton('Review recommended setup', () => reviewSetup()));
39549
39556
  }
39550
39557
  if (actions.children.length) main.append(actions);
39551
39558
  $('dashboard-status').append(main, pill(assessment.label, assessment.cls));
@@ -39555,10 +39562,9 @@ var init_guided_product_client = __esm({
39555
39562
  const quality = qualitySummary();
39556
39563
  $('dashboard-metrics').replaceChildren(
39557
39564
  reduction
39558
- ? metricCard('Measured output', reduction.impact.headline, reduction.provider + ' · ' + reduction.measurement, 'positive')
39559
- : metricCard('Measured output', 'No result yet', 'Missing measurements are not reported as zero savings.'),
39565
+ ? metricCard('Recorded output', reduction.impact.headline, reduction.provider + ' · ' + reduction.measurement + ' · changed outputs only', 'positive')
39566
+ : metricCard('Recorded output', 'No result yet', 'Use a connected app to start recording results.'),
39560
39567
  metricCard('5h / 7d allowance', allowance.value, allowance.detail, allowance.cls),
39561
- metricCard('API cost', 'Not measured yet', 'Requires billed-token evidence and a verified price basis.'),
39562
39568
  metricCard('Quality', quality.value, quality.detail, quality.cls),
39563
39569
  );
39564
39570
  }
@@ -39639,7 +39645,7 @@ var init_guided_product_client = __esm({
39639
39645
  ' can be set up from the Optimization stack below.'
39640
39646
  : baseline.state === 'unavailable'
39641
39647
  ? 'No managed baseline connection is currently available for this agent.'
39642
- : 'This card shows detected setup. It does not confirm that an optimizer ran or recorded results.';
39648
+ : 'Optimizer setup detected. Recorded activity appears in Results.';
39643
39649
  card.append(head, node('p', detail));
39644
39650
  card.append(
39645
39651
  node(
@@ -40027,7 +40033,7 @@ var init_guided_product_client = __esm({
40027
40033
  const summaryText = node('div');
40028
40034
  summaryText.append(
40029
40035
  node('strong', ids.length + ' optimizer' + (ids.length === 1 ? '' : 's') + ' · ' + agents.length + ' coding agent' + (agents.length === 1 ? '' : 's')),
40030
- node('p', 'This matrix shows where setup was detected, not proof that an optimizer ran. Measured results are shown separately on the Results page.', 'caption'),
40036
+ node('p', 'RTK + HarnessTrim are the recommended baseline. Other optimizers are optional.', 'caption'),
40031
40037
  );
40032
40038
  summary.append(summaryText);
40033
40039
  const baselineActionable = ['rtk', 'harnesstrim'].some(id =>
@@ -40063,7 +40069,7 @@ var init_guided_product_client = __esm({
40063
40069
  const target = setupTarget(agent.id, id);
40064
40070
  const state = connectionPresentation(target);
40065
40071
  const cell = node('div', undefined, 'connection-cell');
40066
- cell.append(pill(state.label, state.cls));
40072
+ cell.append(node('span', agent.name, 'connection-app-label'), pill(state.label, state.cls));
40067
40073
  row.append(cell);
40068
40074
  actionable ||= target?.state === 'actionable';
40069
40075
  }
@@ -40082,7 +40088,7 @@ var init_guided_product_client = __esm({
40082
40088
  if (component?.managedByTokenHarness || component?.configured) {
40083
40089
  const remove = actionButton('Remove managed setup', () => {
40084
40090
  window.tokenHarnessReviewRemoval?.(id, info.name);
40085
- }, 'secondary');
40091
+ }, 'text-button');
40086
40092
  remove.disabled = busy || typeof window.tokenHarnessReviewRemoval !== 'function';
40087
40093
  action.append(remove);
40088
40094
  }
@@ -40435,7 +40441,7 @@ var init_guided_product_client = __esm({
40435
40441
  'p',
40436
40442
  current?.stack?.state === 'attention'
40437
40443
  ? 'Something changed or could not be verified. Re-check the configured integrations for details.'
40438
- : 'Setup is already complete. Re-check only when troubleshooting or after external changes.',
40444
+ : 'Re-check integrations after external changes or when troubleshooting.',
40439
40445
  'caption',
40440
40446
  ),
40441
40447
  );
@@ -40459,7 +40465,7 @@ var init_guided_product_client = __esm({
40459
40465
  'p',
40460
40466
  available.length
40461
40467
  ? available.map(component => (TOOL_INFO[component.providerId]?.name || component.providerId) + ' has an update ready.').join(' ')
40462
- : 'Checks Token Harness and installed optimizer versions. If an update is available, install it from the same dialog; restart this app after updating Token Harness.',
40468
+ : 'Check available versions and review updates before installing.',
40463
40469
  'caption',
40464
40470
  ),
40465
40471
  );
@@ -40489,36 +40495,76 @@ var init_guided_product_client = __esm({
40489
40495
  renderMaintenance();
40490
40496
  }
40491
40497
 
40492
- function addEvidenceRow(body, type, name, scope, summary, amount, details) {
40493
- const row = node('tr');
40498
+ function addEvidenceRow(body, type, name, scope, signals, amount, sections) {
40499
+ const row = node('li', undefined, 'evidence-item');
40494
40500
  row.dataset.type = type;
40495
40501
  row.dataset.name = name.toLocaleLowerCase();
40496
- row.dataset.search = [type, name, scope, summary].join(' ').toLocaleLowerCase();
40497
40502
  row.dataset.amount = String(amount || 0);
40498
- const systemCell = node('th');
40499
- systemCell.scope = 'row';
40500
- systemCell.append(node('strong', name), node('span', type[0].toUpperCase() + type.slice(1), 'caption'));
40501
- row.append(systemCell, node('td', scope), node('td', summary));
40502
- const detailCell = node('td');
40503
- const disclosure = node('details');
40504
- disclosure.append(node('summary', 'Details'));
40505
- for (const detail of details) disclosure.append(node('p', detail, 'caption'));
40506
- detailCell.append(disclosure);
40507
- row.append(detailCell);
40503
+ const disclosure = node('details', undefined, 'evidence-disclosure');
40504
+ disclosure.dataset.key = type + ':' + name;
40505
+ const summary = node('summary', undefined, 'evidence-summary');
40506
+ const identity = node('span', undefined, 'evidence-identity');
40507
+ const types = { optimizer: 'Optimizer', routing: 'Routing', harness: 'Coding app', candidate: 'Experiment' };
40508
+ identity.append(node('span', types[type], 'evidence-kind'), node('strong', name), node('span', scope, 'caption'));
40509
+ const results = node('span', undefined, 'evidence-signals');
40510
+ for (const signal of signals) {
40511
+ const result = node('span', undefined, 'evidence-signal ' + (signal.tone || ''));
40512
+ result.append(node('strong', signal.value), node('span', signal.label, 'caption'));
40513
+ results.append(result);
40514
+ }
40515
+ const cue = node('span', 'Details', 'evidence-cue');
40516
+ const chevron = node('span', '›', 'evidence-chevron');
40517
+ chevron.setAttribute('aria-hidden', 'true');
40518
+ cue.append(chevron);
40519
+ summary.append(identity, results, cue);
40520
+ const detailBody = node('div', undefined, 'evidence-detail-body');
40521
+ detailBody.append(...sections);
40522
+ disclosure.append(summary, detailBody);
40523
+ row.append(disclosure);
40524
+ // Search includes provenance, so a class/unit or linked app can be found while collapsed.
40525
+ row.dataset.search = [type, types[type], name, scope, row.textContent].join(' ').toLocaleLowerCase();
40508
40526
  body.append(row);
40509
40527
  return row;
40510
40528
  }
40511
40529
 
40512
- function optimizerEvidenceDetail(row) {
40513
- const unit = row.unit ? ' ' + row.unit : '';
40514
- const change = row.before !== null && row.before !== undefined && row.after !== null && row.after !== undefined
40515
- ? count(row.before) + ' → ' + count(row.after) + unit
40516
- : count(row.saved) + unit;
40517
- return [
40518
- row.impact?.detail || 'Recorded optimizer evidence.',
40519
- 'Recorded change: ' + change,
40520
- count(row.operations) + ' operation(s)' + (row.agents?.length ? ' · ' + row.agents.join(', ') : ' · no harness attribution'),
40521
- ];
40530
+ function evidenceSection(title, facts = [], note = '') {
40531
+ const section = node('section', undefined, 'evidence-section');
40532
+ section.append(node('h3', title));
40533
+ if (facts.length) {
40534
+ const list = node('dl', undefined, 'evidence-fact-grid');
40535
+ for (const [label, value] of facts) {
40536
+ const fact = node('div');
40537
+ fact.append(node('dt', label), node('dd', value));
40538
+ list.append(fact);
40539
+ }
40540
+ section.append(list);
40541
+ }
40542
+ if (note) section.append(node('p', note, 'caption'));
40543
+ return section;
40544
+ }
40545
+
40546
+ function optimizerSignal(row, includeProvider = false) {
40547
+ const impact = row.impact;
40548
+ const value = impact && impact.kind !== 'unavailable'
40549
+ ? impact.headline
40550
+ : count(Math.abs(row.saved)) + ' ' + row.unit + (row.saved < 0 ? ' added' : row.saved > 0 ? ' saved' : ' net change');
40551
+ return {
40552
+ value,
40553
+ label: (includeProvider ? row.provider + ' · ' : '') + row.measurement + ' · ' + row.unit,
40554
+ tone: impact?.kind === 'growth' ? 'warn' : impact?.kind === 'reduction' ? 'good' : '',
40555
+ };
40556
+ }
40557
+
40558
+ function optimizerEvidenceDetail(row, includeProvider = false) {
40559
+ const volume = value => value === null || value === undefined ? 'Not recorded' : count(value) + ' ' + row.unit;
40560
+ return evidenceSection((includeProvider ? row.provider + ' · ' : '') + row.measurement + ' · ' + row.unit, [
40561
+ ['Before', volume(row.before)],
40562
+ ['After', volume(row.after)],
40563
+ [row.saved < 0 ? 'Added' : 'Saved', volume(Math.abs(row.saved))],
40564
+ ['Changed outputs', count(row.operations)],
40565
+ ['Recorded app', row.agents?.length ? row.agents.join(', ') : 'Not attributed'],
40566
+ ], (row.impact?.detail || 'A comparable before/after pair is needed to report a percentage.') +
40567
+ (!row.agents?.length ? ' These records do not identify which coding app ran the command.' : ''));
40522
40568
  }
40523
40569
 
40524
40570
  function routingDetails(agent) {
@@ -40532,16 +40578,18 @@ var init_guided_product_client = __esm({
40532
40578
  else if (routing.enablement === 'enabled' || (!routing.enablement && routing.state === 'managed')) lines.push('Configured; waiting for the first runtime callback after a prompt.');
40533
40579
  else if (routing.state === 'external') lines.push('Routing is managed elsewhere; Token Harness leaves it unchanged.');
40534
40580
  else lines.push('Automatic routing is not enabled for this coding app.');
40535
- if (Number.isFinite(routing.promptSubmissions)) lines.push('Prompt callbacks: ' + count(routing.promptSubmissions));
40536
- if (Number.isFinite(routing.subagentsStarted)) lines.push('Subagents started: ' + count(routing.subagentsStarted));
40537
- if (Number.isFinite(routing.subagentsStopped)) lines.push('Subagents stopped: ' + count(routing.subagentsStopped));
40538
- if (routing.reportedModels?.length) lines.push('Reported models: ' + routing.reportedModels.join(', '));
40539
- if (routing.lastObservedAt) lines.push('Last callback: ' + date(routing.lastObservedAt));
40540
- return lines;
40581
+ const facts = [['Verification', tier === 'runtime-observed' ? 'Runtime callback observed' : tier === 'config-only' ? 'Configuration only' : 'Not verified']];
40582
+ if (Number.isFinite(routing.promptSubmissions)) facts.push(['Prompt callbacks', count(routing.promptSubmissions)]);
40583
+ if (Number.isFinite(routing.subagentsStarted)) facts.push(['Subagents started', count(routing.subagentsStarted)]);
40584
+ if (Number.isFinite(routing.subagentsStopped)) facts.push(['Subagents stopped', count(routing.subagentsStopped)]);
40585
+ if (routing.reportedModels?.length) facts.push(['Reported models', routing.reportedModels.join(', ')]);
40586
+ if (routing.lastObservedAt) facts.push(['Last callback', date(routing.lastObservedAt)]);
40587
+ return evidenceSection(agent.name + ' · routing activity', facts, lines[0]);
40541
40588
  }
40542
40589
 
40543
40590
  function renderEvidence() {
40544
40591
  const body = $('result-evidence');
40592
+ const openKeys = new Set([...body.querySelectorAll('details[open]')].map(item => item.dataset.key));
40545
40593
  body.replaceChildren();
40546
40594
  const savings = current?.savings?.rows || [];
40547
40595
  for (const id of optimizerIds()) {
@@ -40549,58 +40597,69 @@ var init_guided_product_client = __esm({
40549
40597
  const component = managedComponent(id);
40550
40598
  const measured = savings.filter(row => row.providerId === id);
40551
40599
  const scope = component?.configuredHarnesses?.length
40552
- ? component.configuredHarnesses.map(agentName).join(', ')
40600
+ ? 'Setup: ' + component.configuredHarnesses.map(agentName).join(', ')
40553
40601
  : 'No setup detected';
40554
- const summary = measured.length
40555
- ? measured.map(row => row.measurement + ' · ' + count(row.saved) + (row.unit ? ' ' + row.unit : '')).join(' · ')
40556
- : 'No measured evidence';
40557
- const details = measured.length
40558
- ? measured.flatMap(optimizerEvidenceDetail)
40559
- : [component?.configured ? 'Setup is detected, but no result was recorded for this period.' : 'No result was recorded for this optimizer in this period.'];
40560
- addEvidenceRow(body, 'optimizer', info.name, scope, summary, measured.length, details);
40602
+ const signals = measured.length
40603
+ ? measured.map(row => optimizerSignal(row))
40604
+ : [{ value: 'No results yet', label: 'No output recorded for this period' }];
40605
+ const sections = measured.map(row => optimizerEvidenceDetail(row));
40606
+ if (!measured.length) {
40607
+ const nextStep = evidenceSection('Start recording results', [], component?.configured
40608
+ ? 'Use a connected coding app normally, then Refresh. Detected setup alone does not prove that the optimizer ran.'
40609
+ : 'Review this optimizer in Overview to see available connections.');
40610
+ nextStep.append(navigateButton('Open Overview', 'dashboard'));
40611
+ sections.push(nextStep);
40612
+ }
40613
+ addEvidenceRow(body, 'optimizer', info.name, scope, signals, measured.length, sections);
40561
40614
  }
40562
40615
 
40563
40616
  const routing = current?.value?.routing;
40564
40617
  const routingAgents = activeAgents();
40565
- const routingDetailsList = routingAgents.flatMap(agent => [agent.name + ':', ...routingDetails(agent)]);
40566
- if (routing?.state === 'measured' || routing?.pairs > 0) {
40567
- routingDetailsList.push((routing.pairs ? count(routing.pairs) + ' quality-passed routed pair(s).' : ''));
40568
- if (routing.savedLocalTokens !== null && routing.savedLocalTokens !== undefined)
40569
- routingDetailsList.push(routing.savedLocalTokens >= 0
40570
- ? count(routing.savedLocalTokens) + ' local tokens saved · end-to-end local usage'
40571
- : count(Math.abs(routing.savedLocalTokens)) + ' local tokens added · end-to-end local usage');
40572
- if (routing.allowance5h?.savedPercent !== null && routing.allowance5h?.savedPercent !== undefined)
40573
- routingDetailsList.push('5h allowance change: ' + count(routing.allowance5h.savedPercent) + '%');
40574
- if (routing.allowance7d?.savedPercent !== null && routing.allowance7d?.savedPercent !== undefined)
40575
- routingDetailsList.push('7d allowance change: ' + count(routing.allowance7d.savedPercent) + '%');
40576
- }
40577
- const routingSummary = routing?.state === 'blocked-by-quality'
40578
- ? 'Not credited · quality gate'
40579
- : routing?.savedLocalTokens !== null && routing?.savedLocalTokens !== undefined
40580
- ? count(routing.savedLocalTokens) + ' local tokens · end-to-end paired evidence'
40581
- : routing?.state === 'measured' ? 'Allowance evidence measured' : 'Not measured yet';
40582
- addEvidenceRow(body, 'routing', 'Automatic prompt routing', routingAgents.map(agent => agent.name).join(', ') || 'No coding app detected', routingSummary, routing?.pairs || 0, routingDetailsList.length ? routingDetailsList : ['No routing measurement has been recorded.']);
40618
+ const blocked = routing?.state === 'blocked-by-quality';
40619
+ const routeSignals = [];
40620
+ if (blocked) routeSignals.push({ value: 'Not credited', label: 'Quality gate did not pass', tone: 'warn' });
40621
+ else {
40622
+ if (routing?.savedLocalTokens !== null && routing?.savedLocalTokens !== undefined)
40623
+ routeSignals.push({
40624
+ value: count(Math.abs(routing.savedLocalTokens)) + (routing.savedLocalTokens < 0 ? ' tokens added' : ' tokens saved'),
40625
+ label: 'Paired end-to-end local usage',
40626
+ tone: routing.savedLocalTokens < 0 ? 'warn' : routing.savedLocalTokens > 0 ? 'good' : '',
40627
+ });
40628
+ for (const [key, label] of [['allowance5h', '5h allowance'], ['allowance7d', '7d allowance']]) {
40629
+ const evidence = routing?.[key];
40630
+ if (evidence?.state === 'measured' && evidence.savedPercent !== null && evidence.savedPercent !== undefined)
40631
+ routeSignals.push({ value: count(evidence.savedPercent) + '%', label: label + ' saved · paired evidence', tone: evidence.savedPercent < 0 ? 'warn' : 'good' });
40632
+ }
40633
+ if (!routeSignals.length) routeSignals.push({ value: 'Not measured yet', label: 'Needs paired, quality-passed runs' });
40634
+ }
40635
+ const routingSections = [evidenceSection('Savings verification', [['Quality-passed pairs', count(routing?.pairs || 0)]],
40636
+ blocked ? 'A quality regression blocks the savings claim.' : 'Callback activity proves the hook ran. Savings require paired runs with a passing quality gate.')];
40637
+ for (const agent of routingAgents)
40638
+ routingSections.push(routingDetails(agent));
40639
+ addEvidenceRow(body, 'routing', 'Automatic prompt routing', routingAgents.map(agent => agent.name).join(', ') || 'No coding app detected', routeSignals, routing?.pairs || 0, routingSections);
40583
40640
 
40584
40641
  for (const agent of routingAgents) {
40585
40642
  const linked = savings.filter(row => row.harnesses?.includes(agent.id));
40586
40643
  const configured = configuredProviders().filter(component => component.configuredHarnesses?.includes(agent.id)).map(component => optimizerInfo(component.providerId).name);
40587
- const details = [
40588
- 'Detected optimizer setup: ' + (configured.join(', ') || 'none'),
40589
- ...routingDetails(agent),
40590
- ...(linked.length ? linked.flatMap(optimizerEvidenceDetail) : ['No optimizer measurement is directly linked to this coding app.']),
40591
- ];
40592
- addEvidenceRow(body, 'harness', agent.name, agent.version ? 'v' + agent.version : 'Version unavailable', linked.length ? linked.map(row => row.provider + ': ' + row.measurement + ' · ' + count(row.saved) + (row.unit ? ' ' + row.unit : '')).join(' · ') : 'No linked measured evidence', linked.length, details);
40644
+ const sections = [evidenceSection('App attribution', [['Detected setup', configured.join(', ') || 'None']],
40645
+ linked.length ? 'These are the same optimizer records shown above, linked to this app. They are not additional savings.' : 'No optimizer record identifies this app for the selected period. Unattributed records stay under their optimizer.')];
40646
+ sections.push(...linked.map(row => optimizerEvidenceDetail(row, true)));
40647
+ addEvidenceRow(body, 'harness', agent.name, agent.version ? 'v' + agent.version : 'Version unavailable',
40648
+ linked.length ? linked.map(row => optimizerSignal(row, true)) : [{ value: 'No linked results', label: 'No output attributed to this app' }], linked.length, sections);
40593
40649
  }
40594
40650
 
40595
40651
  for (const item of current?.value?.candidates || []) {
40596
40652
  if (!(item.pairs > 0)) continue;
40597
40653
  const candidate = (current?.optimizationCandidates || []).find(entry => entry.id === item.candidateId);
40598
40654
  const name = candidate?.name || item.candidateId;
40599
- addEvidenceRow(body, 'candidate', name, 'Experimental', count(item.pairs) + ' paired result(s)', item.pairs, [
40600
- count(item.optimizedBetter || 0) + ' optimized better · ' + count(item.baselineBetter || 0) + ' baseline better.',
40601
- 'Evaluation evidence only; this does not automatically promote or activate the candidate.',
40655
+ addEvidenceRow(body, 'candidate', name, 'Experimental', [{ value: count(item.pairs) + ' paired results', label: 'Evaluation evidence' }], item.pairs, [
40656
+ evidenceSection('Paired evaluation', [
40657
+ ['Optimized better', count(item.optimizedBetter || 0)],
40658
+ ['Baseline better', count(item.baselineBetter || 0)],
40659
+ ], 'Evaluation does not automatically promote or activate this optimizer.'),
40602
40660
  ]);
40603
40661
  }
40662
+ for (const details of body.querySelectorAll('details')) details.open = openKeys.has(details.dataset.key);
40604
40663
  applyEvidenceFilters();
40605
40664
  }
40606
40665
 
@@ -40610,18 +40669,23 @@ var init_guided_product_client = __esm({
40610
40669
  const filter = $('evidence-filter').value.trim().toLocaleLowerCase();
40611
40670
  const type = $('evidence-type').value;
40612
40671
  const sort = $('evidence-sort').value;
40613
- const rows = [...body.querySelectorAll('tr')];
40672
+ const rows = [...body.children].filter(row => row.dataset.type);
40673
+ const sourceOrder = { optimizer: 0, routing: 1, harness: 2, candidate: 3 };
40614
40674
  rows.sort((a, b) => sort === 'evidence'
40615
- ? Number(b.dataset.amount) - Number(a.dataset.amount) || a.dataset.name.localeCompare(b.dataset.name)
40675
+ ? Number(Number(b.dataset.amount) > 0) - Number(Number(a.dataset.amount) > 0)
40676
+ || sourceOrder[a.dataset.type] - sourceOrder[b.dataset.type]
40677
+ || Number(b.dataset.amount) - Number(a.dataset.amount) || a.dataset.name.localeCompare(b.dataset.name)
40616
40678
  : sort === 'type'
40617
40679
  ? a.dataset.type.localeCompare(b.dataset.type) || a.dataset.name.localeCompare(b.dataset.name)
40618
40680
  : a.dataset.name.localeCompare(b.dataset.name));
40619
40681
  for (const row of rows) {
40620
- const shown = (type === 'all' || row.dataset.type === type) && (!filter || row.dataset.search.includes(filter));
40621
- row.hidden = !shown;
40682
+ row.hidden = !((type === 'all' || row.dataset.type === type) && (!filter || row.dataset.search.includes(filter)));
40622
40683
  body.append(row);
40623
40684
  }
40624
- $('evidence-empty').hidden = rows.some(row => !row.hidden);
40685
+ const visible = rows.filter(row => !row.hidden).length;
40686
+ $('evidence-count').textContent = visible + ' of ' + rows.length + ' sources';
40687
+ $('evidence-empty').hidden = visible > 0;
40688
+ $('evidence-reset').hidden = !filter && type === 'all';
40625
40689
  }
40626
40690
 
40627
40691
  function measurementHelp() {
@@ -40640,8 +40704,11 @@ var init_guided_product_client = __esm({
40640
40704
  const allowance = allowanceSummary();
40641
40705
  const quality = qualitySummary();
40642
40706
  const savings = current?.savings?.rows || [];
40707
+ const reduction = bestReduction();
40643
40708
  $('result-summary').replaceChildren(
40644
- metricCard('Measured output', savings.length ? count(savings.length) + ' evidence record(s)' : 'No records yet', 'Exact, estimated and other measurement classes remain separate.'),
40709
+ reduction
40710
+ ? metricCard('Recorded output', reduction.impact.headline, reduction.provider + ' · ' + reduction.measurement + ' · changed outputs only', 'positive')
40711
+ : metricCard('Recorded output', savings.length ? count(savings.length) + ' measurement groups' : 'No records yet', savings.length ? 'Open Evidence for each source and unit.' : 'Use a connected app, then Refresh.'),
40645
40712
  metricCard('5h / 7d allowance', allowance.value, allowance.detail, allowance.cls),
40646
40713
  metricCard('Quality', quality.value, quality.detail, quality.cls),
40647
40714
  );
@@ -40649,13 +40716,14 @@ var init_guided_product_client = __esm({
40649
40716
  const routeStatus = routed?.state === 'blocked-by-quality'
40650
40717
  ? 'Not credited'
40651
40718
  : routed?.savedLocalTokens !== null && routed?.savedLocalTokens !== undefined
40652
- ? count(routed.savedLocalTokens) + ' local tokens'
40719
+ ? count(Math.abs(routed.savedLocalTokens)) + (routed.savedLocalTokens < 0 ? ' tokens added' : ' tokens saved')
40653
40720
  : routed?.state === 'measured' ? 'Allowance measured' : 'Not measured yet';
40654
- $('result-summary').append(metricCard('Automatic routing', routeStatus, routed?.pairs ? count(routed.pairs) + ' quality-passed pair(s). Allowance and local tokens are separate.' : 'Routing savings need paired, quality-gated evidence.', routed?.state === 'measured' ? 'positive' : ''));
40721
+ $('result-summary').append(metricCard('Automatic routing', routeStatus, routed?.pairs ? count(routed.pairs) + ' quality-passed pairs · local usage' : 'Needs paired runs with a passing quality gate.', routed?.state === 'blocked-by-quality' || routed?.savedLocalTokens < 0 ? 'warn' : routed?.state === 'measured' ? 'positive' : ''));
40655
40722
  renderEvidence();
40656
40723
  $('results-period-note').textContent = current?.savings?.firstRecordedAt
40657
- ? 'Recorded from ' + date(current.savings.firstRecordedAt) + ' through ' + date(current.savings.lastRecordedAt)
40658
- : 'No recorded result dates for this period.';
40724
+ ? 'All locally recorded projects · ' + new Date(current.savings.firstRecordedAt).toLocaleDateString() + ' – ' + new Date(current.savings.lastRecordedAt).toLocaleDateString()
40725
+ : 'All locally recorded projects · no results for this period.';
40726
+ if (current?.savings?.errors) $('results-period-note').textContent += ' · ' + count(current.savings.errors) + ' records could not be read';
40659
40727
  }
40660
40728
 
40661
40729
  function renderActivity() {
@@ -40791,7 +40859,7 @@ var init_guided_product_client = __esm({
40791
40859
  $('stale-state').textContent = '';
40792
40860
  render();
40793
40861
  await loadActivity();
40794
- setStatus('Checked at ' + new Date(current.generatedAt).toLocaleTimeString() + '. Full checks run again only when you choose Refresh.', false);
40862
+ setStatus('Updated at ' + new Date(current.generatedAt).toLocaleTimeString(), false);
40795
40863
  } catch (error) {
40796
40864
  setError(error.name === 'TimeoutError' ? 'The check took too long. Existing results were kept; choose Refresh to try again.' : error.message);
40797
40865
  setStatus('Check needs attention.', false);
@@ -40838,11 +40906,28 @@ var init_guided_product_client = __esm({
40838
40906
  document.querySelectorAll('[data-view]').forEach(button => {
40839
40907
  button.addEventListener('click', () => selectView(button.dataset.view, true));
40840
40908
  });
40909
+ document.querySelector('.view-tabs').addEventListener('keydown', event => {
40910
+ const views = Object.keys(VIEWS);
40911
+ const index = views.indexOf(selectedView);
40912
+ const next = event.key === 'Home' ? 0 : event.key === 'End' ? views.length - 1
40913
+ : event.key === 'ArrowRight' ? (index + 1) % views.length
40914
+ : event.key === 'ArrowLeft' ? (index + views.length - 1) % views.length : null;
40915
+ if (next === null) return;
40916
+ event.preventDefault();
40917
+ selectView(views[next], true);
40918
+ });
40919
+ $('overview-results').addEventListener('click', () => selectView('results', true));
40841
40920
  $('refresh').addEventListener('click', () => refresh(true));
40842
40921
  $('period').addEventListener('change', changePeriod);
40843
40922
  $('evidence-filter').addEventListener('input', applyEvidenceFilters);
40844
40923
  $('evidence-type').addEventListener('change', applyEvidenceFilters);
40845
40924
  $('evidence-sort').addEventListener('change', applyEvidenceFilters);
40925
+ $('evidence-reset').addEventListener('click', () => {
40926
+ $('evidence-filter').value = '';
40927
+ $('evidence-type').value = 'all';
40928
+ applyEvidenceFilters();
40929
+ $('evidence-filter').focus();
40930
+ });
40846
40931
  $('measurement-help').addEventListener('click', measurementHelp);
40847
40932
  $('theme').addEventListener('change', () => {
40848
40933
  const value = $('theme').value;
@@ -40873,26 +40958,208 @@ var init_guided_product_styles = __esm({
40873
40958
  GUIDE_PRODUCT_CSS = String.raw`
40874
40959
  [hidden]{display:none!important}
40875
40960
  .eyebrow{display:block;color:var(--muted);font-size:.72rem;font-weight:900;letter-spacing:.08em;margin-bottom:.35rem}
40876
- .dashboard-status{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;background:linear-gradient(145deg,var(--panel),var(--panel-soft));border:1px solid var(--line);border-radius:var(--radius);padding:1.35rem;box-shadow:var(--shadow);margin:1rem 0}.dashboard-status h2{margin:.15rem 0 .45rem;font-size:1.35rem}.dashboard-status p{color:var(--muted);margin:.25rem 0 1rem;max-width:720px}
40877
- .dashboard-columns{display:grid;grid-template-columns:minmax(0,1fr) minmax(300px,.55fr);gap:.9rem;margin:1rem 0}.dashboard-columns>.panel h2{margin-top:0}.status-list{display:grid;gap:.15rem}.status-row{display:flex;justify-content:space-between;gap:1rem;align-items:center;padding:.72rem 0;border-bottom:1px solid var(--line)}.status-row:last-child{border-bottom:0}
40878
- .checklist{display:grid;gap:.25rem}.check-row{display:grid;grid-template-columns:28px 1fr;gap:.5rem;padding:.55rem 0}.check-row p{margin:.15rem 0}.check-icon{display:grid;place-items:center;width:24px;height:24px;border:1px solid var(--line);border-radius:999px;color:var(--muted);font-weight:900}.check-icon.done{background:var(--good-soft);border-color:color-mix(in srgb,var(--good) 35%,var(--line));color:var(--good)}
40879
- .setup-intro{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:1rem;align-items:start;background:var(--accent-soft);border:1px solid color-mix(in srgb,var(--accent) 30%,var(--line));border-radius:var(--radius);padding:1rem 1.15rem;margin:1rem 0}.setup-intro h2{margin:.1rem 0 .3rem}.setup-intro p{margin:.2rem 0;color:var(--muted)}
40880
- .setup-step{margin:1.6rem 0}.step-heading{display:grid;grid-template-columns:34px 1fr;gap:.65rem;align-items:start;margin-bottom:.7rem}.step-number{display:grid;place-items:center;width:32px;height:32px;border-radius:9px;background:var(--accent);color:#fff;font-weight:900}.step-heading h2{margin:0}.step-heading p{margin:.2rem 0;color:var(--muted)}
40881
- .connection-overview{display:grid;gap:.75rem}.connection-summary{display:flex;align-items:center;justify-content:space-between;gap:1rem;background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);padding:1rem}.connection-summary p{margin:.15rem 0 0}.connection-scroll{overflow-x:auto;border:1px solid var(--line);border-radius:var(--radius);background:var(--panel)}.connection-table{min-width:max(720px,100%)}.connection-row{display:grid;grid-template-columns:minmax(170px,1.25fr) repeat(var(--connection-columns),minmax(130px,1fr)) minmax(155px,.8fr);align-items:center;gap:.6rem;padding:.72rem .8rem;border-bottom:1px solid var(--line)}.connection-row:last-child{border-bottom:0}.connection-head{background:var(--panel-soft);color:var(--muted);font-size:.8rem}.connection-name{display:grid;gap:.12rem}.connection-cell,.connection-action{min-width:0}.connection-action{display:flex;justify-content:flex-end}.tool-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.8rem}.candidate-comparison-toolbar{grid-column:1/-1;justify-content:flex-end;align-self:start}.tool-card{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);padding:1rem;box-shadow:var(--shadow)}.tool-card.experimental{border-style:dashed}.tool-card.compact{box-shadow:none}.tool-card>p{color:var(--muted);margin:.65rem 0}.tool-head{display:flex;align-items:flex-start;justify-content:space-between;gap:.75rem}.tool-head h3{margin:0}.tool-facts{display:grid;grid-template-columns:auto 1fr;gap:.3rem .75rem;border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:.65rem 0;margin:.65rem 0}.tool-facts span{color:var(--muted);font-size:.8rem}.tool-facts strong{font-size:.85rem}
40882
- .connection-role{max-width:28ch}.setup-choice-list{display:grid;gap:.55rem;margin:.9rem 0}.setup-choice-list h3{margin:.25rem 0 0}.setup-choice{display:grid;grid-template-columns:auto 1fr;align-items:start;gap:.7rem;padding:.8rem;border:1px solid var(--line);border-radius:12px;background:var(--panel);cursor:pointer}.setup-choice:hover{border-color:var(--accent);background:var(--accent-soft)}.setup-choice input{inline-size:1.1rem;block-size:1.1rem;margin:.15rem 0 0;accent-color:var(--accent)}.setup-choice-copy{display:grid;gap:.2rem}.setup-choice-limitation{color:var(--muted)}
40883
- .routing-feature{margin:.8rem 0;padding:.8rem;border:1px solid var(--line);border-radius:12px;background:var(--panel-soft)}.routing-feature .tool-head{align-items:center}.routing-feature p{margin:.55rem 0;color:var(--muted)}
40884
- .managed-action-box{margin-top:.8rem;background:var(--panel-soft);border:1px solid var(--line);border-radius:12px;padding:.85rem}.managed-action-box p{margin:.1rem 0 .65rem}
40885
- .maintenance-list{display:grid;gap:.55rem}.maintenance-row{display:flex;align-items:center;justify-content:space-between;gap:1rem;background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:.8rem}.maintenance-row p{margin:.15rem 0}
40886
- .explain-box{background:var(--panel-soft);border:1px solid var(--line);border-radius:12px;padding:.8rem;margin:.6rem 0}.explain-box p{margin:.25rem 0;color:var(--muted)}.explain-box.warn{background:var(--warn-soft);border-color:color-mix(in srgb,var(--warn) 35%,var(--line))}.explain-box.safe{background:var(--good-soft);border-color:color-mix(in srgb,var(--good) 30%,var(--line))}.operation-progress{margin:.75rem 0;padding:.8rem;border:1px solid var(--line);border-radius:12px}.operation-progress p{margin:.35rem 0 0}
40887
- .choice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.6rem;margin:.8rem 0}.choice-button{display:flex;flex-direction:column;align-items:flex-start;text-align:left;gap:.25rem;background:var(--panel);color:var(--text);border:1px solid var(--line);padding:.8rem}.choice-button:hover:not(:disabled){border-color:var(--accent);background:var(--accent-soft)}.choice-button .caption{font-weight:500}
40888
- .result-signal{display:grid;gap:.2rem;border-top:1px solid var(--line);padding:.65rem 0}.result-signal strong{font-size:1rem}.results-header{display:flex;justify-content:space-between;gap:1rem;align-items:end;margin:1rem 0}.results-header h2{margin:0}.results-header p{margin:.2rem 0;color:var(--muted)}
40889
- .update-notice{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.8rem 1rem;margin:.8rem 0;border:1px solid color-mix(in srgb,var(--accent) 40%,var(--line));border-radius:var(--radius);background:var(--accent-soft)}.update-notice p{margin:.2rem 0 0;color:var(--muted)}
40961
+ .dashboard-status{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;background:linear-gradient(145deg,var(--panel),var(--panel-soft));border:1px solid var(--line);border-radius:var(--radius);padding:1.35rem;box-shadow:var(--shadow);margin:1rem 0}
40962
+ .dashboard-status h2{margin:.15rem 0 .45rem;font-size:1.35rem}
40963
+ .dashboard-status p{color:var(--muted);margin:.25rem 0 1rem;max-width:720px}
40964
+ .dashboard-columns{display:grid;grid-template-columns:minmax(0,1fr) minmax(300px,.55fr);gap:.9rem;margin:1rem 0}
40965
+ .dashboard-columns>.panel h2{margin-top:0}
40966
+ .status-list{display:grid;gap:.15rem}
40967
+ .status-row{display:flex;justify-content:space-between;gap:1rem;align-items:center;padding:.72rem 0;border-bottom:1px solid var(--line)}
40968
+ .status-row:last-child{border-bottom:0}
40969
+ .checklist{display:grid;gap:.25rem}
40970
+ .check-row{display:grid;grid-template-columns:28px 1fr;gap:.5rem;padding:.55rem 0}
40971
+ .check-row p{margin:.15rem 0}
40972
+ .check-icon{display:grid;place-items:center;width:24px;height:24px;border:1px solid var(--line);border-radius:999px;color:var(--muted);font-weight:900}
40973
+ .check-icon.done{background:var(--good-soft);border-color:color-mix(in srgb,var(--good) 35%,var(--line));color:var(--good)}
40974
+ .setup-intro{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:1rem;align-items:start;background:var(--accent-soft);border:1px solid color-mix(in srgb,var(--accent) 30%,var(--line));border-radius:var(--radius);padding:1rem 1.15rem;margin:1rem 0}
40975
+ .setup-intro h2{margin:.1rem 0 .3rem}
40976
+ .setup-intro p{margin:.2rem 0;color:var(--muted)}
40977
+ .setup-step{margin:1.6rem 0}
40978
+ .step-heading{display:grid;grid-template-columns:34px 1fr;gap:.65rem;align-items:start;margin-bottom:.7rem}
40979
+ .step-number{display:grid;place-items:center;width:32px;height:32px;border-radius:9px;background:var(--accent);color:#fff;font-weight:900}
40980
+ .step-heading h2{margin:0}
40981
+ .step-heading p{margin:.2rem 0;color:var(--muted)}
40982
+ .connection-overview{display:grid;gap:.75rem}
40983
+ .connection-summary{display:flex;align-items:center;justify-content:space-between;gap:1rem;background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);padding:1rem}
40984
+ .connection-summary p{margin:.15rem 0 0}
40985
+ .connection-scroll{overflow-x:auto;border:1px solid var(--line);border-radius:var(--radius);background:var(--panel)}
40986
+ .connection-table{min-width:max(720px,100%)}
40987
+ .connection-row{display:grid;grid-template-columns:minmax(170px,1.25fr) repeat(var(--connection-columns),minmax(130px,1fr)) minmax(155px,.8fr);align-items:center;gap:.6rem;padding:.72rem .8rem;border-bottom:1px solid var(--line)}
40988
+ .connection-row:last-child{border-bottom:0}
40989
+ .connection-head{background:var(--panel-soft);color:var(--muted);font-size:.8rem}
40990
+ .connection-name{display:grid;gap:.12rem}
40991
+ .connection-cell,.connection-action{min-width:0}
40992
+ .connection-action{display:flex;justify-content:flex-end}
40993
+ .tool-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.8rem}
40994
+ .candidate-comparison-toolbar{grid-column:1/-1;justify-content:flex-end;align-self:start}
40995
+ .tool-card{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);padding:1rem;box-shadow:var(--shadow)}
40996
+ .tool-card.experimental{border-style:dashed}
40997
+ .tool-card.compact{box-shadow:none}
40998
+ .tool-card>p{color:var(--muted);margin:.65rem 0}
40999
+ .tool-head{display:flex;align-items:flex-start;justify-content:space-between;gap:.75rem}
41000
+ .tool-head h3{margin:0}
41001
+ .tool-facts{display:grid;grid-template-columns:auto 1fr;gap:.3rem .75rem;border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:.65rem 0;margin:.65rem 0}
41002
+ .tool-facts span{color:var(--muted);font-size:.8rem}
41003
+ .tool-facts strong{font-size:.85rem}
41004
+ .connection-role{max-width:28ch}
41005
+ .setup-choice-list{display:grid;gap:.55rem;margin:.9rem 0}
41006
+ .setup-choice-list h3{margin:.25rem 0 0}
41007
+ .setup-choice{display:grid;grid-template-columns:auto 1fr;align-items:start;gap:.7rem;padding:.8rem;border:1px solid var(--line);border-radius:12px;background:var(--panel);cursor:pointer}
41008
+ .setup-choice:hover{border-color:var(--accent);background:var(--accent-soft)}
41009
+ .setup-choice input{inline-size:1.1rem;block-size:1.1rem;margin:.15rem 0 0;accent-color:var(--accent)}
41010
+ .setup-choice-copy{display:grid;gap:.2rem}
41011
+ .setup-choice-limitation{color:var(--muted)}
41012
+ .routing-feature{margin:.8rem 0;padding:.8rem;border:1px solid var(--line);border-radius:12px;background:var(--panel-soft)}
41013
+ .routing-feature .tool-head{align-items:center}
41014
+ .routing-feature p{margin:.55rem 0;color:var(--muted)}
41015
+ .managed-action-box{margin-top:.8rem;background:var(--panel-soft);border:1px solid var(--line);border-radius:12px;padding:.85rem}
41016
+ .managed-action-box p{margin:.1rem 0 .65rem}
41017
+ .maintenance-list{display:grid;gap:.55rem}
41018
+ .maintenance-row{display:flex;align-items:center;justify-content:space-between;gap:1rem;background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:.8rem}
41019
+ .maintenance-row p{margin:.15rem 0}
41020
+ .explain-box{background:var(--panel-soft);border:1px solid var(--line);border-radius:12px;padding:.8rem;margin:.6rem 0}
41021
+ .explain-box p{margin:.25rem 0;color:var(--muted)}
41022
+ .explain-box.warn{background:var(--warn-soft);border-color:color-mix(in srgb,var(--warn) 35%,var(--line))}
41023
+ .explain-box.safe{background:var(--good-soft);border-color:color-mix(in srgb,var(--good) 30%,var(--line))}
41024
+ .operation-progress{margin:.75rem 0;padding:.8rem;border:1px solid var(--line);border-radius:12px}
41025
+ .operation-progress p{margin:.35rem 0 0}
41026
+ .choice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.6rem;margin:.8rem 0}
41027
+ .choice-button{display:flex;flex-direction:column;align-items:flex-start;text-align:left;gap:.25rem;background:var(--panel);color:var(--text);border:1px solid var(--line);padding:.8rem}
41028
+ .choice-button:hover:not(:disabled){border-color:var(--accent);background:var(--accent-soft)}
41029
+ .choice-button .caption{font-weight:500}
41030
+ .result-signal{display:grid;gap:.2rem;border-top:1px solid var(--line);padding:.65rem 0}
41031
+ .result-signal strong{font-size:1rem}
41032
+ .results-header{display:flex;justify-content:space-between;gap:1rem;align-items:end;margin:1rem 0}
41033
+ .results-header h2{margin:0}
41034
+ .results-header p{margin:.2rem 0;color:var(--muted)}
41035
+ .update-notice{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.8rem 1rem;margin:.8rem 0;border:1px solid color-mix(in srgb,var(--accent) 40%,var(--line));border-radius:var(--radius);background:var(--accent-soft)}
41036
+ .update-notice p{margin:.2rem 0 0;color:var(--muted)}
40890
41037
  .inline-actions a.secondary{display:inline-flex;align-items:center;padding:.68rem 1rem;border-radius:10px;text-decoration:none;font-weight:700}
40891
- .evidence-panel{padding:0}.evidence-controls{display:flex;align-items:end;gap:.7rem;flex-wrap:wrap;padding:.8rem;border-bottom:1px solid var(--line)}.evidence-controls label{display:grid;gap:.25rem;color:var(--muted);font-size:.82rem}.evidence-controls input,.evidence-controls select{min-width:150px}.evidence-controls input{min-width:min(260px,70vw)}.evidence-table-scroll{overflow-x:auto}.evidence-table{width:100%;border-collapse:collapse;min-width:760px}.evidence-table th,.evidence-table td{padding:.75rem .85rem;text-align:left;vertical-align:top;border-bottom:1px solid var(--line)}.evidence-table thead{background:var(--panel-soft);color:var(--muted);font-size:.8rem}.evidence-table tbody th{min-width:175px;font-weight:600}.evidence-table tbody th span{display:block;margin-top:.2rem}.evidence-table td:nth-child(2){min-width:150px}.evidence-table td:nth-child(3){min-width:240px}.evidence-table td:last-child{min-width:110px}.evidence-table details summary{cursor:pointer;color:var(--accent);font-weight:700}.evidence-table details p{margin:.45rem 0}.evidence-table tr[hidden]{display:none}.activity-scroll{max-height:24rem;overflow-y:auto;overscroll-behavior:contain}.activity-scroll .activity-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:.75rem;padding:.65rem 0;border-bottom:1px solid var(--line)}
40892
- #modal{width:min(720px,calc(100vw - 2rem));max-height:calc(100vh - 2rem);overflow:auto}#modal-content h3{margin:1rem 0 .4rem}#modal-actions{display:flex;justify-content:flex-end;gap:.5rem;flex-wrap:wrap;margin-top:1rem}
40893
- @media(max-width:900px){.dashboard-columns{grid-template-columns:1fr}.tool-grid{grid-template-columns:1fr}.setup-intro{grid-template-columns:1fr}}
40894
- @media(max-width:640px){.dashboard-status{flex-direction:column}.choice-grid{grid-template-columns:1fr}.connection-summary{align-items:flex-start;flex-direction:column}.connection-action{justify-content:flex-start}.maintenance-row{align-items:flex-start;flex-direction:column}.results-header{align-items:flex-start;flex-direction:column}.update-notice{align-items:flex-start;flex-direction:column}.activity-scroll .activity-row{grid-template-columns:auto minmax(0,1fr)}.activity-scroll .activity-row time{grid-column:2}}
40895
- @media(max-width:800px){.evidence-table{min-width:0}.evidence-table thead{display:none}.evidence-table tbody{display:block}.evidence-table tr{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);padding:.65rem;border-bottom:1px solid var(--line)}.evidence-table tbody th,.evidence-table td:nth-child(n){min-width:0;padding:.3rem;border:0;overflow-wrap:anywhere}.evidence-table td:nth-child(3),.evidence-table td:last-child{grid-column:1/-1}}
41038
+ /* Shared form controls, including search, use the same sizing and theme tokens. */
41039
+ input:not([type="checkbox"]):not([type="radio"]),select,textarea{font:inherit;color:var(--text);background:var(--panel);border:1px solid var(--control-line);border-radius:10px;padding:.65rem .75rem;min-height:44px;max-width:100%}input::placeholder{color:var(--muted);opacity:1}input:focus-visible,select:focus-visible,button:focus-visible,summary:focus-visible,a:focus-visible{outline:2px solid var(--accent);outline-offset:3px}button{min-height:44px}h2,h3{line-height:1.25;text-wrap:balance}p{overflow-wrap:anywhere}
41040
+ :root{--on-accent:#fff;--control-line:#8190a5;--muted:#596579;--shadow:0 2px 8px rgba(28,39,61,.03)}:root[data-theme="dark"]{--on-accent:#101a30;--control-line:#5f7088;--muted:#a6b0c0;--shadow:none}
41041
+ @media(prefers-color-scheme:dark){:root:not([data-theme="light"]){--on-accent:#101a30;--control-line:#5f7088;--muted:#a6b0c0;--shadow:none}}button:not(.secondary):not(.text-button):not(.choice-button):not([role="tab"]),.brand-mark{color:var(--on-accent)}
41042
+ .page-heading h1{font-size:1.8rem}
41043
+ .page-heading p{font-size:.95rem}
41044
+ .status-line{font-size:.8rem}
41045
+ .dashboard-status{background:var(--panel);padding:1.15rem;align-items:center;box-shadow:none}
41046
+ .dashboard-status>div{min-width:0}
41047
+ .dashboard-status h2{font-size:1.2rem}
41048
+ .dashboard-status p{max-width:64ch;margin:.35rem 0 .8rem}
41049
+ .dashboard-status>.pill{flex-shrink:0}
41050
+ .section-title h2,.results-header h2{font-size:1.15rem}
41051
+ .section-title p,.results-header p{font-size:.88rem;max-width:75ch}
41052
+ .metric-card{min-height:132px;box-shadow:none;padding:1rem}
41053
+ .metric-value{font-size:1.25rem;line-height:1.3;overflow-wrap:anywhere}
41054
+ .metric-card.positive .metric-value,.metric-card.good .metric-value{color:var(--good)}
41055
+ .metric-card.warn .metric-value{color:var(--warn)}
41056
+ .metric-help{font-size:.8rem}
41057
+ .advanced-disclosure{border:1px solid var(--line);border-radius:12px;background:var(--panel);padding:.8rem 1rem}
41058
+ .advanced-disclosure>summary{font-size:.88rem}
41059
+ .advanced-disclosure[open]>summary{margin-bottom:1rem}
41060
+ main,.setup-step{scroll-margin-top:7rem}
41061
+ .connection-summary{padding:.8rem 1rem}
41062
+ .connection-action{gap:.4rem;flex-wrap:wrap}
41063
+ .connection-action .text-button{font-size:.78rem}
41064
+ .connection-app-label{display:none}
41065
+ .tool-card{box-shadow:none}
41066
+ .tool-head{flex-wrap:wrap}
41067
+ .routing-feature .tool-head{gap:.4rem}
41068
+ .routing-feature .tool-head strong{font-size:.88rem}
41069
+ .routing-feature{background:var(--panel-soft)}
41070
+ .maintenance-row{padding:1rem}
41071
+ .maintenance-row>div{min-width:0}
41072
+ .maintenance-row button{flex-shrink:0}
41073
+ .maintenance-list{grid-template-columns:repeat(2,minmax(0,1fr))}
41074
+ .maintenance-row{align-items:flex-start;flex-direction:column}
41075
+ .brand small{font-weight:400}
41076
+ .evidence-panel{padding:0;overflow:hidden;box-shadow:none}
41077
+ .evidence-controls{display:grid;grid-template-columns:minmax(220px,1fr) minmax(150px,.4fr) minmax(150px,.4fr);gap:.75rem;padding:1rem;background:var(--panel-soft);border-bottom:1px solid var(--line)}
41078
+ .evidence-field{display:grid;gap:.4rem;min-width:0}
41079
+ .evidence-controls label{color:var(--muted);font-size:.78rem;font-weight:600}
41080
+ .evidence-controls input,.evidence-controls select{width:100%;font-size:.9rem}
41081
+ .evidence-list-meta{display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:.5rem 1rem;min-height:48px;border-bottom:1px solid var(--line)}
41082
+ .evidence-list-meta p{margin:0}
41083
+ .evidence-list-meta button{font-size:.8rem}
41084
+ .result-evidence{list-style:none;margin:0;padding:0}
41085
+ .evidence-item{border-bottom:1px solid var(--line)}
41086
+ .evidence-item:last-child{border-bottom:0}
41087
+ .evidence-summary{display:grid;grid-template-columns:minmax(180px,.8fr) minmax(0,1.6fr) auto;align-items:center;gap:1.5rem;padding:1.15rem 1rem;list-style:none;font-weight:400}
41088
+ .evidence-summary::-webkit-details-marker{display:none}
41089
+ .evidence-summary:hover{background:var(--panel-soft)}
41090
+ .evidence-identity{display:grid;gap:.3rem;min-width:0}
41091
+ .evidence-identity>strong{font-size:.98rem;line-height:1.3}
41092
+ .evidence-kind{font-size:.7rem;color:var(--muted);font-weight:700;text-transform:uppercase;letter-spacing:.05em}
41093
+ .evidence-signals{display:grid;gap:.75rem;min-width:0}
41094
+ .evidence-signal{display:grid;gap:.2rem;line-height:1.4}
41095
+ .evidence-signal strong{font-size:1rem;font-weight:650}
41096
+ .evidence-signal.good strong{color:var(--good)}
41097
+ .evidence-signal.warn strong{color:var(--warn)}
41098
+ .evidence-cue{display:flex;align-items:center;gap:.6rem;font-size:.8rem;color:var(--accent);font-weight:700;white-space:nowrap}
41099
+ .evidence-chevron{font-size:1.5rem;font-weight:400;line-height:1}
41100
+ .evidence-disclosure[open]>.evidence-summary{background:var(--panel-soft)}
41101
+ .evidence-disclosure[open] .evidence-chevron{transform:rotate(90deg)}
41102
+ .evidence-detail-body{display:grid;gap:1rem;padding:0 1rem 1.15rem;background:var(--panel-soft)}
41103
+ .evidence-section{background:var(--panel);border:1px solid var(--line);border-radius:10px;padding:1rem}
41104
+ .evidence-section h3{margin:0 0 .7rem;font-size:.88rem}
41105
+ .evidence-section button{margin-top:.75rem}
41106
+ .evidence-section p{margin:.75rem 0 0;max-width:90ch;line-height:1.6}
41107
+ .evidence-fact-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(125px,1fr));gap:1rem;margin:0}
41108
+ .evidence-fact-grid dt{color:var(--muted);font-size:.75rem}
41109
+ .evidence-fact-grid dd{margin:.25rem 0 0;font-size:.88rem;font-weight:600;overflow-wrap:anywhere}
41110
+ .evidence-empty{padding:2rem 1rem;text-align:center}
41111
+ .evidence-empty p{margin:.5rem 0 0;color:var(--muted);font-size:.9rem}
41112
+ .result-evidence>.empty{padding:1rem}
41113
+ .activity-scroll{max-height:24rem;overflow-y:auto;overscroll-behavior:contain}
41114
+ .activity-scroll .activity-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:.75rem;padding:.65rem 0;border-bottom:1px solid var(--line)}
41115
+ #modal{width:min(720px,calc(100vw - 2rem));max-height:calc(100vh - 2rem);overflow:auto}
41116
+ #modal-content h3{margin:1rem 0 .4rem}
41117
+ #modal-actions{display:flex;justify-content:flex-end;gap:.5rem;flex-wrap:wrap;margin-top:1rem}
41118
+ @media(max-width:900px){.dashboard-columns{grid-template-columns:1fr}
41119
+ .tool-grid{grid-template-columns:1fr}
41120
+ .setup-intro{grid-template-columns:1fr}}
41121
+ @media(max-width:640px){.dashboard-status{flex-direction:column}
41122
+ .choice-grid{grid-template-columns:1fr}
41123
+ .connection-summary{align-items:flex-start;flex-direction:column}
41124
+ .connection-action{justify-content:flex-start}
41125
+ .maintenance-row{align-items:flex-start;flex-direction:column}
41126
+ .results-header{align-items:flex-start;flex-direction:column}
41127
+ .update-notice{align-items:flex-start;flex-direction:column}
41128
+ .activity-scroll .activity-row{grid-template-columns:auto minmax(0,1fr)}
41129
+ .activity-scroll .activity-row time{grid-column:2}}
41130
+ @media(max-width:800px){.evidence-summary{grid-template-columns:minmax(130px,.8fr) minmax(0,1.4fr);gap:1rem}
41131
+ .evidence-cue{grid-column:2}
41132
+ .evidence-controls{grid-template-columns:repeat(2,minmax(0,1fr))}
41133
+ .evidence-search{grid-column:1/-1}
41134
+ .connection-scroll{overflow:visible;border:0;background:transparent}
41135
+ .connection-table{min-width:0;display:grid;gap:.75rem}
41136
+ .connection-row{display:flex;flex-wrap:wrap;gap:.75rem;border:1px solid var(--line);border-radius:12px;background:var(--panel);padding:1rem}
41137
+ .connection-head{display:none}
41138
+ .connection-name{width:100%;gap:.25rem}
41139
+ .connection-role{max-width:none}
41140
+ .connection-cell{display:flex;align-items:center;gap:.5rem}
41141
+ .connection-app-label{display:inline;color:var(--muted);font-size:.8rem}
41142
+ .connection-action{width:100%;justify-content:flex-start;padding-top:.65rem;border-top:1px solid var(--line)}}
41143
+ @media(max-width:640px){.evidence-summary{grid-template-columns:1fr auto;gap:.85rem;padding:1rem}
41144
+ .evidence-identity{grid-column:1}
41145
+ .evidence-cue{grid-column:2;grid-row:1;align-self:start}
41146
+ .evidence-signals{grid-column:1/-1}
41147
+ .evidence-fact-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
41148
+ .evidence-section{padding:.8rem}
41149
+ .evidence-controls{gap:.65rem;padding:.85rem}
41150
+ .evidence-controls input,.evidence-controls select{font-size:.85rem}
41151
+ .maintenance-list{grid-template-columns:1fr}
41152
+ .dashboard-status{align-items:flex-start}
41153
+ .brand small{display:none}
41154
+ .section-title{align-items:center}
41155
+ .section-title>button{flex-shrink:0}
41156
+ .impact-grid{grid-template-columns:1fr}
41157
+ .metric-card{min-height:0}
41158
+ .header-tools select{display:block;max-width:90px;font-size:.8rem}
41159
+ .header-tools{gap:.35rem}
41160
+ .brand{gap:.5rem;font-size:.9rem}
41161
+ .header-inner{gap:.6rem}
41162
+ .header-tools button{padding:.65rem .65rem;font-size:.85rem}}
40896
41163
  `;
40897
41164
  }
40898
41165
  });
@@ -41549,7 +41816,7 @@ ${GUIDE_CANDIDATE_READINESS_JS}`;
41549
41816
  <div class="header-tools"><label><span class="sr-only">Appearance</span><select id="theme" aria-label="Appearance"><option value="system">System</option><option value="light">Light</option><option value="dark">Dark</option></select></label><button id="refresh" class="secondary" type="button">Refresh</button></div>
41550
41817
  </div></header>
41551
41818
  <main id="main">
41552
- <div class="page-heading"><div><h1 id="view-title">Overview</h1><p id="view-description">Your coding agents, optimization stack, health and measured results in one place.</p></div></div>
41819
+ <div class="page-heading"><div><h1 id="view-title">Overview</h1><p id="view-description">Your setup, results and next steps.</p></div></div>
41553
41820
  <div class="status-line"><span class="read-status" role="status"><span id="reading-spinner" class="spinner" aria-hidden="true"></span><span id="updated">Checking your setup\u2026</span></span><span id="live-status" class="caption">Nothing changes without your approval</span></div>
41554
41821
  <div id="stale-state" class="stale-state" hidden></div><div id="error" class="error" role="alert" hidden></div><div id="notices"></div>
41555
41822
  <div id="update-notice" class="update-notice" role="status" hidden></div>
@@ -41557,20 +41824,18 @@ ${GUIDE_CANDIDATE_READINESS_JS}`;
41557
41824
  <section id="view-dashboard" role="tabpanel" aria-labelledby="tab-dashboard" tabindex="0">
41558
41825
  <section id="dashboard-status" class="dashboard-status"><div><span class="eyebrow">CURRENT STATUS</span><h2>Checking your machine\u2026</h2><p>Finding Claude Code, Codex, recommended optimizers and measured results.</p></div><span class="pill">Checking</span></section>
41559
41826
 
41560
- <div class="section-title"><div><h2>Measured impact</h2><p>A summary of what Token Harness can actually prove. Open Results for the detailed evidence.</p></div></div>
41827
+ <div class="section-title"><div><h2>Measured impact</h2><p>Recorded output, allowance and quality.</p></div><button id="overview-results" class="secondary" type="button">View results</button></div>
41561
41828
  <div id="dashboard-metrics" class="impact-grid" aria-label="Efficiency summary">
41562
- <article class="metric-card"><span class="metric-label">Measured output</span><strong class="metric-value">Checking\u2026</strong><p class="metric-help">Recorded optimizer output.</p></article>
41829
+ <article class="metric-card"><span class="metric-label">Recorded output</span><strong class="metric-value">Checking\u2026</strong><p class="metric-help">Recorded optimizer output.</p></article>
41563
41830
  <article class="metric-card"><span class="metric-label">5h / 7d allowance</span><strong class="metric-value">Checking\u2026</strong><p class="metric-help">Shown only when measured.</p></article>
41564
- <article class="metric-card"><span class="metric-label">API cost</span><strong class="metric-value">Checking\u2026</strong><p class="metric-help">Shown only from billing evidence.</p></article>
41565
41831
  <article class="metric-card"><span class="metric-label">Quality</span><strong class="metric-value">Checking\u2026</strong><p class="metric-help">Measured separately from savings.</p></article>
41566
41832
  </div>
41567
41833
 
41568
41834
  <section class="setup-step" id="coding-agents">
41569
- <div class="section-title"><div><h2>Coding agents</h2><p>Enable automatic per-prompt routing here for each detected coding app. The card distinguishes hook configuration from callbacks actually observed at runtime.</p></div></div>
41835
+ <div class="section-title"><div><h2>Coding agents</h2><p>Manage automatic routing for each app.</p></div></div>
41570
41836
  <div id="setup-agents" class="tool-grid"><article class="tool-card"><h3>Checking agents\u2026</h3></article></div>
41571
41837
  <details class="disclosure advanced-disclosure">
41572
- <summary>Agent details and optional reasoning settings</summary>
41573
- <p class="caption">Allowance, tool observations and reasoning preferences are advanced information. They are not required to finish optimizer setup.</p>
41838
+ <summary>Agent details &amp; reasoning settings</summary>
41574
41839
  <div id="agent-capabilities" class="tool-grid"><article class="tool-card"><h3>Checking agent details\u2026</h3></article></div>
41575
41840
  <div class="subsection-heading"><h3>Optional reasoning settings</h3><p class="caption">Persistent agent preferences are separate from optimizer setup.</p></div>
41576
41841
  <div id="agent-tuning" class="tool-grid"><article class="tool-card"><h3>Checking reasoning controls\u2026</h3></article></div>
@@ -41578,29 +41843,34 @@ ${GUIDE_CANDIDATE_READINESS_JS}`;
41578
41843
  </section>
41579
41844
 
41580
41845
  <section class="setup-step" id="optimizers">
41581
- <div class="section-title"><div><h2>Optimizer setup</h2><p>This matrix shows which optimizer setup Token Harness detected for each coding app. It does not confirm runtime activity; measured results appear separately when evidence is recorded.</p></div></div>
41846
+ <div class="section-title"><div><h2>Optimizer setup</h2><p>Connections detected for each app. Setup alone does not prove runtime activity.</p></div></div>
41582
41847
  <div id="connection-overview" class="connection-overview"><p class="empty">Checking optimizer connections\u2026</p></div>
41583
41848
  </section>
41584
41849
 
41585
41850
  <section class="setup-step" id="maintenance">
41586
- <div class="section-title"><div><h2>Health and updates</h2><p>These are maintenance actions, not onboarding steps. Setup already performs its own safety checks.</p></div></div>
41851
+ <div class="section-title"><div><h2>Health and updates</h2></div></div>
41587
41852
  <div id="maintenance-actions" class="maintenance-list"><p class="empty">Checking\u2026</p></div>
41588
41853
  </section>
41589
41854
  </section>
41590
41855
 
41591
41856
  <section id="view-results" role="tabpanel" aria-labelledby="tab-results" tabindex="0" hidden>
41592
- <div class="results-header"><div><h2>Results dashboard</h2><p>Measured evidence by optimizer, routing and coding app. Different classes and units stay separate.</p></div><div class="filter-row"><label for="period">Period</label><select id="period"><option value="all">All</option><option value="7d">7 days</option><option value="30d">30 days</option></select><button id="measurement-help" class="secondary" type="button">How results are recorded</button></div></div>
41857
+ <div class="results-header"><div><h2>Measured impact</h2><p>Each result keeps its source and measurement type.</p></div><div class="filter-row"><label for="period" class="sr-only">Results period</label><select id="period"><option value="all">All recorded history</option><option value="7d">Last 7 days</option><option value="30d">Last 30 days</option></select><button id="measurement-help" class="secondary" type="button">How to read results</button></div></div>
41593
41858
  <div id="result-summary" class="impact-grid" aria-label="Results overview"><article class="metric-card"><span class="metric-label">Measured evidence</span><strong class="metric-value">Checking\u2026</strong></article></div>
41594
41859
  <div class="section-title"><div><h2>Evidence</h2><p id="results-period-note">Checking recorded dates\u2026</p></div></div>
41595
41860
  <section class="panel evidence-panel">
41596
- <div class="evidence-controls"><label>Filter <input id="evidence-filter" type="search" placeholder="Optimizer, harness, class\u2026" autocomplete="off"></label><label>Type <select id="evidence-type"><option value="all">All</option><option value="optimizer">Optimizers</option><option value="routing">Routing</option><option value="harness">Coding apps</option><option value="candidate">Experiments</option></select></label><label>Sort <select id="evidence-sort"><option value="name">Name</option><option value="evidence">Evidence count</option><option value="type">Type</option></select></label></div>
41597
- <div class="evidence-table-scroll"><table class="evidence-table"><thead><tr><th scope="col">System</th><th scope="col">Scope</th><th scope="col">Measured evidence</th><th scope="col">Details</th></tr></thead><tbody id="result-evidence"><tr><td colspan="4">Checking recorded results\u2026</td></tr></tbody></table></div>
41598
- <p id="evidence-empty" class="empty" hidden>No evidence matches these filters.</p>
41861
+ <div class="evidence-controls">
41862
+ <div class="evidence-field evidence-search"><label for="evidence-filter">Search evidence</label><input id="evidence-filter" type="search" placeholder="Search sources, apps or measurements" autocomplete="off"></div>
41863
+ <div class="evidence-field"><label for="evidence-type">Source type</label><select id="evidence-type"><option value="all">All sources</option><option value="optimizer">Optimizers</option><option value="routing">Routing</option><option value="harness">Coding apps</option><option value="candidate">Experiments</option></select></div>
41864
+ <div class="evidence-field"><label for="evidence-sort">Sort by</label><select id="evidence-sort"><option value="evidence">With results first</option><option value="name">Name</option><option value="type">Source type</option></select></div>
41865
+ </div>
41866
+ <div class="evidence-list-meta"><p id="evidence-count" class="caption" role="status"></p><button id="evidence-reset" class="text-button" type="button" hidden>Clear filters</button></div>
41867
+ <ul id="result-evidence" class="result-evidence" aria-label="Evidence by source"><li class="empty">Checking recorded results\u2026</li></ul>
41868
+ <div id="evidence-empty" class="evidence-empty" hidden><strong>No matching sources</strong><p>Try a different search or clear the filters.</p></div>
41599
41869
  </section>
41600
41870
  <div class="section-title"><div><h2>Recent activity</h2><p>Latest checks and changes from this app session.</p></div></div><section class="panel"><div id="activity" class="activity-scroll"><p class="empty">No activity yet.</p></div></section>
41601
41871
  </section>
41602
41872
 
41603
- <footer><span>Local data. No account required.</span><span>Full overview refresh runs only when you choose Refresh.</span></footer>
41873
+ <footer><span>Local data. No account required.</span></footer>
41604
41874
  </main>
41605
41875
  <dialog id="modal" aria-labelledby="modal-title"><div class="dialog-body"><div class="dialog-heading"><h2 id="modal-title">Review</h2></div><div id="modal-content"></div><div id="modal-error" class="error" role="alert" hidden></div><div id="modal-actions" class="dialog-actions"></div></div></dialog>
41606
41876
  <script src="/guide.js" defer></script></body></html>`;