Skip to content

fix: handle terminal control characters and sanitize TUI output#14

Merged
linletian merged 1 commit intodevelopfrom
fix/top-cli-exited-abnormal-char
Mar 11, 2026
Merged

fix: handle terminal control characters and sanitize TUI output#14
linletian merged 1 commit intodevelopfrom
fix/top-cli-exited-abnormal-char

Conversation

@linletian
Copy link
Owner

Summary

  • Add Ctrl+C/Z/\ support in SendInput to properly signal running processes
  • Remove terminal control sequence remnants from log output (e.g., mouse events from TUI programs like top, cursor position reports)
  • Add unit tests for control sequence redaction

Problem

  1. Terminal control characters (Ctrl+C, etc.) were not being processed correctly
  2. TUI programs like top produce escape sequences that pollute log files

Test plan

  • Unit tests pass (go test ./internal/redact/...)
  • Build succeeds (go build ./...)
  • Verify Ctrl+C stops running instance via Web TTY

- Add Ctrl+C/Z/\ support in SendInput to properly signal processes
- Remove terminal control sequence remnants from log output (e.g.,
  mouse events from TUI programs like top, cursor position reports)
- Add unit tests for control sequence redaction
@linletian linletian merged commit a1e7aa9 into develop Mar 11, 2026
2 checks passed
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.

1 participant