feat(inspector): add linked replay and public demo - #85
Merged
Conversation
The wall-clock activity chart lived only in the workbench lane behind a collapsed disclosure, while Session View was a vertical Turn list with no time axis. The two representations never shared a screen, so a reviewer could not jump from a busy stretch to the calls under it, and a session with no dialogue Turn showed "0 tool calls" on every Turn while its whole trace sat in an unordered page-tail bucket. Move the same chart into a sticky, collapsible strip at the top of Session View (reusing activityChartMarkup and the [data-activity-chart] wiring, so it shares the per-session zoom state) and link it to the list: - click a bar to scroll the list to those calls; multi-call bars also zoom - order the untied-calls bucket by observed startedAt and relabel it - open every Turn's tool calls by default on short sessions (<=12 Turns); keep identical-row runs collapsed so the default stays concise - hide run bands with their tool filter and recompute the sidebar tool total to what survives the current filters, regardless of disclosure - clarify the idle legend: no observed call, not a user wait No new data is projected; reuses startedAt and Turn startMs/endMs. Row virtualization and a node-link canvas remain non-goals. npm test 1305/1305, pack:verify 508/530. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add a gradient Better Harness logo (assets/logo.svg) and surface it in the README header. Update the docs favicon to the same gradient mark so branding stays consistent across the repo and documentation site. Co-authored-by: QoderAI (Qwen 3.8 Max) <qoder_ai@qoder.com>
The lanes plot the instant a call ran, so the chart only ever drew the moments a tool was executing. Measured on a real local report, the 1178 gaps between consecutive calls have a median of 6.6s and a p90 of 29.7s, while the idle threshold that produces any shading is 45s -- 1113 of those gaps (94.5%) had no visual representation at all. On one 2.2h session the observed tool time totals 14m, so the chart was drawing 21% of the trace and leaving 79% as blank canvas. Add a ribbon above the action lanes that fills the whole domain: observed calls are painted over a continuous band, so time not spent inside a tool becomes a visible share of the trace. Blocks reuse familyColor and carry the same selection attributes as lane marks, so hover, focus, click and the Session View list linking all work without a second code path. The bare band is labelled unattributed -- model work or waiting -- never a model turn: projectDialogue keeps note text but drops the note timestamp, so the host observed when tools ran, not when the model worked. The ribbon is omitted on the call-order fallback, where spacing would be an artefact of ordinal position rather than elapsed time. npm test 1305/1305. Verified in a browser on a real report: 19 of 19 charts render the ribbon, clicking a block selects the call and scrolls the Session View list to it, no console errors. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Address three reviewer-reported workbench issues: - The capability tree now opens fully expanded so every declared node is visible on load instead of collapsing to the scoped path. - Clicking a capability node only navigates scope; it no longer sets the evidence selection, so the detail header stays unhighlighted until the reviewer clicks a real object in the workbench. - Add "Open detail" and "Open session" affordances inside the expanded normalized-actions view. Also fix a matchTokens operator-precedence bug where `.match(...) ?? []` made the stop-word .filter() run on the empty fallback array. Generic terms like harness/project/session leaked into the story-to-session overlap score, so candidateSessionForStory frequently linked the wrong session. Wrapping the match/fallback in parentheses restores the filter. Validated with the inspector report tests and a browser check of the rendered workbench. Co-authored-by: QoderAI (Qwen 3.8 Max) <qoder_ai@qoder.com>
Project each retained session into a read-only SessionReplay model (prompts, intermediate responses, tool calls, and directly linked commits) with explicit observed/turn-boundary/sequence-only timing bases, and render Trace/Replay tabs, an event/file index, a compact timeline, and playback controls in Session View. Also fixes six legibility defects found by deep-linking a mid-session event: keep the current event row in view inside the index's own scroller, use a stronger non-color selection cue, track the index column to layout width so it never stacks under the sticky transport, flag a clipped projection body as an Excerpt, add a timeline type legend, collapse duplicated position and timing text to one Event N / total label, and lock the root scroller while the overlay is open. Validated with npx vitest run test/reporting/harness-inspector.test.mjs (19) and full npm test (1307), plus in-browser replay against a real multi-hour local session with no console or page errors. Spec: docs/specs/2026-08-13-inspector-session-replay.md Co-authored-by: QoderAI (Qwen 3.8 Max) <qoder_ai@qoder.com>
Add a first-class Inspector tab with a green New badge, a deterministic English Workbench sample, evidence-bounded product guidance, and bilingual wrapper documentation. Implements docs/specs/2026-08-13-public-inspector-demo.md. Validated with 21 focused Inspector tests, the 1,309-test full suite, package verification, bilingual Docusaurus builds, and browser checks of Session View, Replay, console errors, and page overflow. Co-authored-by: Codex (GPT 5.6 Sol) <codex@openai.com>
phodal
marked this pull request as ready for review
August 13, 2026 11:19
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Traceability
Implements
docs/specs/2026-08-13-public-inspector-demo.mdfor the public demo. The earlier trace/replay commits retain their existing commit-level rationale and validation evidence.Validation
npm test— 92 files, 1,309 testsnpm run pack:verify— 511 npm entries, 533 runtime zip entriescd docs && npm run build— English and Simplified Chinese production buildsgit diff --checkMerge gate
Merge only after the exact PR head passes Linux Node 22.20.0, macOS Node 22.20.0, Windows Node 22.20.0, and Linux Node 24.x.