Skip to content

PRO-3005: (1/2) record each browser step's page, waits and picture - #18

Merged
mrprkr merged 3 commits into
mainfrom
claude/pro-3005-journey-steps
Nov 6, 2026
Merged

mrprkr merged 3 commits into
mainfrom
claude/pro-3005-journey-steps

Conversation

@mrprkr

@mrprkr mrprkr commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Part of PRO-3005. This is the bottom of a two-PR stack:

  1. This PR: per-step page, waits and pictures in activity.jsonl (targets main)
  2. PRO-3005: (2/2) local interviews with an in-session UMUX questionnaire #19: local interviews with UMUX (targets this branch)
  • Journey steps. Each browser step's line in activity.jsonl now carries:
    • ms: how long the step took.
    • page: { url, title } after the step. The URL has no query or fragment, since a redirect can carry a sign-in code and the file is committed.
    • shot: a small JPEG of the viewport under steps/0001.jpg and on. Chrome scales the capture itself (CDP clip.scale, about 480 px wide, quality 60), so each picture costs tens of kilobytes. Steps that only read the page keep no picture, and neither do type or form_input, so a typed value never reaches a committed image.
  • Waits. driver.ts times navigations (goto, back, forward, newPage) and load states, and the step records them as waits: [{ kind: "navigation" | "load", ms }]. Fixed pauses are left out (the wait tool, the toolset's settle delay), so the longest wait is the product's.
  • Format. run.json gains "revision": 2 and keeps "format": "stuntdouble.run/1", so earlier viewers still read it (RunSchema is not strict, so they drop the new key). A file with no revision is revision 1. Each field is best effort: a closed tab or a hung capture (2 s timeout) leaves the field out and never fails the step.
  • Other changes.
    • A resumed run numbers its pictures on from the highest one, so it never writes over a picture.
    • The viewer serves .jpg and caches steps/ like shots/.
    • Docs are in docs/files-and-safety.md, plus a minor changeset.

The Studio run page in #17 can build its journey rail from these fields. This PR does not change the viewer UI. Once the stack ships to npm, the stuntdouble@x.y.z pin moves in stunt-double/stuntdouble-mcp.

Could not verify

  • How the pictures and waits look in Studio's run page. That needs feat: lead the run page with highlights, and add journey and screenshot tabs #17 and a person in a real browser.
  • Thumbnail sizes on real product pages. The headless end-to-end fixture stays well under 100 KB per picture.
  • The a missing file says what exists, or how to make one test fails in this container because it runs as root, so chmod does not block the read. It fails the same way on main and passes in CI.

Factory-Run: https://factory.stuntdouble.io/runs/01M6PZ03Y77PXA3Q4ME62QDAX3

Checklist

  • pnpm format:check, pnpm lint, pnpm type-check, pnpm test and pnpm build pass locally (except the root-only test above, which fails on main too)
  • Tests cover the change (unit test with a fake driver; the headless Chrome end-to-end test checks real waits and a real JPEG)
  • A changeset is included (pnpm changeset) if what stuntdouble does changes
  • Every commit is signed off (git commit -s), per the DCO

…jsonl

A browser step's activity line now carries ms, page (url without its query,
and title), waits (navigations and load states the driver timed) and, for a
step that moves the page without typing, a small CDP JPEG under steps/.
run.json gains revision 2 and keeps format stuntdouble.run/1, so earlier
viewers still read it.

Part of PRO-3005.

Signed-off-by: Claude <noreply@anthropic.com>
@mrprkr
mrprkr marked this pull request as ready for review November 5, 2026 23:10
An interview guide in .stuntdouble/interviews/<slug>.json (sections of
questions and tasks, usability_scale umux by default) is answered in
character in the person's own agent session through four new tools:
start_interview, answer_item, rate_usability and finish_interview. Each
session is written to interview-runs/<id>/interview.json, out of runs/,
with only the ratings stored; the score comes from the cloud's own UMUX
code, vendored at src/vendor/usability/. The viewer serves sessions at
/api/interview-runs, and open_ui lists the latest.

LocalSession now holds a checklist run or an interview, sharing the
browser launch, step records, stop and interrupted marking.

Part of PRO-3005.

Signed-off-by: Claude <noreply@anthropic.com>
@mrprkr mrprkr changed the title PRO-3005: record each browser step's page, waits and picture PRO-3005: (1/2) record each browser step's page, waits and picture Nov 6, 2026
@mrprkr
mrprkr merged commit 9d684c2 into main Nov 6, 2026
3 checks passed
@mrprkr
mrprkr deleted the claude/pro-3005-journey-steps branch November 6, 2026 17:26
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.

2 participants