Skip to content

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

Merged
esengine merged 3 commits into
main-v2from
feature/performance-pressure-reporting
Jun 14, 2026
Merged

Add performance pressure diagnostics / 新增性能卡顿诊断上报#4322
esengine merged 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

@esengine esengine merged commit 72d54e3 into main-v2 Jun 14, 2026
13 checks passed
@esengine esengine deleted the feature/performance-pressure-reporting branch June 14, 2026 12:41
esengine pushed a commit that referenced this pull request Jun 14, 2026
)

Add a user-triggered bot connection diagnostic report on top of the #4322 crash/performance pipeline. Per-connection metadata is reduced to booleans/counts/enums (no remote IDs, session IDs, workspace paths, or secret env names), and free-text summaries run through scrubSensitiveText (now also redacting bare *_SECRET/*_TOKEN env identifiers) plus the Go-side report scrubber. The crash Worker accepts the new `bot` kind.

Worker must be deployed before the desktop release that sends bot reports (old kind enum rejects them).
esengine pushed a commit that referenced this pull request Jun 14, 2026
#4325)

Add a header EN/中文 language switcher (localStorage), chart axis ticks/gridlines/hover targets, grouped status+facet filter chips, row-level clickable report cards, and a compact group-detail page with collapsible samples and copy actions. All report-derived fields stay esc()-escaped. Adopts the Report/诊断 naming from #4322.
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.

2 participants