Skip to content

Refactor: Remove unused TUI logging mode#354

Merged
teemow merged 3 commits intomainfrom
refactor/remove-tui-logging-mode
Feb 4, 2026
Merged

Refactor: Remove unused TUI logging mode#354
teemow merged 3 commits intomainfrom
refactor/remove-tui-logging-mode

Conversation

@teemow
Copy link
Member

@teemow teemow commented Feb 4, 2026

Summary

This PR simplifies the logging system by removing the dual-mode (CLI/TUI) architecture that was no longer in use.

Changes

  • Remove LogEntry struct, TUI channel, and mode switching logic from pkg/logging
  • Simplify InitForCLI to directly set up the slog handler
  • Remove Initcommon function and TUI-related code paths
  • Update documentation in pkg/logging/doc.go and internal/app/doc.go to reflect CLI-only logging
  • Remove dead logToStderr function that was never called
  • Fix broken GoDoc list formatting in internal/app/doc.go
  • Remove outdated TUI golden files reference from PR template

Benefits

  • KISS: Removes ~200 lines of unused dual-mode complexity
  • Cleaner API: Single initialization path via InitForCLI
  • Better maintainability: No more TUI vs CLI branching in logInternal

Files Changed

File Change
pkg/logging/logging.go Remove TUI mode, simplify to CLI-only
pkg/logging/logging_test.go Remove TUI-related tests
pkg/logging/doc.go Update documentation for CLI-only mode
internal/app/bootstrap.go Update comments
internal/app/bootstrap_test.go Update test names
internal/app/config.go Remove TUI references in comments
internal/app/doc.go Update docs, fix list formatting
.github/pull_request_template.md Remove outdated TUI golden files reference

Test plan

  • Unit tests pass (go test ./pkg/logging/... ./internal/app/...)
  • No breaking changes (removed types/functions were not used externally)
  • CI passes

This simplifies the logging system by removing the dual-mode (CLI/TUI)
architecture that was no longer in use:

- Remove LogEntry struct, TUI channel, and mode switching logic
- Simplify InitForCLI to directly set up the slog handler
- Remove Initcommon function and TUI-related code paths
- Update documentation to reflect CLI-only logging
- Remove dead logToStderr function
- Fix broken GoDoc list formatting in app/doc.go

The logging system now has a cleaner, single-path implementation
using Go's standard slog package.
@teemow teemow requested a review from a team as a code owner February 4, 2026 21:08
The PR template referenced internal/tui/view/testdata/ which no longer
exists after the TUI was removed from the project.
@teemow teemow enabled auto-merge (squash) February 4, 2026 21:13
@teemow teemow disabled auto-merge February 4, 2026 21:14
@teemow teemow merged commit f4cc54a into main Feb 4, 2026
3 of 4 checks passed
@teemow teemow deleted the refactor/remove-tui-logging-mode branch February 4, 2026 21:16
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