Skip to content

feat: Perfetto run timeline alongside the merged report - #213

Merged
Xotabu4 merged 2 commits into
CyborgTests:mainfrom
Mkots:feat/212-perfetto-timeline
Oct 25, 2026
Merged

Xotabu4 merged 2 commits into
CyborgTests:mainfrom
Mkots:feat/212-perfetto-timeline

Conversation

@Mkots

@Mkots Mkots commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

Closes #212

What

  • Report generation now also writes a Perfetto trace (perfetto.json.gz) next to index.html, using Playwright's built-in perfetto reporter.
  • The report page gets a Timeline button that fetches the trace with the user's session and hands it to ui.perfetto.dev through the documented postMessage handshake. No public URL or CORS is needed, so it works with auth enabled.

Details

  • The perfetto reporter first shipped in Playwright 1.63, so it is only enabled when the CLI used for the merge is >= 1.63 (supportsPerfetto in pw-cache.ts). The bundled @playwright/test range is raised to ^1.63.0 in a separate commit so the default CLI always has it.
  • merge-reports honours only the last --reporter flag, so reporters are now passed as one comma-separated value. Without this, adding perfetto would have dropped the HTML report. As a side effect, configured custom reporters no longer replace html.
  • The button is shown only when the trace exists (HEAD probe), so reports generated earlier or with Playwright < 1.63 are unaffected.
  • The opener page must not be served with Cross-Origin-Opener-Policy: same-origin. The server does not set it.

Verification

  • Backend: lint, typecheck and tests pass (new unit test for supportsPerfetto).
  • Frontend: lint, typecheck and build:vite pass.
  • Manually ran playwright merge-reports --reporter html,perfetto on a real blob report with Playwright 1.64: both index.html and a valid perfetto.json.gz are produced.
  • Not verified in a browser: the Timeline button and the Perfetto UI handshake.

🤖 Generated with Claude Code

Mkots and others added 2 commits October 10, 2026 13:02
The bundled merge-reports CLI needs to be at least 1.63 to have the
built-in perfetto reporter.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…line button

Closes CyborgTests#212

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@Xotabu4

Xotabu4 commented Oct 25, 2026

Copy link
Copy Markdown
Collaborator

@Mkots thanks for contribution!

@Xotabu4
Xotabu4 merged commit 274a847 into CyborgTests:main Oct 25, 2026
4 checks passed
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.

Run-level timeline: generate a Perfetto trace alongside the merged report

2 participants