Skip to content

feat(desktop): add hot renderer CPU diagnostics#625

Open
huntharo wants to merge 1 commit into
mainfrom
feat/desktop-hot-cpu-diagnostics
Open

feat(desktop): add hot renderer CPU diagnostics#625
huntharo wants to merge 1 commit into
mainfrom
feat/desktop-hot-cpu-diagnostics

Conversation

@huntharo
Copy link
Copy Markdown
Contributor

@huntharo huntharo commented Jun 2, 2026

Summary

Released builds can now turn on hot renderer CPU profiling from Settings, so renderer CPU spikes can be captured in the app instance that is actually misbehaving instead of requiring a terminal-launched dev session.

The monitor samples Electron process metrics and records a short Chrome .cpuprofile after sustained hot renderer CPU, then detaches. Artifacts are written under the active PwrAgent profile's state/diagnostics directory so packaged apps have a writable, profile-scoped output location. The env-driven dev workflow remains available through profile:hot-cpu.

Test Plan

  • pnpm test apps/desktop/src/main/__tests__/app-bootstrap.test.ts apps/desktop/src/main/__tests__/index.test.ts apps/desktop/src/main/__tests__/desktop-settings-patch-translator.test.ts apps/desktop/src/main/__tests__/desktop-settings-service.test.ts apps/desktop/src/renderer/src/features/settings/__tests__/settings-screen.test.tsx apps/desktop/src/main/__tests__/renderer-hot-cpu-profiler.test.ts packages/shared/src/contracts/__tests__/settings.test.ts
  • pnpm --filter @pwragent/desktop typecheck
  • pnpm --filter @pwragent/shared typecheck

Compound Engineering
GPT-5

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