Skip to content

Conversation

@ammar-agent
Copy link
Collaborator

Summary

Automate workspace-open performance profiling in e2e so runs produce repeatable Chrome/Electron and React artifacts without manual DevTools interaction.

Background

We needed repeatable perf coverage for large-history workspace load flows, plus machine-readable artifacts that can run in CI/nightly and be compared over time.

Implementation

  • Added reusable CDP profiling helper (tests/e2e/utils/perfProfile.ts) that captures:
    • Chrome trace
    • CPU profile
    • metrics + heap usage
    • perf-summary.json
  • Added deterministic history fixture profiles (tests/e2e/utils/historyFixture.ts):
    • small, medium, large, tool-heavy, reasoning-heavy
  • Added perf scenario (tests/e2e/scenarios/perf.workspaceOpen.spec.ts) that:
    • seeds a selected profile
    • opens workspace
    • writes artifacts under artifacts/perf/**
    • verifies React profiler data exists for interesting render paths
  • Added React profiling collector (src/browser/utils/perf/reactProfileCollector.ts) and preload/browser flag plumbing (MUX_PROFILE_REACT) so e2e can collect React render data.
  • Instrumented ChatPane with perf markers for key render paths:
    • chat-pane
    • chat-pane.header
    • chat-pane.transcript
    • chat-pane.input
  • Added Make target:
    • make test-e2e-perf
  • Added manual/scheduled workflow:
    • .github/workflows/perf-profiles.yml

Validation

  • make fmt
  • make typecheck
  • make lint
  • make static-check
  • MUX_E2E_PERF_PROFILES=small xvfb-run -a make test-e2e-perf
    • verified pass and confirmed React profile includes all render-path IDs above.

Risks

Low-to-moderate. Changes are mostly test/perf infrastructure. Runtime impact is gated behind window.api.enableReactPerfProfile / MUX_PROFILE_REACT, so normal user flows should remain unaffected.


Generated with mux • Model: openai:gpt-5.3-codex • Thinking: xhigh • Cost: $0.00

Add automated CDP + React render profiling for workspace-open e2e perf scenarios.

- add deterministic history profile fixtures (small/medium/large/tool-heavy/reasoning-heavy)
- add reusable Chrome trace/CPU/metrics/heap artifact capture helpers
- add perf workspace-open scenario with artifact output + assertions
- add React render-path profiling for chat-pane/header/transcript/input
- add Makefile target and scheduled/manual workflow for perf collection

---

_Generated with `mux` • Model: `openai:gpt-5.3-codex` • Thinking: `xhigh` • Cost: `$0.00`_

<!-- mux-attribution: model=openai:gpt-5.3-codex thinking=xhigh costs=0.00 -->
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