Skip to content

feat(desktop): copy diagnostics from error toasts - #2540

Merged
M4n5ter merged 1 commit into
mainfrom
feat/desktop-error-diagnostics-copy
Aug 9, 2026
Merged

feat(desktop): copy diagnostics from error toasts#2540
M4n5ter merged 1 commit into
mainfrom
feat/desktop-error-diagnostics-copy

Conversation

@M4n5ter

Copy link
Copy Markdown
Member
English

Summary

  • add a Copy diagnostics action to every Desktop error toast while preserving any existing product action
  • route the top-level renderer crash surface through the same unified diagnostic report
  • collect bounded, redacted Desktop main-process logs, application/build metadata, renderer context, and workspace information
  • add a closed Runtime Host diagnostics operation for Host lifecycle, process environment, protocol compatibility, activity, and bounded logs
  • keep the copy IPC owned by the Desktop process so client diagnostics remain available while Runtime Host is disconnected or reconnecting
  • bound long error input instead of rejecting the report, and redact Node-inspected Authorization and Proxy-Authorization values before they reach the clipboard

Verification

  • npm run test:dist --workspace @maka/core — 808 tests passed
  • npm run test --workspace @maka/runtime-host — 774 tests passed
  • npm run test:dist --workspace @maka/desktop — 1,129 tests passed
  • post-rebase focused diagnostics, redaction, and Runtime Host protocol regressions — 53 tests passed
  • npm run typecheck
  • npm run lint
  • npm run format:check
  • git diff --check

Checklist

  • Tests cover the user-visible and protocol boundaries without timeout-based waits
  • Lint, format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes — error surfaces can copy a unified Desktop and Runtime Host diagnostic report
  • No
中文

概要

  • 为所有 Desktop 错误 Toast 增加“复制诊断信息”,并保留原有产品操作按钮
  • 让顶层 Renderer 崩溃页面复用同一份统一诊断报告
  • 收集经过边界限制和脱敏的 Desktop 主进程日志、应用与构建信息、Renderer 上下文及工作区信息
  • 增加封闭的 Runtime Host 诊断操作,提供 Host 生命周期、进程环境、协议兼容性、活动状态与有界日志
  • 让复制诊断 IPC 由 Desktop 进程长期持有,因此 Runtime Host 断线或重连期间仍可复制客户端诊断
  • 对过长错误输入进行安全截断而不是拒绝整份报告,并在写入剪贴板前脱敏 Node inspect 形式的 Authorization 与 Proxy-Authorization

验证

  • npm run test:dist --workspace @maka/core — 808 项测试通过
  • npm run test --workspace @maka/runtime-host — 774 项测试通过
  • npm run test:dist --workspace @maka/desktop — 1,129 项测试通过
  • rebase 后诊断、脱敏与 Runtime Host 协议聚焦回归 — 53 项测试通过
  • npm run typecheck
  • npm run lint
  • npm run format:check
  • git diff --check

检查清单

  • 测试覆盖用户可见行为与协议边界,且不依赖 timeout wait
  • lint、format、typecheck 与受影响测试套件均在本地通过

此 PR 是否包含行为变化?

  • 是 — 错误界面现在可以复制统一的 Desktop 与 Runtime Host 诊断报告

@M4n5ter
M4n5ter merged commit 975ddef into mainAug 9, 2026
13 checks passed
@M4n5ter
M4n5ter deleted the feat/desktop-error-diagnostics-copy branch August 9, 2026 02:21
Sign up for freeto 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

@M4n5ter