Skip to content

HarnessRouter Community Edition: the self-hosted, Apache-2.0 edition of the unified interface for agent harnesses. Run Codex, Claude Code, Hermes, PI, DSH, and more through one API, with sessions, streaming, files, cancellation, and failure handling. Implements the Unified Harness Protocol (UHP), an open standard. Your keys, your infrastructure.

6.1 KB
Raw Blame
/* A task's trace (TraceView.tsx): the console's earlier trace layout in the redesign's look. A
   compact line of figures, a thin timeline, one line per event (badge, words, tokens and time, its
   clock from the turn's start), the detail beside it when wide, over the panel when narrow. The
   design's own badge, event row, chip, idle and detail classes do the drawing; these only lay it
   out. Every rule under #hrui and in the design's tokens, so dark mode follows. */
#hrui .trv{display:grid;grid-template-columns:minmax(0,1fr);min-width:0;container-type:inline-size}
#hrui .trv.with-detail{grid-template-columns:minmax(0,1fr) minmax(320px,420px);column-gap:0}
#hrui .trv-main{min-width:0}
#hrui .trv-head{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:0 0 10px}
#hrui .trv-head .chip{font-size:12px;padding:2px 9px}
#hrui .trv-head .chip.mono{font-family:var(--mono)}
#hrui .trv-cost{position:relative}
#hrui .trv-cost>summary{list-style:none;cursor:pointer}
#hrui .trv-cost>summary::-webkit-details-marker{display:none}
#hrui .trv-cost>summary .chip{display:inline-flex;align-items:center;gap:6px}
#hrui .trv-cost>summary .chip b{color:var(--fg);font-weight:600}
#hrui .trv-cost[open]>summary .chip{border-color:var(--accent);color:var(--accent)}
#hrui .trv-cost .cost{position:absolute;z-index:6;top:calc(100% + 6px);left:0;width:min(380px,calc(100vw - 32px));margin:0;padding:12px 14px;background:var(--bg);border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow)}
/* the timeline: marks by kind, idle stretches drawn short and hatched */
#hrui .trv-strip{position:relative;height:10px;margin:0 0 12px;border-radius:5px;background:var(--surface);overflow:hidden}
#hrui .trv-seg{position:absolute;top:2px;bottom:2px;border-radius:3px;cursor:pointer;background:var(--faint)}
#hrui .trv-seg.s-user{background:#8f6ae6}
#hrui .trv-seg.s-agent,#hrui .trv-seg.s-step{background:var(--accent)}
#hrui .trv-seg.s-tool{background:var(--bar)}
#hrui .trv-seg.s-done{background:var(--ok)}
#hrui .trv-seg.s-error{background:var(--bad)}
#hrui .trv-gap{position:absolute;top:0;bottom:0;background:repeating-linear-gradient(135deg,var(--surface-2) 0 3px,transparent 3px 6px)}
/* the rows: badge | words | tokens and time | clock */
#hrui .trv-list .trv-r{grid-template-columns:64px minmax(0,1fr) auto 64px;padding:7px 8px;font-size:13px}
#hrui .trv-stat{font-family:var(--mono);font-size:12px;color:var(--muted);white-space:nowrap}
#hrui .trv-r.trv-sub{padding-left:24px}
#hrui .trv-r.trv-in{animation:ktIn .3s ease-out both}
#hrui .trv-turn .turn-h{margin:12px 0 4px}
#hrui .trv-idle{margin:10px 0}
#hrui .trv-wait{display:flex;align-items:center;gap:8px;padding:8px;font-size:13px;color:var(--muted)}
/* the detail: beside the rows when wide */
#hrui .trv-side{border-left:1px solid var(--line);padding:4px 0 24px 20px;min-width:0;position:sticky;top:0;align-self:start;max-height:100vh;overflow:auto}
#hrui .trv-detail{min-width:0}
#hrui .trv-detail .dr-top b{overflow-wrap:anywhere}
#hrui .trv-detail pre.json{max-height:420px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere}
#hrui .trv-detail pre.json.trv-err{border-left:3px solid var(--bad)}
#hrui .trv-detail .trv-think{font-style:italic;color:var(--muted)}
#hrui .trv-tsep{margin:18px 0 0;padding-top:10px;border-top:1px solid var(--line);font-weight:600;font-size:13px}
/* narrow: over the panel the trace sits in (the host is positioned), or over the window */
#hrui .trv-over{position:absolute;inset:0;z-index:30;background:var(--bg);overflow:auto;padding:16px 18px 24px;animation:ktIn .16s ease-out both}
#hrui .trv-over.trv-over-fixed{position:fixed;z-index:46;padding-top:calc(16px + env(safe-area-inset-top,0px))}
#hrui .trv-over .dr-top{position:sticky;top:-16px;background:var(--bg);padding:6px 0;z-index:1}
@container (max-width:560px){
  #hrui .trv-list .trv-r{grid-template-columns:58px minmax(0,1fr) 56px}
  #hrui .trv-stat{display:none}
}
@media (prefers-reduced-motion:reduce){#hrui .trv-r.trv-in,#hrui .trv-over{animation:none}}
/* a kit's Trace panel: a step's detail covers the panel (the overlay's host), and its rows fit the
   panel's width */
#hrui .kt-play.kt-play-trv{position:relative}
#hrui .kt-pb .trv-head{margin-top:0}
/* a task's Trace (setup/TaskTrace, start/RecordedTrace) in a setup's middle column, as the console's
   earlier Tasks › Trace drew it (Richard, 2026-10-19: "our earlier version was quite good"): the
   events take the column's width, not the 720 px reading column the conversation keeps, and a step's
   detail sits beside them when the column holds both, else in the right column (the page's
   .tk-trv-host). The rows keep the trace's own look, whatever the design's task rows say: the badge
   in its kind's colour, tokens and time, the clock. */
#hrui .tk-d .trace.trv-page{max-width:1208px;margin:0 auto;padding:20px 24px 40px}
#hrui .tk-d .trv-list .ev-row.trv-r{grid-template-columns:64px minmax(0,1fr) auto 64px;padding:7px 8px;font-size:13px}
#hrui .tk-d .trv-list .ev-row.trv-r.trv-sub{padding-left:24px}
#hrui .tk-d .trv-list .ev-row .badge{padding:2px 8px;border-radius:6px;font-family:inherit;font-size:12px;font-weight:500;line-height:inherit;letter-spacing:normal;text-transform:none}
#hrui .tk-d .trv-list .ev-row .badge.b-user{background:#f1ecff;color:#6a3fd1}
#hrui .tk-d .trv-list .ev-row .badge.b-step,#hrui .tk-d .trv-list .ev-row .badge.b-agent{background:var(--accent-soft);color:var(--accent)}
#hrui .tk-d .trv-list .ev-row .badge.b-tool{background:var(--surface-2);color:var(--muted)}
#hrui .tk-d .trv-list .ev-row .badge.b-done{background:var(--ok-soft);color:var(--ok)}
#hrui .tk-d .trv-list .ev-row .badge.b-error{background:var(--bad-soft);color:var(--bad)}
@media (prefers-color-scheme:dark){#hrui:not([data-theme="light"]) .tk-d .trv-list .ev-row .badge.b-user{background:#2a2142;color:#c3aefc}}
#hrui[data-theme="dark"] .tk-d .trv-list .ev-row .badge.b-user{background:#2a2142;color:#c3aefc}
@container (min-width:561px){#hrui .tk-d .trv-list .ev-row>.trv-stat{display:block}}
@container (max-width:560px){#hrui .tk-d .trv-list .ev-row.trv-r{grid-template-columns:58px minmax(0,1fr) 56px}}
@media (max-width:860px){#hrui .tk-d .trace.trv-page{padding:16px}}