Skip to content

feat: add one-click diagnostics bundle#45

Closed
elliotllliu wants to merge 1 commit intoTianyiDataScience:mainfrom
elliotllliu:feat/diagnostics-bundle
Closed

feat: add one-click diagnostics bundle#45
elliotllliu wants to merge 1 commit intoTianyiDataScience:mainfrom
elliotllliu:feat/diagnostics-bundle

Conversation

@elliotllliu
Copy link
Copy Markdown
Contributor

Summary

Closes #41

Adds a one-click diagnostics bundle for startup and connection failure triage.

Collected Information

Category Data
App Name, version, git commit hash
Runtime Node.js version, OS, platform, arch, hostname, CPU count, memory
Gateway Reachable status, endpoint URL, PID, runtime status
Token Scope summary (redacted — only shows presence, not actual values)
OpenClaw CLI version

Access Methods

  • GET /api/diagnostics — full JSON bundle
  • GET /api/diagnostics?format=text — human-readable text report
  • Settings page — new 'Diagnostics' card with 'Download JSON' and 'View as text' buttons

Files

  • src/runtime/diagnostics-bundle.ts — new module: collectDiagnosticsBundle(), formatDiagnosticsText()
  • src/ui/server.ts — import, API route, settings UI section

Security

Token information is always redacted — only presence/absence is reported, never actual token values.

Add a diagnostics collection system that gathers:
- App version + git commit hash
- OS, Node.js, CPU, memory info
- Gateway connectivity status + endpoint + PID
- Token scope summary (redacted for security)
- OpenClaw CLI version

Available via:
- GET /api/diagnostics — JSON format
- GET /api/diagnostics?format=text — human-readable text
- Settings page 'Diagnostics' section with download buttons

Helps reduce back-and-forth in issue triage and enables
users to self-diagnose startup/connection failures.

Closes TianyiDataScience#41
@TianyiDataScience
Copy link
Copy Markdown
Owner

谢谢这条 PR,方向是很对的。

我这边已经把等价而且覆盖面更完整的一版诊断包通过 8f866ad 合进 main 了,#41 也已经自动关闭。为了避免两条实现继续并行漂移,我先把这个 PR 按“主干已覆盖”关掉。

如果你还想继续补诊断字段或下载形态,非常欢迎基于最新 main 再开一个更小的 follow-up。

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.

Proposal: operator-friendly diagnostics bundle for startup failures

2 participants