Skip to content

Add performance pressure diagnostics / 新增性能卡顿诊断上报#4322

Open
SivanCola wants to merge 3 commits into
main-v2from
feature/performance-pressure-reporting
Open

Add performance pressure diagnostics / 新增性能卡顿诊断上报#4322
SivanCola wants to merge 3 commits into
main-v2from
feature/performance-pressure-reporting

Conversation

@SivanCola

@SivanCola SivanCola commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator

Follow-up to #4285.
Related: #4318 addresses one known streaming UI jank path; this PR adds diagnostics for future high-resource or responsiveness issues.

Summary

  • Add a user-initiated performance-pressure report prompt when the desktop observes long tasks, event-loop lag, or high JS heap pressure.
  • Capture coarse diagnostic context such as timing, heap usage, visibility, network state, recent breadcrumbs, app version, and OS, then route it through the existing report scrubber and crash-report pipeline as kind: performance.
  • Allow the crash-report Worker and dashboard to ingest and group performance diagnostics without a database schema migration.

Cache behavior

  • Does not change system prompts, tool schemas, tool lists, provider request serialization, compaction behavior, or model-visible context prefixes.

CI follow-up

  • Fixed the desktop CI frontend build failure by replacing the calculated z-index with a named --z-performance-report-prompt token accepted by the CSS z-index guard.

Verification

  • pnpm --dir desktop/frontend build
  • pnpm --dir desktop/frontend exec tsx src/__tests__/crash-reporting.test.ts
  • (cd desktop && go test . -run 'TestCrashReport|TestPostCrashReport|TestScrub')
  • npm --prefix workers/crash-report run typecheck
  • git diff --check

@SivanCola SivanCola requested a review from esengine as a code owner June 13, 2026 18:11
@github-actions github-actions Bot added v2 Go rewrite (1.x) — main-v2 branch, active development desktop Wails desktop app (desktop/**) labels Jun 13, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0234aabf38

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread desktop/frontend/src/lib/crash.ts
Comment thread desktop/frontend/src/lib/crash.ts
@SivanCola

Copy link
Copy Markdown
Collaborator Author

approve

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

desktop Wails desktop app (desktop/**) v2 Go rewrite (1.x) — main-v2 branch, active development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant