feat(tui): add log panel#1329
Merged
Merged
Conversation
andrinoff
approved these changes
May 22, 2026
floatpanebot
requested changes
May 22, 2026
Member
floatpanebot
left a comment
There was a problem hiding this comment.
The CI workflow failed. Please fix the following issues locally and push again:
Please check the CI logs for more details on the failure.
andrinoff
added a commit
that referenced
this pull request
May 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
Added an optional in-TUI log panel enabled with
--logs. The panel is backed by a small in-memory logger buffer and renders the latest log entries at the bottom of the TUI without overwriting the active view.The main TUI layout now reserves space for the log panel when it is enabled, so the current screen receives a reduced height instead of being drawn under the logs. The visual log panel itself lives in
tui/log_panel.go.Also updated
internal/loglevelso logs written through it are consistently prefixed:debug:verbose:info:Added
make run-log, which starts Matcha with both debug logging and the in-TUI log panel enabled:Why?
While reviewing recent PRs, I noticed it was hard to observe logs cleanly in the TUI. Logs written through
log.Printforinternal/loglevelcould appear over the Bubble Tea screen, or required redirecting stderr to a separate file.This gives us a simple way to inspect runtime logs directly inside Matcha while testing behavior such as TLS resumption, plugin loading, background fetches, and other debug/verbose paths.
I did not search for an existing issue for this.
Notes
This is an initial model: there is no scrolling yet, and the panel only shows the latest entries.
In the future, we can consider a mediator/multi-sink logger that writes through one logger interface to multiple targets, for example the in-memory TUI buffer, stderr, and log files.
The panel is intentionally read-only for now; keyboard handling and scrolling can be added later without changing the logger interface.