From ed498715de9f70ea12a857da53dd72df271da964 Mon Sep 17 00:00:00 2001 From: Thariq Shihipar Date: Thu, 9 Apr 2026 22:05:52 -0700 Subject: [PATCH] session-report: tighten hero, surface session ids, trim skills table MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Shrink hero token total (56→36px); drop root path from meta line; split line now reads "% input · % of input cached · % output". - Show 8-char session id in the collapsed meta line of top-prompts and cache-breaks so simultaneous entries are distinguishable. - Drop active-h/breaks/subagent columns from the skills table (always zero for skill rows). --- .../skills/session-report/template.html | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/plugins/session-report/skills/session-report/template.html b/plugins/session-report/skills/session-report/template.html index 98a9910..f223ed8 100644 --- a/plugins/session-report/skills/session-report/template.html +++ b/plugins/session-report/skills/session-report/template.html @@ -61,9 +61,9 @@ #meta-line { color: var(--subtle); font-size: 11px; } #hero { margin: 14px 0 6px; } - #hero-total { font-size: 56px; font-weight: 700; line-height: 1; } + #hero-total { font-size: 36px; font-weight: 700; line-height: 1; } #hero-total .unit { color: var(--clay); } - #hero-total .label { font-size: 18px; font-weight: 400; color: var(--dim); margin-left: 8px; } + #hero-total .label { font-size: 14px; font-weight: 400; color: var(--dim); margin-left: 8px; } #hero-split { color: var(--dim); margin-top: 8px; } #hero-split b { color: var(--term-fg); font-weight: 500; } #hero-split .ok { color: var(--green); } @@ -213,7 +213,7 @@ @media (max-width: 760px) { body { padding: 20px 12px 48px; } .term-body { padding: 16px 16px 24px; } - #hero-total { font-size: 40px; } + #hero-total { font-size: 28px; } .bar { grid-template-columns: 14ch 1fr 7ch; gap: 8px; } .drill summary { grid-template-columns: 6ch 1fr; } .drill .body { padding-left: 12px; } @@ -345,6 +345,7 @@ const esc = s => String(s).replace(/[&<>"]/g, c => ({'&':'&','<':'<','>':'>','"':'"'}[c])); const short = p => String(p||'').replace(/^-Users-[^-]+-/,'').replace(/^code-/,''); + const sid = s => String(s||'').slice(0,8); const MON = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec']; const niceDate = iso => { const d = new Date(iso); return isNaN(d) ? '' : `${MON[d.getMonth()]} ${d.getDate()} · ${String(d.getHours()).padStart(2,'0')}:${String(d.getMinutes()).padStart(2,'0')}`; }; @@ -359,8 +360,7 @@ $('cmd-flags').innerHTML = DATA.since ? `--since ${esc(DATA.since)}` : ''; $('meta-line').textContent = - (span ? `${span.from.slice(0,10)} → ${span.to.slice(0,10)}` : '') + - ` · ${DATA.root || ''}`; + span ? `${span.from.slice(0,10)} → ${span.to.slice(0,10)}` : ''; $('foot-gen').textContent = `generated ${DATA.generated_at?.slice(0,16).replace('T',' ') || ''}`; $('foot-stats').textContent = `${o.sessions} sessions · ${o.api_calls} api calls · ${o.human_messages} prompts`; @@ -370,8 +370,9 @@ `${m?m[1]:num}${m?m[2]:''}tokens`; const cacheCls = it.pct_cached>=85 ? 'ok' : 'warn'; $('hero-split').innerHTML = - `${fmt(it.total)} input (${it.pct_cached}% cache-read) · `+ - `${fmt(o.output_tokens)} output · all figures below are % of this total`; + `${pct(it.total,GRAND)} input · `+ + `${it.pct_cached}% of input cached · `+ + `${pct(o.output_tokens,GRAND)} output`; // overall stat grid $('overall-grid').innerHTML = [ @@ -498,7 +499,8 @@ return `
`+ `${share(p.total_tokens)}`+ `${esc(p.text)}`+ - `${niceDate(p.ts)} · ${esc(short(p.project))} · ${p.api_calls} calls`+ + `${niceDate(p.ts)} · ${esc(short(p.project))} · `+ + `sess ${esc(sid(p.session))} · ${p.api_calls} calls`+ (p.subagent_calls?` · ${p.subagent_calls} subagents`:'')+ ` · ${pct(p.input.cache_read,inTot)} cached`+ `
`+ @@ -514,7 +516,8 @@ `${fmt(b.uncached)}`+ `${esc(short(b.project))} · `+ `${b.kind==='subagent'?esc(b.agentType||'subagent'):'main'}`+ - `${niceDate(b.ts)} · ${pct(b.uncached,b.total)} of ${fmt(b.total)} uncached`+ + `${niceDate(b.ts)} · sess ${esc(sid(b.session))} · `+ + `${pct(b.uncached,b.total)} of ${fmt(b.total)} uncached`+ `
`+ renderContext(b.context, `
${fmt(b.uncached)} uncached `+ @@ -562,7 +565,8 @@ ]; table($('tbl-projects'), statCols, statRows(DATA.by_project)); table($('tbl-subagents'), statCols, statRows(DATA.by_subagent_type)); - table($('tbl-skills'), statCols, statRows(DATA.by_skill)); + table($('tbl-skills'), statCols.slice(0,8), + statRows(DATA.by_skill).map(r=>r.slice(0,8))); })();