Skip to content

feat(app): replay UI + report viewer + react refactor#77

Merged
sepehr-safari merged 3 commits into
mainfrom
feat/app-replay-ui
Jul 8, 2026
Merged

feat(app): replay UI + report viewer + react refactor#77
sepehr-safari merged 3 commits into
mainfrom
feat/app-replay-ui

Conversation

@sepehr-safari

Copy link
Copy Markdown
Member

Summary

Adds three view tabs to the Inspector: Inspect, Replay, and Report.

Changes

Replay Tab

  • Play/pause/step-forward/step-back controls
  • Speed selector (0.5x, 1x, 2x, 5x)
  • Scrubbar (range input) for jumping to any event
  • Event payload display during replay
  • Failures-at-this-event highlighting (shows failures associated with the current event)
  • Auto-advance when playing using ReplayEngine from @ocpp-debugkit/toolkit/replay

Report Tab

  • In-app report viewer with format toggle (Markdown / HTML)
  • Markdown: rendered as <pre> with raw report text
  • HTML: rendered in sandboxed iframe with srcDoc (no XSS risk)
  • Uses generateMarkdownReport and generateHtmlReport from @ocpp-debugkit/toolkit/reporter

Export

  • Format selector in header (Markdown / HTML)
  • Export button downloads report in selected format

Refactor

  • Extracted ReplayView component to avoid TypeScript null-narrowing issues in JSX
  • E2E fix: scope FAILED_AUTHORIZATION locator to [data-testid="failure-summary"] with .first()

E2E Tests (tests/replay.spec.ts)

  • Load scenario → switch to replay → step forward/back → verify event count
  • Verify event payload appears when stepping
  • Verify report view shows HTML iframe

Verification

  • pnpm test — 295/295 unit tests pass
  • pnpm build — clean (toolkit + web)
  • pnpm lint — clean
  • pnpm typecheck — clean
  • pnpm format:check — clean

Closes #64

Add three view tabs to the inspector: Inspect, Replay, and Report.

- Inspect: existing timeline + message inspector view (unchanged)
- Replay: play/pause/step/scrubbar with speed selector, event payload
  display, and failures-at-this-event highlighting
- Report: in-app report viewer with Markdown (pre) and HTML (iframe with
  srcdoc) formats, toggleable via format selector

Refactor: extract ReplayView into a separate component to avoid
TypeScript null-narrowing issues in JSX. Add ReplayEngine integration
with auto-advance when playing.

Add Playwright E2E tests for replay UI (step forward/back, payload
display) and report viewer (HTML iframe rendering).

Also fix E2E test for failed-auth: scope FAILED_AUTHORIZATION locator
to failure-summary section with .first() (multiple failures in fixture).

Closes #64
@vercel

vercel Bot commented Jul 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ocpp-debugkit-web Ready Ready Preview, Comment Jul 8, 2026 7:27pm

@sepehr-safari sepehr-safari merged commit 09d3f1f into main Jul 8, 2026
4 checks passed
@sepehr-safari sepehr-safari deleted the feat/app-replay-ui branch July 8, 2026 19:29
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.

feat(app): replay UI + report viewer + react refactor

1 participant