Skip to content

fix(debug): include gui.log (dashboard/TUI/pty/websocket) in hermes debug share - #48981

Merged
teknium1 merged 1 commit into
mainfrom
fix/debug-share-gui-log
Jun 19, 2026
Merged

teknium1 merged 1 commit into
mainfrom
fix/debug-share-gui-log

Conversation

@kshitijk4poor

@kshitijk4poor kshitijk4poor commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Summary

hermes debug share now captures gui.log — the surface the dashboard, TUI-over-PTY bridge, and websocket layer (hermes_cli.web_server / hermes_cli.pty_bridge / tui_gateway) actually write to. Previously a user reporting a dashboard or TUI/desktop bug shared zero breadcrumbs from the broken surface, even though gui.log was already in LOG_FILES and surfaced by hermes logs gui.

Salvage of #48981 by @kshitijk4poor, cherry-picked onto current main with authorship preserved.

Changes

  • hermes_cli/debug.py: wire gui through all four share surfaces — _capture_default_log_snapshots (redacted snapshot), collect_debug_report (tail block), build_debug_share (full-log dump header + redaction banner + upload loop), run_debug_share --local branch (full text + print block); name gui.log in both _PRIVACY_NOTICE bullets.
  • tests/hermes_cli/test_debug.py: new test_report_includes_gui_log; four→five-pastes upload test.
  • website/docs/reference/cli-commands.md: debug share description now lists GUI/dashboard logs.

Redaction is inherited for free — the gui snapshot goes through the same _capture_log_snapshot(..., redact=redact) boundary as every other log.

Validation

  • scripts/run_tests.sh tests/hermes_cli/test_debug.py — 75 passed.
  • E2E hermes debug share --local against a temp HERMES_HOME: gui.log tail block, FULL gui.log section, and --- full gui.log --- header all present; a seeded vendor-prefixed key in gui.log was masked (raw token absent).

Infographic

debug-share-gui-log

@github-actions

github-actions Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

🔎 Lint report: fix/debug-share-gui-log vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 11059 on HEAD, 11059 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 5790 pre-existing issues carried over.

Diagnostics are surfaced as warnings — this check never fails the build.

@alt-glitch alt-glitch added type/feature New feature or request comp/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have labels Jun 19, 2026
…ebug share

gui.log was registered in hermes_cli/logs.py::LOG_FILES (and surfaced by
`hermes logs gui`) but was never wired into `hermes debug share`. The share
report captured agent/errors/gateway/desktop tails plus full agent/gateway/
desktop logs — but nothing from gui.log, the surface the dashboard, TUI-over-
PTY bridge, and websocket layer (hermes_cli.web_server / pty_bridge /
tui_gateway) actually write to. A user reporting a dashboard or TUI bug shared
zero breadcrumbs from the broken surface.

Wire gui.log through all three share surfaces, matching the existing pattern:
- _capture_default_log_snapshots(): capture the gui snapshot (redacted like the rest)
- collect_debug_report(): add the gui.log summary tail block
- build_debug_share(): pull gui full_text, prepend dump header + redaction banner, add to the upload loop
- run_debug_share() --local branch: same, plus the local print block
- _PRIVACY_NOTICE: name gui.log in both bullets

Redaction is inherited for free — the gui snapshot goes through the same
_capture_log_snapshot(..., redact=redact) path, so secrets are scrubbed in
both the tail and full text (verified E2E: seeded key masked by default,
passes through under --no-redact, raw token never leaks).

Tests: seed gui.log in the fixture, add test_report_includes_gui_log, and bump
the upload-count tripwire 4->5 (test_share_uploads_five_pastes).
@teknium1
teknium1 force-pushed the fix/debug-share-gui-log branch from e2fff57 to 0b61ab5 Compare June 19, 2026 13:44
@teknium1
teknium1 merged commit 01a6f11 into main Jun 19, 2026
35 checks passed
@teknium1
teknium1 deleted the fix/debug-share-gui-log branch June 19, 2026 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants