Skip to content

feat(desktop): copy diagnostics on demand - #3427

Draft
M4n5ter wants to merge 8 commits into
mainfrom
feat/on-demand-diagnostics
Draft

feat(desktop): copy diagnostics on demand#3427
M4n5ter wants to merge 8 commits into
mainfrom
feat/on-demand-diagnostics

Conversation

@M4n5ter

@M4n5ter M4n5ter commented Aug 21, 2026

Copy link
Copy Markdown
Member

Fixes #3425

English

Summary

  • Upgrade the existing environment-summary actions in About and the command palette to copy a complete diagnostic report on demand.
  • Reuse the bounded, redacted Desktop and Runtime Host diagnostic pipeline already used by error surfaces.
  • Keep Desktop diagnostics available while About metadata is loading or unavailable and when the active Runtime Host is unavailable; reports remain clipboard-only and are never uploaded automatically.

Verification

  • npm run lint
  • npm run format:check
  • npm --workspace @maka/desktop run typecheck
  • npm --workspace @maka/desktop run test:dist — 1027 passed
  • node --test apps/desktop/dist/main/tests/about-settings-page.test.js apps/desktop/dist/main/tests/main-process-diagnostics.test.js — 10 passed

AI use

Select exactly one:

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope: Codex assisted with implementation, tests, review, and pull request drafting; the human contributor remains responsible for the change.

Checklist

  • Tests cover the change and fail without it
  • Lint, format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No
中文

概要

  • 将“关于”页和命令面板中原有的环境信息复制入口升级为可随时主动复制完整诊断报告。
  • 复用错误界面已经使用的有界、脱敏 Desktop 与 Runtime Host 诊断链路。
  • 在“关于”元数据加载中或不可用,以及当前 Runtime Host 不可用时,仍可复制 Desktop 侧诊断;报告只写入剪贴板,不会自动上传。

验证

  • npm run lint
  • npm run format:check
  • npm --workspace @maka/desktop run typecheck
  • npm --workspace @maka/desktop run test:dist — 1027 项通过
  • node --test apps/desktop/dist/main/tests/about-settings-page.test.js apps/desktop/dist/main/tests/main-process-diagnostics.test.js — 10 项通过

AI 使用

Codex 辅助了实现、测试、审查和 PR 文案;贡献者本人仍对该变更负责。AI 使用选项已在英文部分勾选。

检查清单

  • 测试覆盖该变更,并会在缺少实现时失败。
  • lint、format、typecheck 与受影响测试均已在本地通过。
  • 本 PR 包含用户可见的行为变更,已在概要中说明。

@M4n5ter
M4n5ter force-pushed the feat/on-demand-diagnostics branch from 3d6e3c9 to 16bd855 Compare August 21, 2026 15:25
Promote the environment-summary action into a manual diagnostic capture that reuses the bounded, redacted Desktop and Runtime Host report pipeline. Manual capture remains available when no Runtime Host or About metadata is available and writes only to the system clipboard.

Generated-by: Codex
About metadata reads can remain pending while the Runtime Host reconnects. Render the Host-independent diagnostic action alongside the loading skeleton and cover that state with a server-rendered behavior test.

Generated-by: Codex
Command-palette captures now use the Runtime Host that owns the visible task, without falling back to the default Host when that target is unavailable. The About page also keeps its diagnostic action outside metadata-state branching so every state exposes the same recovery path.

Generated-by: Codex
Resolve manual diagnostic targets at the preload authority boundary so existing tasks and new-task profiles cannot silently fall back to an unrelated Runtime Host. Let IPC rejection remain the single clipboard failure channel and keep renderer environment metadata owned by preload.

Generated-by: Codex
Route default and task diagnostic intent independently from concrete Host scope so Host outages still yield Desktop evidence without falling back to another Host. Keep async toast actions visible when copying fails, and make scope the only concrete Host authority.

Generated-by: Codex
Attach stable session or profile context when task-scoped errors are surfaced, so copying diagnostics still selects the owning Host before an execution event exists. Keep turn metadata as optional evidence instead of using it as Host authority.

Generated-by: Codex
Propagate the session or Runtime Host profile that actually owned each failed operation into manual diagnostics. Keep client-only validation, clipboard failures, and aggregate errors free of misleading Host authority, and preserve the first failing session when reporting multi-session purges.\n\nGenerated-by: Codex
Distinguish renderer-only failures from default-Host captures, carry the selected Settings Host into diagnostic actions, and bound execution evidence reads so copying always settles. Keep purge failure details and their owning Session in one value to prevent mismatched reports.

Generated-by: Codex
@M4n5ter
M4n5ter force-pushed the feat/on-demand-diagnostics branch from 16bd855 to 8a291c5 Compare August 21, 2026 15:53
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.

feat(desktop): allow users to copy diagnostics on demand

1 participant