Skip to content

feat(inspector): add linked replay and public demo - #85

Merged
phodal merged 6 commits into
mainfrom
feat/inspector-trace-linked-timeline
Aug 13, 2026
Merged

feat(inspector): add linked replay and public demo#85
phodal merged 6 commits into
mainfrom
feat/inspector-trace-linked-timeline

Conversation

@phodal

@phodal phodal commented Aug 13, 2026

Copy link
Copy Markdown
Member

Summary

  • connect the activity timeline, Session View, and a read-only Replay so reviewers can move from elapsed-time evidence into retained turns and normalized calls
  • make capability navigation and session matching calmer and more accurate while preserving evidence-strength boundaries
  • add a first-class GitHub Pages Inspector tab with a green New badge, deterministic English sample data, and bilingual product/usage documentation
  • keep the hosted sample isolated from local workspaces, Git history, and native coding-agent sessions

Traceability

Implements docs/specs/2026-08-13-public-inspector-demo.md for the public demo. The earlier trace/replay commits retain their existing commit-level rationale and validation evidence.

Validation

  • npm test — 92 files, 1,309 tests
  • focused Inspector coverage — 21 tests
  • npm run pack:verify — 511 npm entries, 533 runtime zip entries
  • cd docs && npm run build — English and Simplified Chinese production builds
  • browser QA — public sample, Session View, Replay, bilingual wrappers, no console errors or page-level horizontal overflow
  • git diff --check

Merge 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.

phodal and others added 6 commits August 13, 2026 15:20
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 phodal changed the title feat(inspector): read a session as one linked, filled trace feat(inspector): add linked replay and public demo Aug 13, 2026
@phodal
phodal marked this pull request as ready for review August 13, 2026 11:19
@phodal
phodal merged commit 8a24d63 into main Aug 13, 2026
4 checks passed
@phodal
phodal deleted the feat/inspector-trace-linked-timeline branch August 13, 2026 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant