Failures now surface only on the expanded op rows. The collapsed row's
aggregate tally added little on its own (its edit ops already flag the failing
tool call), so FileEntry.errs — which existed only for that dot — and the
files.errs strings go with it; each op keeps its own err flag for the expanded
dots.
Expanded file rows now end in one right-aligned meta group: the read window,
the line delta, the failure dot and the stamp+time. The turn/step stamp is the
Context Browser's own (`stepStampOf`, reusing browser.stepAt/stepAtTip): the
first request that carried the op's result node, merged with the op time, or
the time alone when no logged request carries the op yet. Nested Code-Mode ops
scope through the shared `surfaceSeqOf` helper, and the meta group wraps onto
its own right-aligned line on phone-width cards.
The aggregate chip now reads blue in every state: solid info-blue while it is
the active scope (theme foreground text) and blue label text when another kind
chip narrows the list. The kind chips keep their purpose colors.
It rides the theme's existing state-business-primary / button-info-fill /
label-primary-foreground aliases, so light and dark themes both resolve.
Drop the scope line and put the five kind chips in its top-right slot. The
search box now leads the row below, the sort toggle sits on that row's right
edge, and the meta row keeps only the file tally and line deltas. The unused
scope prop, its computation and the files.scopeLatest keys go with the line;
the picked step/turn still reads in the request detail header.
The count-bearing chips widen as their tallies gain digits, so the title row
reserves its folded height on narrow cards — the same guarantee the old
controls band carried, applied to the row the chips now live in.
- pass the active locale into the /context modal's browser so memoized step
labels re-translate while the dialog stays open;
- re-run the height-cap measurement and its ResizeObserver after the hidden
sidebar copy remounts;
- restore DNA band hover reveal for off-window rows: keyed rows, key→index
map, scroll the window into place, then reveal after the commit;
- only window the file list when every row measures the same height: real
long-path wrapping made the fixed-pitch spacers too short (scroll jumps);
- re-clamp the chart tip when a different DNA band changes its width;
- keep a tiny DNA bar's colour instead of emitting an empty gradient.
Tests cover the off-window band reveal, the mixed-height file-list fallback,
and the sub-pixel DNA bar.
The earlier gradient-stop cap sampled every bar's runs independently, which
broke the shared px-per-token invariant: the same band landed on a different
offset in each column, so neighbouring bars' colour strands no longer lined up.
Quantize internal band boundaries to one shared 2px grid (the final boundary
stays exact so the bar stays filled), merging same-colour runs and absorbing
sub-grid slivers. The tooltip and hit-testing still read the untouched band
model; only the rendered gradient changes.
Adds snapDnaRuns unit coverage plus exact-gradient expectations.
* perf(context): cut context-tab render, hover and DNA costs
P0 — interaction/caching:
- isolate pointer hovers: chart-local hover stays immediate, cross-card previews
trail (140ms; 220ms in DNA mode) so sweeps cannot stack full-view renders;
- cache pure projections (assemble, DNA/file derivations) across hover/remount;
- remove forced layout from the flow/timing read paths, gate the hidden sidebar
copy, memoize picker options and tool tallies.
P1 — windowing/lazy rendering:
- window trend bars, file-activity rows, timing-strip segments (dense gradient)
and the browser DNA feed; off-screen rows use content-visibility;
- lazy-mount the browser card and the below-fold event/file row behind
height-matched skeletons, mounted on an idle slice / near the viewport;
- window DNA bands on long total-mode logs, tighten the DNA window, sample
per-bar gradient stops, and keep DNA+delta eager so its churn axis stays exact;
- force-mount + reveal for stats file-pill jumps into the lazy row.
Rendering-only by construction: axes, tooltips, ordering, DNA hit-testing and
every readout still come from the full model; scrolling only changes which rows
are in the DOM. Measured on a 987-step session: mount 986-1251ms -> ~510ms,
first paint 480-592ms -> ~80ms, zero long tasks; tab DOM 15,929 -> 3,226
(below-fold mounted ~4.7k); hover 30 -> 0 long tasks; DNA toggle 875 -> ~230ms.
Tests: new window/lazy/DNA/cache specs; lint, typecheck and 138-file 100%
per-file coverage green.
* fix(context): second-review follow-ups
- keep DNA bands fresh per header epoch, and force eager DNA+delta on long
logs so per-key churn axes stay exact;
- correct windowed spacer heights for the container flex gap: the file list
and the DNA feed now reproduce the full scroll height exactly;
- re-translate memoized picker/tooltip labels when the locale changes;
- re-observe lazy mounts across detach/reattach (a collapsed sidebar copy)
via a callback ref, keep forced mounts for stats jumps, and clear the
chart's local hover/DNA state on mouse leave;
- shrink the window for a mount that already has DNA on, and add the async
subagent count to the flow-measurement deps;
- repair the skeleton background rule and restore the accidentally
globalized .lc-heat-ctl .lc-card-sub selector.
The harness keeps one resident `[data-conversation-scroll]` scrollport across
tab switches and the chat bottom-anchors it, so a long session's scrollTop
rode into the Fleet tab and clamped to the page's own scroll floor — the tab
opened at its bottom. The page now re-claims the top per session in a layout
effect, on both the loading frame and the full page, so the inherited
position never paints. No per-session ledger here: the page's height settles
in late passes (forest arms, then details), so a restored position clamps
against the slim first frame and scroll anchoring re-pins the bottom — the
Context tab's ledger stays as is, its content lands at full height in one
commit.
Fixes#164
The rule matched `[class$="_summary"]` — the plugin bundle's `[hash]_<local>`
css-module naming — but the tree renders from the shell's Vite build, whose
scoped names end with `_<line>` (`_summary_1alm6_198`). It never matched, so an
expanded node showed its inline preview and then the same values again as its
children.
Match the `_summary`/`_preview`/`_punctuation` locals as substrings and hide the
comma stranded behind the preview, with a regression test covering the shell
build and test spellings. Drop the compat pin that described the plugin build
instead of the shell's, and add `css.punctuation` to the JsonTree seam needles.
Fix the touch-triggered React #185 in the insights hover tip: key the measure pass on its inputs (side, label, rect, viewport) instead of tip identity, and re-measure a relabelled tip at the same rect.
Based on the original fix direction from @nexw.
Fixes#162
Opening a category or an exact row grew the rows region's flex base, and
the capped card charged the whole deficit to the map — the only other
shrinkable item — folding it to its 40px floor on every pick. The map sat
in the fixed zone but still changed shape under the click.
Pin the map's flex base so opened rows scroll the rows region instead of
squeezing it; a percentage ceiling still folds the map when a capped card
is genuinely too short (a content-sized card ignores it). The /context
dialog's hard viewport cap is the one real pressure: while the map shows,
the dialog fills its cap and the browser card and rows region size from
the leftover, so the map folds exactly to what is left instead of
overflowing.
The sort toggle ordered rows by counts, recency, and path; the row's own
last segment — the bold name a reader scans for — had no order of its
own, so same-named files in different directories never grouped. Name
leads on the displayed last segment (either separator style, via the
shared leafNameOf) and the full path breaks ties between rows that share
a name.
The Preferences picker, the host Config union, the shared
DefaultFileSort vocabulary, and both dictionaries carry the fourth
option; glyphOf now reuses the same leaf helper instead of its own split.
The Input / Output capsules were dead weight beside the jumpable figures:
every destination sat below the fold. Human Inputs now opens the Context
Browser's User Messages category — the same one-shot catFocus relay the
skill and answer figures ride — and Read / Written / Searched / Images
land on the File Activity card with that kind chip picked: a one-shot
filter focus the card applies, hands back to the caller, and clears its
own text lens and open row for.
The pills became hover links: pointer, lifted wash, focus ring and an
action title, with Enter/Space parity through one shared jump wiring. A
pill carrying its own ? bubble keeps the native title off so a single
hover shows a single hint. The figure relay was unified as onJump
(onFigureClick is gone), and the browser reveal grew into revealCard,
which the File Activity landing shares.
The tab capped the browser column at the left cards' height bounded by
the host scrollport's slice from the card's top edge; that slice added
the scroll offset on top of rect coordinates, so a scrolled or short
pane clamped the card far below the left column — an empty gap under
the composition + trend cards.
Cap the column at the left cards' measured span alone (first card top to
last card bottom, rounded up): the row's stretch then makes it the
card's height, so it ends flush with the two cards at every width where
they sit side by side, while the DNA feed still scrolls inside the card.
Drop the pane-fit plumbing and its now-dead scrollport observation, and
replace the README's stale three-times claim.
The /context dialog scrolled as a whole while the DNA feed rode it, and
scrubbing the composition bar dragged the dialog too — the row reveal's
nearest scrollable ancestor was the dialog card itself. In the tab, the
3x left-column cap let the card outgrow the pane and change height on
every DNA toggle, dragging the head off-screen and the cards below with
it; band picks scrolled the page via scrollIntoView.
Make the card's own fixed zone the rule in every host: head, DNA lens
and block map stay put while only the rows region scrolls. The tab
column caps at the left column's height bounded by the host scrollport's
slice from the card's top edge (browserCapOf), so toggling DNA or
opening categories never moves the cards below; the /context dialog
becomes a filled flex column whose browser card shrinks instead. Row
reveals bind to the card (revealRowInCard): scrubbing and picks never
scroll above it, and the rows region contains its wheel so the page only
moves when the pointer leaves.
DnaBar's gradient stops were percentages of each bar's own total, so the
browser rasterized common strands differently per bar (sub-pixel bands
flipping visible/merged between steps) and inherited bands read thicker
and thinner across the chart. Stops now ride the shared per-token pixel
scale (CHART_H/maxTotal) and are byte-identical in every bar; the bar
height reuses the same scale. Live-measured on a 99-bar session with the
duration curve off: adjacent-bar common-row pixel diffs dropped 589 -> 11,
the remainder being genuinely new top-of-bar strands.
Row lists (the DNA flat feed, category bodies, tool schemas) previously read
as one undifferentiated white field. One rule keyed on the shared .lc-br-elem
row factory stripes every list: `nth-child(even of .lc-br-elem)` keeps the
phase stable across toolbars, notes and filtered-out rows, the tint is 60% of
the theme's interactive hover wash so it sits under hover and open states,
and an open row keeps its active highlight alone.
Opening a browser row/category persists focusCat with no visible UI; with DNA
on, TrendChart then scaled bar heights to the focused category's share
(focusOf) while the band data and the lifetime slices stayed in full-context
offsets — dark slices floating above half-height bars. The DNA faces now pass
no focus into preprocessTrend (the stacked faces keep it), and the previously
false-positive 'focus is ignored' test now discriminates: with the axis driven
by a second bar, focused heights (22px) diverge from the full-context share
(56px).
The client POSTed every plugin route as a root-absolute /api/dsh-context/*
path, which stripped a reverse proxy's /app/dsh prefix at the gateway —
every poll 404ed at it, the panel retried on an aggressive backoff, and
the deployment fell into the issue #159 reconnect loop. The six route
constants now live in one module as their browser-relative spellings:
fetch resolves them against the page's document base, the same idiom
dsh's own stream/socket clients ride, so a prefixed proxy keeps its
prefix and a direct deployment resolves to the exact same URLs before
and after. A host/client pairing spec pins each spelling to its route
registration, and docs/compatibility.md gains the §5.8 client-seam rule.
Fixes#159
Review follow-up to 2ce42f6: "~30% off the coverage gate" reads as a
pass/fail claim, and the file count next to it rots as specs are added. The
comment now names the measured runtime and keeps only the two facts that
cannot be read off the config: the per-worker environment an amortized ~30%
buys, and why the pool stays client-only.
Vitest 5's duration diagnostics flagged that the jsdom environment was created
once per client file — 111 times, 36% of tracked time. vmThreads creates it
once per worker while keeping per-file isolation, so the same 153 files /
2429 tests and the same 100%-per-file coverage scope (131 instrumented files)
now finish in ~16.7s instead of ~24.0s: paired interleaved medians of five
gate runs, and ~46% faster at the CI runner's four workers.
Client-only: the host project fails under vmThreads (10 files), and the
`isolate: false` shortcut the same hint offers fails two client files.
Peak process-tree memory rises ~0.9 GB (3.0 -> 3.9 GB).
Vitest 5 needs Node >=22.12 and Vite >=6.4 — already satisfied (node 24, vite
8.3.1 auto-installed as its peer) — and needs no config or test change here:
`clearMocks` now defaults on, inline projects inherit the root config, and `-t`
joins suites with ">", none of which this repo relies on.
Paired interleaved runs against v4.1.12, on two warm checkouts and alternating
the version per pair to cancel machine drift: `vitest run` 22.40s -> 20.95s and
`vitest run --coverage` 26.09s -> 25.65s (median per-pair delta -5.8%), with the
same 153 files / 2429 tests and the same 131-file coverage scope at 100% per
file.
Hovering a band on the DNA bar now lights the row it names below — a message
band its exact feed row, a tool-schema band the tools group row, the system
band the system row — the reverse of the row-hover-to-band link, so the two
surfaces read as one surface. The echoed row also scrolls into view, confined
to the nearest scrollable ancestor's own scrollport (the capped column): the
row only has to reach the scrollport's visible slice, since a capped column
usually extends below the page fold and a page scroll would drag the pointer
off the pinned band mid-scrub. Clicking a band still lands on the row and
expands it.
The DNA flat feed lays every message out at once, and an uncapped card would
outgrow the page. The browser column now measures the composition and trend
cards stacked beside it — per render, followed by a ResizeObserver for pane
drags and card reflows — and tops out at three times their sum, scrolling
taller content inside; the card head (title, composition bar, notices, and the
DNA feed's lens) stays pinned above the scrolling list. The /context modal
keeps its own single-card scroll and stays uncapped.
In DNA mode the category accordion yields to one flat list of every assembled
item: the model reads the prompt oldest-first, so the list presents that order
bottom-up — the newest message is row one, and the tool schemas (one group row
opening into the category body) plus the system prompt close the list. Each row
carries its #prompt position, a category chip tinted with the category's own
palette color, its introducing-step stamp and token price, and expands into the
same full content.
A text lens pinned in the card head filters the feed's rows and the open tools
group's schemas alike (the served system prompt text included); hovering a row
lights its exact band — or its band group for the header rows — on the DNA bar
without reporting upward; a category jump (catFocus) drops back to the
accordion, which has no row landing in the feed.
The card was pinned by the fixed 720px cap, so wide panes left large
proportional blank space on both sides. Width is now
min(calc(33.333% + 480px), calc(100% - 32px)): each side margin is
exactly 2/3 of the old layout's at every pane width, and the narrow
gutter floor drops from 24px to 16px.
Whole-text JSON payloads (a leading { or [ that parses) open on the shell's
JsonTree inspector instead of markdown: the switch offers Raw|JSON there
(markdown is meaningless on structured payloads), the tree opens two levels
deep via the expanders' own click path (focus restored, capped at 100), and
an expanded row drops its inline preview Chrome-DevTools style. The JsonTree
faces are pinned per baseline and probed by the compat matrix.
The 1px border-l2 hairline on a white layer-2 background reads as
borderless. Adopt dsh's own form-field recipe (0.5px solid border-l4,
the settings inputs/selects idiom) for all four native selects: the
overview coverage picker, the fleet sort/filter, and the context
browser step picker.
Archived sessions fold back into every figure the page derives off the
session list: rowsOfSnapshot now tags archived rows instead of dropping
them, and one coveredRowsOf pass scopes the KPI band, charts, heatmap,
skills, and the session grid together. A "Filter sessions" select next to
the list's search box offers dsh's own archived-filter set — All (show
archived) by default, Hide archived, Archived only. The Active Sessions
card follows the picked coverage (Sessions incl. the window's archived
count under All; Active/Archived Sessions over the full-list total under
the narrow scopes), archived cards wear an Archived tag and refuse to
open like dsh does, and kpisOf drops its now-unused listed param.
Wrap the meta row and the composition bar into one main column with the
enlarged map toggle as a right column stretching across both rows, so the
figures shift left of the card edge instead of crowding the button.
A bar-right toggle reveals a squarified treemap of the shown step's
context: category regions sized by tokens, with same-kind items folded
into one weighted block (every bash result together, skill loads by
skill, injections by form) and an 'others' tail past the fold cap.
Clicking a singleton block lands on its exact row (the DNA band pick's
path), a folded block filters the category's rows to the group's tag,
and a region header toggles the category like its row does. Block and
region hovers float a figure bubble and, outside DNA mode, report the
category to the shared composition hover; the open category keeps its
region framed.
The pinned step's per-category rows were a second rendering of the same
categories, drifted from the one above: their own grid, dimmed regular-weight
labels, a fixed figure column. The panel now renders the composition card's
own chip legend — same dot, 600-weight label, right-aligned figures with the
secondary share, same hover highlight and 160px grid reflow — in the shared
CATS order, so a category reads identically in both cards.
Delta mode has no counterpart above, so makeLegend gains a delta variant: the
chips print the signed change colored by sign, and both the share and its
"of used" hint drop out. The panel's chips report hovers back exactly as the
composition legend's do, and the reserved lane mirrors the chip grid so the
pending and loaded panels still measure alike.
Code review flagged the two "no mini bar" assertions as a duplicated absent-class
check. One anatomy pin per mode now asserts the child sequence a row is made of —
dot, label, figure, share — and a mutation test confirmed reintroducing
.lc-bar-track anywhere in the row fails both modes.
The pinned step's per-category rows carried a mini bar beside the figures
— the share track in Total mode, a diverging zero-line bar in Delta. Both
go: a row now reads dot, label, figure, share, with the figures pinned to
the row's right edge, and the trend card's reserved lane mirrors that same
anatomy so the pending and loaded panels still measure alike.
The Fleet task board's opened card boards its owner's report-back from a
wire excerpt the route clips at 300 chars, so expansion could never show
the whole text even though DSH itself hands the fold the whole log. The
fleet route now reads a `full: true` body whose prompt/reply skip the
excerpt caps (only a hostile-payload bound stands), and the task board's
unfold asks for it once per session per mount: the excerpt renders
first and swaps in place on landing, the section meta carries
loading/excerpt-only states, and the scan never pays for the full read.