Skip to content

Commit df4b5b0

Browse files
phodalcodex
andcommitted
feat(studio): complete retained Session review
Implements docs/specs/2026-08-24-studio-inspector-session-parity.md with ordered Turn evidence, outcome boundaries, filters, Replay navigation, URL state, and responsive Session detail. The review repair also keeps the modal background inert and avoids claiming zero duration when grouped calls have no observed timing. Validated with the Harness Studio 43-file, 266-test suite, the full 40-scenario Playwright suite, and the rebuilt focused Session browser flow. Co-authored-by: Codex (GPT 5.6 Sol) <codex@openai.com>
1 parent c687b54 commit df4b5b0

5 files changed

Lines changed: 704 additions & 91 deletions

File tree

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# Complete retained Session review in Studio
2+
3+
## Traceability
4+
5+
- Spec ID: studio-inspector-session-parity
6+
- Status: Implemented
7+
8+
## Intent
9+
10+
Finish the React-owned Session detail in Harness Studio so `#/sessions` preserves
11+
the read-only review workflow already implemented by the standalone Harness
12+
Inspector workbench. Studio continues to consume `HarnessInspectorReportV1` and
13+
does not execute `workbench.js`; the standalone report remains the interaction
14+
and visual contract.
15+
16+
## Acceptance Scenarios
17+
18+
- **AC-1:** Opening a retained Session renders the same notebook hierarchy as
19+
Inspector: numbered `In` and `Out` rows, an initially collapsed ordered
20+
Process trace, an evidence-bounded Outcome, unplaced evidence, commits outside
21+
observed Turn windows, and one overall Session activity summary.
22+
- **AC-2:** The Session outline provides Turn/evidence navigation, expand and
23+
collapse controls, kind/tool/file filters, and observed Session facts. Tool
24+
steps resolve through the retained call ledger, adjacent calls keep observed
25+
order, and filters update the visible retained-call count.
26+
- **AC-3:** Replay provides Events and Files indexes, previous/next and play/pause
27+
controls, 1x/2x/4x/8x speed selection, a sequence or observed-time rail, and
28+
keyboard J/L/Space navigation without executing or resuming the Session.
29+
- **AC-4:** Opening Session detail creates a navigable Studio state. Close,
30+
Escape, and browser Back return to the workbench and restore focus to the
31+
initiating control; a copied Studio URL reopens the selected Session and
32+
Replay event when the report still contains them.
33+
- **AC-5:** Wide, compact, and narrow layouts have no document-level horizontal
34+
overflow. At narrow width the outline remains reachable, controls retain
35+
visible keyboard focus, and the primary notebook decision path remains clear.
36+
- **AC-6:** Focused model/component and browser tests exercise the behaviors
37+
above against retained ordered messages, tool calls, files, and Replay events.
38+
Browser verification checks console/page errors and screenshots.
39+
40+
## Non-goals
41+
42+
- Changing Inspector discovery, normalization, privacy filtering, correlation,
43+
or `HarnessInspectorReportV1` ownership.
44+
- Executing Replay, resuming a native Session, mutating checkpoints, or writing
45+
back to host evidence stores.
46+
- Removing the compact Catalog & Compare view or the standalone Inspector report.
47+
- Claiming a patch, successful edit, verification result, or causal commit link
48+
when the retained report does not provide that evidence.
49+
50+
## Plan and Tasks
51+
52+
1. Add a pure retained-Session projection seam for ordered Turn calls, commit
53+
placement, unplaced evidence, filter counts, and Replay navigation.
54+
2. Replace the simplified React Session detail with Inspector-compatible Trace,
55+
Outcome, outline, filtering, activity, and Replay components.
56+
3. Synchronize Session/Replay selection with Studio navigation and restore focus
57+
on close without taking ownership from the outer Studio router.
58+
4. Extend focused tests and the Sessions Playwright walkthrough, then run package,
59+
browser, link-graph, preview, and diff checks proportional to the change.
60+
61+
## Test and Review Evidence
62+
63+
- AC-1/AC-2/AC-3: focused model tests and Sessions browser assertions.
64+
- AC-4: browser assertions for open, URL state, Back, Escape, and focus return.
65+
- AC-5: 1440x900, 1024x768, and 390x844 screenshots plus overflow and focus
66+
checks.
67+
- AC-6: console/page error collection, package tests, documentation link graph,
68+
preview health and Canvas module smoke, and `git diff --check`.
69+
- Risk: Studio can accidentally overstate retained evidence. Copy and projections
70+
must preserve missing timestamps, unavailable responses, privacy redaction,
71+
and the read-only boundary used by the standalone workbench.
72+
73+
Implementation evidence (2026-08-24):
74+
75+
- `npm test -- --reporter=dot`: 103 files passed with 1,532 tests passed and one
76+
skipped repository-wide.
77+
- `npm test -w @qoder-ai/harness-studio`: 43 files and 266 tests passed.
78+
- `npm run test:browser -w @qoder-ai/harness-studio`: all 40 Playwright tests
79+
passed. The Sessions flow exercised ordered Process expansion, Outcome,
80+
filters, Replay, URL state, Escape/focus restoration, and 1440x900, 1024x768,
81+
and 390x844 screenshots without document overflow.
82+
- The final focused Sessions Playwright run passed after Replay auto-follow,
83+
restart, legend, and tab-keyboard behavior were added.
84+
- `npx vitest run test/skills-docs/doc-link-graph.test.mjs`: 8 tests passed after
85+
regenerating `docs/better-harness-doc-links.mmd`.
86+
- Live in-app browser review used a 36-call retained Session, exercised Process
87+
expansion, tool filtering, Replay event navigation and URL state, and found no
88+
console warnings or errors. The repository Preview returned `ok` from
89+
`/health`, loaded `/canvas-module.js`, and `git diff --check` passed.

0 commit comments

Comments
 (0)