Add the per-user overviewAutoSteps preference (100/200/300 steps, or off; 200 by default) to the plugin settings card. Once a session's retained step count reaches the threshold, the trend switches to its Overview ribbon and clears the mutually exclusive DNA/Adaptive faces; the auto activation fires once per session so a reader's own toggle-off sticks. The threshold counts raw retained steps, independent of the step/turn granularity.
The tooltip and shared type still described the pre-#78 scheme (peak at
list price, off at half), while models.dev lists DeepSeek's off-peak
rates and the estimator doubles the peak bucket. Correct the wording in
both locales, the cost type, and the READMEs; only DeepSeek's peak
buckets double, every other provider prices at list.
Express the peak clock in Beijing Time directly (Monday-Friday
09:00-12:00 and 14:00-18:00, weekends off-peak) and rename isPeakUtc to
isBeijingPeak. The UTC-to-Beijing refactor is behavior-preserving, so no
stateVersion bump is needed. Statutory holidays are deliberately not
modeled; record that limitation in docs/compatibility.md.
Refs #178
The ribbon rendered its cursor and tip from the parent's hoveredSeq, which
contextView throttles with a 140ms trailing update and a transition so pointer
sweeps cannot re-render the whole view; during a sweep the readout froze at the
first record and jumped once after the pointer rested.
Keep the pointer's record in local state, as the bars face already does, and
relay it upstream unchanged: the readout now follows every record change while
the browser preview keeps its throttle. hoveredSeq's only producer is this
pointer, so the local record wins while the pointer is inside; leaving drops it.
The Overview face now plants the same quartile and full-span poles in turn
granularity as in step granularity, labeled with the turn number each pole
lands on (step poles keep the step's 1-based position). The shared pole
classes become lc-trend-flag/lc-trend-flag-label since they carry either
number in both faces.
The turn strip's blocks grow by record span — the ribbon's own x unit — so
one-record-per-turn aggregates stay equal width and the strip labels line up
with the poles; step mode keeps its step-proportional blocks. A trimmed head
keeps absolute turn numbers on both layers.
Context Insights now reads contextActivity for every range-scoped figure: a step's settlement, tool run, and wall time book on the local day its step/start fired, so a step crossing midnight stays on its start day. The KPI band, Token Stats, and session selection share the daily ledger; turns, tool calls, and step wall time join each day, and contextActivity's stateVersion moves to 5 so cached rows cold-refold. The Activity heatmap drops the Steps metric for daily token volume; Timing Stats stays session-lifetime and is labeled as such.
Refs #172
The plugin declared two supported dsh releases while the line it actually
runs on — 0.2.1 — was outside the matrix, so the seams the plugin rides were
never probed against it.
The 0.2.1 line continues the V4 Config-form generation with every seam spelled
as at 0.2.0-rc.2, so the baseline entry is the same with the two facts that
differ: the line vendors cordis 4.0.5, and it adds the `web-deepseek-api`
entry the balance fold falls back to. The compat matrix now runs the plugin
against that tag's real sources like any other line, and the workflows fetch
it.
The driver's staging follows the line: the values package grew a sibling
module its entry re-exports by relative path, so the entry is staged under its
own name and the sibling rides along.
The capsule could ask the platform for a balance it would never get, with a
credential it had no business reading.
The fold matched its settings row by SHAPE — the first section carrying a
top-level `apiKeyEnv` — so a row belonging to another provider supplied the
credential, and that row's `baseURL` was used verbatim as the API root, so a
path-carrying endpoint (`/v1/tools`, `/anthropic`) asked for
`<baseURL>/user/balance` and the capsule stayed empty.
The fold now takes only DeepSeek platform rows: the `llm` provider directory
names the API-key model's own row (whatever the entry is called), and dsh's
stock entry ids are the fallback. Another provider's key is never read and
never sent, and a row whose credential does not resolve sends no request at
all.
The endpoint is the platform ROOT: only the origin of the row's endpoint
override counts, so the account route is always `/user/balance` on the
deployment's own DeepSeek origin. The projection is read redacted, so a row's
literal key never enters the fold.
The compat matrix pins the seams this reads: the redaction option, the
provider directory, and the stock entry ids each line ships.
Fixes#176
The overhead slice is the wall-minus-slices residual, and the live fold prices
an open step's model/tool windows before its wall time — so the residual
transiently clamps to zero at every step boundary. Dropping zero rows hid the
row mid-step and restored it at step/end, resizing the card on every step.
The residual row now keeps its dimmed slot (0.0% / —) whenever any slice
carries time; every other zero slice stays hidden, so a zero row cannot borrow
the session's count and read as "many calls, no time". A timing with no priced
slice at all keeps the empty state.
The file count and the added/removed line deltas now sit right of the title
("File Activity 41 files +493 −464"), the standalone tally row is gone, and
the chips keep the title row's right edge. Below the one-line breakpoint the
chips take a row of their own and the title reserves that folded height, so
tally digits cannot add or drop a row mid-session.
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
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.
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
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.
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.
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.
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.
The head keeps a teammate's roster name in bold with their duty in the light
secondary tone (the member cards' desc idiom); the self and lead cards keep
their title. The label box grows to a fixed 3 lines so the duty wraps to 2 —
the card grows uniformly with AGENT_CARD_H, keeping every card's metric row
aligned and the link anchors on the card's edges. The geometry pins derive
from literals so a layout bug cannot mirror its own arithmetic.
The aside rides the shipped catalog's own address and options, addressed by the
node's direct parent; a face that cannot take the resource keeps the whole-view
jump on every supported line. The openers' test suites move to their own file
to hold the 1000-line cap.
The overview's quartile poles and the turn strip's width-quartile labels also mark the
full-span position (the last record / last turn), so the log's end carries its figure like the
quartiles do. The full-span pole insets by its own 1px width (calc(100% - 1px)): at exactly
left 100% the pole falls wholly past the scroller's clip, while the number label keeps reading
leftward inside the pane. The collapsed-at-start pole still drops — at the left edge its
label would clip and the pane edge already answers. Chip tips and the README now say quartiles
and the full span.
One toggle next to Duration flattens every retained step (or turn) into a continuous stacked
ribbon across the visible width — no horizontal scrolling, nothing computed while it is off:
the drawing geometry memoizes on [requests, mode, duration] so hover re-renders never rebuild
the polygons. Flags mark the record quartiles only (interior-only: short logs' collapsed edge
quartiles drop), and the turn strip stays proportional with its labels on the width quartiles.
Interaction keeps the bars': nearest-record hover with the shared tip, click to pin, scissors
markers, the duration-curve overlay on the same svg with its right-hand axis, Total/Delta
(signed up/down bands around the proportional zero line) and category focus. Exclusive with
DNA mode and Adaptive: activating one clears the others.
trendChart.tsx lifts focusOf/deltaOf/trendTipRows and the whole-log maxima to module scope
(preprocessTrend/trendMaxima) so both faces share one preprocessing path and one tip shape.
The backfill's sliced path is optional-by-contract: restore/hydrate/prepare/
write exist on both supported baselines, and any absence falls the session
back to the single-shot coldSnapshot. Pin all four needles (plus coldSnapshot)
per baseline tag so a removal names the seam instead of silently degrading
the pass to whole-log blocks, and record the rule in docs/compatibility.md
§6.
A cold /detail request folded the whole log synchronously inside the request
(~0.35s per 30k events on a fast host) and re-folded on every view. The fold
now yields to the event loop every 1,000 events (the result is asserted
byte-identical against a buildTimelineDetail reference), and the folded
payload is cached keyed on the observation's (persistence instance, session
id, durable revision) tuple — the same trust tuple dsh's own observation
reader uses — so an unchanged cold session re-serves in ~1ms while a changed
log, a swapped backend, an observation without a revision (a live-race cut),
or a config remount always refolds. The cache is bounded at four payloads
(each bounded by the fold bounds) and lives in the watch closure.
The observation lease now disposes on every path including the early returns
(a latent pin on hostile faces is gone with the restructure).
The pass used to hold the host at ~60% duty for the whole corpus window (a
fixed 100ms sleep between full-log folds). Rests are now proportional to the
measured work (at least a 25ms floor) at both granularities — between slices
and between sessions — capping the pass near 50% duty, and every 8s of
cumulative fold work the pass takes a logged 2s recovery pause and resumes on
its own (the issue's 'bounded, background, visibly paused' ask). Slice work is
billed exactly once across the two granularities, and every sleep wakes early
on abort so dispose never waits out a pause.
Pacing is injectable (BackfillPacing) for deterministic tests, mirroring the
cold-read gate's injectable reading; the sliced-fold suite moves to its own
spec file with the shared rig extracted to tests/host/helpers/backfill.ts.
What gets folded and the final cache rows are unchanged — only when the loop
breathes.
A whole-log cold restore lands on the host event loop as one uninterruptible
synchronous block (~1s per 30k events on a fast host, more on a Windows
desktop), and a 100+ session backfill strings those into a window the desktop
renderer watchdog cannot survive (issue #145: 118 sessions, 47s, renderer
killed).
Sessions over 2,000 events now fold in 2,000-event in-memory slices through
the public registry.restore, yielding between slices, with exactly one durable
write-back at the end (sessions.prepare + registry.hydrate with the rows
already at the log end, then sessionProjectionCache.write). The composed rows
are byte-identical to one single-shot coldSnapshot (asserted with the real
registry + the plugin's real units), no intermediate durable rows land, and a
crash mid-fold keeps the single-shot failure semantics. A session going live
mid-fold skips silently; a write-back failure stays fail-soft.
Faces are re-proved per deployment and any absence (older/unknown harness)
keeps the single-shot coldSnapshot path; all four faces exist on both
supported baselines (0.1.7-rc.2, 0.2.0-rc.2), verified against the tags.