The bar's tooltip was one nowrap string per hover kind, the only tooltip in
the plugin not yet multi-line. Split it into head / figure / note so all four
kinds share one skeleton and wrap:
Tool Schemas ≈6.4k · 3% of used context
Free Window 733.2k · 73% of window
Compaction headroom 65.5k
Auto-compaction fires at 68% of the window
Max output tokens 256.0k
This reply's output is reserved at the window's end
Every figure now names its denominator. The segments share the USED total and
the free track the WINDOW, which the old single line never said; the two masks
had no share at all and now state where they sit in the window instead, read
off the same clamped trackPct the masks lay out with rather than a second ratio.
Replaces the hardcoded 12/88 left clamp — a guess at half the tooltip width that
only held around a 920px pane, and cut the bubble off at narrower ones. The
percentage anchor stays the source of truth; a layout effect measures the tip and
adds a px shift only when the rows overhang. Rects, not clientWidth, whose whole-
pixel truncation lands the residue straight back on the overhang.
Also adds role="tooltip", and box-sizing so the width cap means what it says.
The same package can mount twice into one page's slot ledger — a static
profile bundle plus a later activation of the same package. The
client-plugin runner force-assigns a fresh shadowing priority to every
registration, so the registry's same-id duplicate guard never fires across
the two mounts, and the conversation header — which renders the raw ledger
and matches the active view by entry id — paints both copies of every
list-slot seat.
apply() now reads the raw ledger first (SlotRegistry.entries) and mounts
nothing when this bundle's chat-to-Context jump entry is already seated.
The read fails open: an absent, shape-shifted, or hostile face reports
unseated and the mount proceeds, so an older line never blanks a working
mount. The entries seam is pinned per baseline.
The harness-side defects (the runner forcing a rank on additive list
slots, and the header rendering the raw ledger) are left to
deepseek-ai/deepseek-harness.
Two new per-user preferences, `promptPrefix`/`promptSuffix`, hold free text
joined at the very start / end of the harness's assembled system prompt for
all agents (subagents included) — a per-deployment persona or behavioral rule
riding the harness's own prompt registry instead of session-log surgery:
- src/host/promptInjection.ts registers two global prompt sections through a
deferred `ctx.inject(['systemPrompt'], …)` (a composition without the
registry degrades to a no-op; the registration unwinds with this plugin's
fiber). Orders anchor on the harness's own section-order registry, so a
central renumbering keeps the prefix first and the suffix last. Text is
registered `interpolate: false`, so `{{...}}` in user text stays literal.
- The section text providers read the volatile config references the loader
rewrites in place on preference edits, so an edit applies from the next
turn without remounting the entry; new sessions carry the text from their
first turn through the harness's own system-prompt projection.
- The settings card grows two free-text rows (local draft, committed on blur
and on unmount; a host push never clobbers in-progress typing), zh/en
strings, and the served-value sanitize/degrade path for the string fields.
Verified against a running harness: the committed text persists in the
profile layer, and a new session's system prompt starts with the prefix and
ends with the suffix. docs/compatibility.md documents the seams, and the
compat matrix probes them on both supported lines.
Both dictionaries were annotated Record<string, string>, which is an
index signature and a promise of nothing: a key added to zh alone, or
to en alone, typechecked and shipped. The only gate was a runtime
deepEqual in the spec, so the asymmetry reached a built bundle before
anything failed.
zh is now the key-set source of truth and en is checked against it, the
harness's own idiom (see ui-conversation/src/client/locales.ts in
deepseek-harness, where 51 of 61 locale files do this). A key reaching
only one side is now a compile error, verified in both directions.
The spec keeps what types cannot see — non-empty values and placeholder
agreement — and drops the key-set test, which can no longer fail.
Translate keeps its key as string. Call sites compose keys at runtime
(`'form.' + form`, a weekday template), so a DictKey union would mean a
cast at each one, and the cast would suppress the check this change
buys.
Each node becomes a card: title over a fixed two-line zone (every card's
rows align), the agent's consumed tokens with an estimated price when the
models.dev book has the rate, a composition bar replacing the donut (free
window is the track), and a footer with the run's duration at the left and
the bar's occupancy figure at the right.
Links are S-curves fanned out of the parent card's foot in the family hue
with joint plugs at both ends; hovering or focusing a card lights its whole
lineage (ancestors + subtree) while the rest of the graph dims. Sibling
order follows the parent's subagentCatalog projection (the harness header
popup's own spawn order) when cached, with the activity heuristic as the
degrade. Narrow panes fold the family into single-column bands instead of
crushing cards, and the stage measures its content box, so the phantom
horizontal scrollbar at exact-fit widths is gone.
The inspector gains the hovered node's composition readout; keyboard focus
drives the same inspector/lineage affordance as hover. Card surfaces step
one layer up with the l2 border (the inspector's own nesting recipe) so the
cards read clearly in both themes.
Apply the AGENTS.md comments guideline to every .ts under tests/: remove
what the code already expresses, keep only what it cannot.
Removed: spec-header coverage inventories the describe/test tree already
names; comments restating the next line's assertion or its message; helper
JSDoc whose body already says it; within-file duplicates; five stale
claims (trendChart's "six aggregated turns" against agg.length === 8,
agentGraph's "six categories" against CATS' seven, fold-timing's "cheapest
call LAST" against a loop that feeds it first, fold-surface's unreachable
plain-JSON note, contextView's "two turns" for a one-turn fixture).
Kept and condensed: the projection-freeze class, strict wire/state-schema
hazards, retention and pricing windows, pairing rules, hostile-input
rationale, fixture and expectation-array ground truth, jsdom mechanics,
and issue-numbered regressions.
Comment lines 2604 -> 2014 (-22%); 85 module headers kept, 30 coverage
inventories dropped; every surviving comment line is within the 140-column
limit, with 36 wrapped lines joined onto fuller ones.
No logic, string, identifier, import or directive changed: a comment-strip
gate proves each file's comment-free code is byte-identical to HEAD, and a
line-level proof pairs all 845 changed lines with an unchanged code part.
pnpm run lint && pnpm run test (106 files / 2061 tests, per-file 100%
coverage) && pnpm run build all pass.
Merge consecutive short comment lines in tests/** up to the 140-col limit
without touching their text: comment-stripped content, comment text (whitespace
normalised) and line-comment runs are all proven identical per file. This is the
line-count half of the cleanup only; the content pass over tests/** is still
outstanding.
- The two BASELINES entries differed in exactly three fields (id, tag,
session) over ~95 verbatim lines; one baseline() factory now spells the
shared V4 seams once, with the per-line comments kept above each call
(a future line that diverges on a needle outgrows the factory and
inlines its entry instead).
- The identical node fixture factory lived in five specs under two
shapes; both moved to the shared test kit as surfaceNode (cards'
tokens-5 shape) and surfaceNodeAt (assemble/brief's minimal shape).
The supported set is now the two V4-generation lines (0.1.7-rc.2+ and
0.2.0-rc.2+): the manifest's dshReleases, the peer floors (>=0.1.7-rc.2,
cordis ^4.0.4 — both lines vendor 4.0.4), the devDependency pins, the
baseline matrix, the release workflow's tag fetch, and the compatibility
docs.
With every supported line on session format V4, the V3-only paths leave:
the fold reads the tool result's first-class message alone (source.callId
pairing, message.isError — the admission validation refuses any row whose
data.error outlives it); the settings.register host face module is gone
(the Config-form entry schema serves the preferences); the client drops
the settingsScope/settings.plugin.item card seat, the retired sessions.open
jump fallback, the legacy icon spellings, and the settings-dialog leg of
the settings jump; the history page's tool/result mapper reads the V4
message (its V3 wrapper reads were dropping result content on supported
lines); the cache probe rides the 2-arg cachedSnapshot face. The baseline
gate stays: a below-floor harness composes the fallback units and the
upgrade prompt, and an undetectable version still fails open.
Verified: pnpm run lint:fix && pnpm run test && pnpm run build green (1918
tests, 100% per-file coverage); the compat matrix passes against the real
dsh sources at both baseline tags; live on dsh 0.2.0-rc.2 the plugin
composes, the Plugins-page preference card renders and round-trips a
write, the insights warm-up fills the heatmap, and the session jump and
Context tab work end to end.
The three local until-polling copies let the debounced detail updates
land outside act — React warned 19 times per run. They collapse into
one shared act-per-tick until in the kit: timers and promise chains
only fire while a tick's sleep is awaiting, so the updates stay
act-attributed and commit as each scope exits.
The four browser specs that arm the fetch-on-miss retry with a
deliberately failing fetcher silence the production console.warn the
failure legitimately emits, restored by a file-level afterEach.
A default-reporter run now prints zero stderr.
Closes#58: the Context panel hung off two registrations at once (the
conversation tab and the right-Sidebar guide entry), with no way to keep
just one. A new per-user `defaultPlacement` preference — the first row of
the Plugin configuration card — picks who carries the view: the
conversation tab, the right Sidebar, or both (the default, so existing
deployments see no change).
- shared: `DefaultPlacement` vocabulary (`all` | `tab` | `sidebar`) on the
settings namespace; the Host schema gains a loose `defaultPlacement`
field so a stale persisted value degrades to `all`
- client: `placement.ts` mounts each registration through its own factory
and, on a preference flip, disposes exactly what the new value drops
(the harness's own dynamic-mount idiom); `watchSidebarContextTab`
returns its deferred-inject disposer so the sidebar mount can be taken
down and put back; the settings card leads with the placement row
A trackpad swipe past either edge of the trend chart's horizontal scroller
chained into the page and the browser read it as its history gesture, so a
few scrolls in the Context tab could leave the whole app for another page in
the tab's history (back at the left edge, forward at the right).
Two layers, matching what the harness already does for its own horizontal
scrollers: `overscroll-behavior-x: contain` on the chart scroller and the
agent graph's stage stops the chaining (Chromium/Firefox), and overscroll.ts
cancels the horizontal-dominant wheel the scroller cannot consume at either
boundary for WebKit, which still navigates on horizontal overscroll with the
property set (WebKit bug 240183). Vertical-dominant gestures are untouched,
so a wheel over the chart still scrolls the page.
Every client file reached hooks and element types through the central
require seam (src/client/react.ts) and spelled them React.useState /
ReactNS.ReactElement. Import the members directly instead — named value
imports for hooks, inline type-only imports for element types — and let
the bundler own the single require('react'), which is exactly what the
platform module table answers.
This needs JSX off the classic runtime (it required a React identifier
in every tsx scope): tsconfig moves to jsx: react-jsx, so the bundle
sources jsx from 'react/jsx-runtime', already seeded by every supported
harness (verified against the dsh-v0.1.2-rc.1 platform.ts). The bundle
smoke's fake module table gains the specifier to stay a faithful shell
stand-in. h() survives as a local createElement alias at the slot
render-prop seams and the lightbox portal imports createPortal from
react-dom directly.
Verified: the built client.js requires react, react/jsx-runtime, and
react-dom exactly once each; the compat lane (bundle smoke + the
real-baseline matrix) passes against the fresh artifacts; the full gate
stays green with per-file coverage at 100%.
The target-content fetch read the 0.1.2+ gateway history face with
ctx.get('remote.session') and then dereferenced .page on the returned
value. A cordis traced-service proxy read off a fiber that never
declared the service throws on property access ("cannot get property
\"remote.session\" without inject") — the guard around ctx.get alone
cannot catch it, and the exception escapes the Context tab render and
takes the whole web client down.
The remote face is now resolved through the DECLARED inject instead:
apply() registers a ctx.inject(['remote', 'remote.session']) callback
(the dsh idiom — both names together, because the traced remote proxy
resolves .session through the context), binding the page verb into a
slot the fetchers prefer. Both names together stay absent on the
pre-0.1.2 line, where the callback never fires and the legacy
connection face carries the reads. Every service property chain is
additionally re-proven (readKeysOf: remote.session.page and
connection.api.sessions.history degrade at the first throwing getter
instead of ever throwing), matching the no-white-screen contract.
package.json now declares @deepseek-ai/dsh-api-remotes in
dsh.client.inject, so the graph composes the namespace-mounting bundle
before this plugin (skip-safe on 0.1.1, where the row does not exist).
React 18 dev replays a failed render through a fake DOM event; jsdom
reports it as an uncaught window error and vitest forwards it to an
uncaughtException, which no console.error spy can catch. A window error
listener that prevents the default keeps the deliberate throw inside the
test, alongside the spy silencing React's own boundary message.
The Context browser joined full content against the chat conversation
window; when a surface node's seq sat outside it, the fallback paged
blindly backwards through session.loadOlder() (up to 20 pages of 50
messages prepended into the shared chat window) and finally dead-ended
on a static note.
sessions.history already supports seq-anchored pages cut on whole
append-origin message boundaries, so ONE call with beforeSeq: seq + 1
returns exactly the page holding the event whenever the durable log
still has it. The browser now:
- fetches on miss with that single anchored read and maps the raw page
into the node shapes it already renders (new client/historyPage.ts:
user messages, assistant blocks, tool results paired with their
in-page call head, compaction checkpoints with their summary);
- merges fetched nodes under the zero-cost window join (join wins);
- reports honest states instead of one dead end: loading, absent from
the session log (compacted or cleared), failed with a retry button;
- drops the sessions.provide contribution and the MAX_AUTO_PAGES
machinery entirely - the chat scrollback is never mutated again.
Hosts without the connection api keep the static preview-plus-hint
degradation.
The old suite exercised the built lib/ bundle, so v8 remapped almost
nothing (8% src coverage) and every run needed a build first. The new
suite imports src/ directly under two vitest projects (node for
host/shared, jsdom for client), rendering real React 18 trees against
the real dictionaries and ui-primitives, with faithful in-memory
harness faces (cordis inject/effect, locale chain, slots, sessions
provide) instead of plugin mocks.
- 43 fine-grained, stateless, single-module spec files (606 tests)
forked across workers: ~2.5s wall, no build step
- v8 thresholds at 100/100/100/100 per file over src/**
- host specs drive the real projection definitions (init/apply/view)
plus one full cordis + SessionStore + SessionProjectionRegistry
integration; the framework's snapshotJsonValue pins the
projection-cache precondition on every intermediate fold state
- oxlint's src ruleset now covers tests/** as well
- typecheck covers the tests via tsconfig.tests.json