Skip to content

fix(tui): log image debug#1316

Merged
andrinoff merged 2 commits into
floatpane:masterfrom
resolvicomai:fix/html-image-debug-logging
May 22, 2026
Merged

fix(tui): log image debug#1316
andrinoff merged 2 commits into
floatpane:masterfrom
resolvicomai:fix/html-image-debug-logging

Conversation

@resolvicomai
Copy link
Copy Markdown
Contributor

@resolvicomai resolvicomai commented May 21, 2026

What?

  • route image protocol debug messages through the standard logger instead of writing directly to stdout
  • add coverage that verifies debug output goes to the logger and leaves stdout untouched

Why?

Debug output should respect the application logging path instead of bypassing logger formatting and destinations.

Fixes #701

Tests

  • go test ./view -count=1
  • make lint
  • go test ./...

@resolvicomai resolvicomai requested a review from a team as a code owner May 21, 2026 04:39
Copy link
Copy Markdown
Member

@floatpanebot floatpanebot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @resolvicomai! Please fix the following issues with your PR:

  • Title: Is too long (41 characters). The PR title must be strictly under 40 characters.
  • Body: Missing the ## What? or ## Why? headings required by the PR template.

@floatpanebot floatpanebot added area/tui Terminal UI / view layer bug Something isn't working size/M Diff: 51–200 lines labels May 21, 2026
@resolvicomai resolvicomai changed the title fix(tui): log image protocol debug output fix(tui): log image debug May 21, 2026
@floatpanebot floatpanebot dismissed their stale review May 21, 2026 04:41

Formatting issues have been resolved. Thank you!

Comment thread view/html_test.go
FromSi
FromSi previously approved these changes May 21, 2026
Copy link
Copy Markdown
Member

@FromSi FromSi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Copy Markdown
Member

@andrinoff andrinoff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@resolvicomai we are migrating to a new log introduced in #1311. Please use loglevels internal package

@resolvicomai
Copy link
Copy Markdown
Contributor Author

Thanks. I pushed a follow-up that uses the internal loglevel package for the image protocol debug log and simplifies the test so it only asserts logger output.

Validation:

  • go test ./view
  • go test ./...
  • make lint
  • git diff --check

@floatpanebot floatpanebot added the size/S Diff: 11–50 lines label May 21, 2026
@andrinoff andrinoff merged commit 4d41b09 into floatpane:master May 22, 2026
14 checks passed
andrinoff added a commit that referenced this pull request May 22, 2026
## What?

Changes the test assertion due to #1329 changing the output to have
`info: ` in front of it. Due to the PR not being rebased to have the
#1316 commit.

## Why?

Tests fail.

Signed-off-by: drew <me@andrinoff.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/tui Terminal UI / view layer bug Something isn't working size/M Diff: 51–200 lines size/S Diff: 11–50 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: Hardcoded fmt.Print in HTML viewer

4 participants