tui: Log overlay — wire loom-core log capture & plugin stdout #96

Closed
opened 2026-04-12 13:25:27 +00:00 by claude-desktop · 0 comments
Collaborator

User Story

As a loom-tui user, I want the Log/Debug overlay to capture and display loom-core debug messages, plugin stdout, and HTTP traces, so that I can diagnose issues without leaving the TUI.

Context

The Log overlay (#41) has a LogRing ring buffer and log_pane.rs viewer. But no log sources feed into the ring buffer. This ticket connects loom-core's tracing output, plugin log messages, and HTTP request traces.

Acceptance Criteria

Log Sources

  • loom-core tracing output is captured and routed to LogRing
  • Plugin stdout/stderr messages (from Lua log.* host API calls) appear in the log
  • HTTP request/response traces (plugin http calls) are logged with method, URL, status code, timing
  • Log entries include timestamp, level, source (core/plugin name/http)

Log Level

  • Log level controlled by RUST_LOG env var (as spec'd)
  • tui.toml [log] section can override the default level

Viewer

  • Ctrl+L opens the log pane as a scrollable overlay
  • Auto-scroll to bottom for new entries (unless user has scrolled up)
  • Color-coded by level (error=red, warn=yellow, info=white, debug=dim)

Tests

  • Unit test: LogRing captures entries from multiple sources and maintains ring buffer invariant
  • Unit test: level filtering works

Out of Scope

  • Log export to file (can be added later)
  • Log search/filter UI (can be added later)

References

  • Spec §5.1 (Log / Debug Overlay)
  • Existing code: src/components/log_pane.rs
  • Tracking issue: #47
## User Story As a **loom-tui user**, I want the Log/Debug overlay to capture and display loom-core debug messages, plugin stdout, and HTTP traces, so that I can diagnose issues without leaving the TUI. ## Context The Log overlay (#41) has a `LogRing` ring buffer and `log_pane.rs` viewer. But no log sources feed into the ring buffer. This ticket connects loom-core's tracing output, plugin log messages, and HTTP request traces. ## Acceptance Criteria ### Log Sources - [ ] loom-core `tracing` output is captured and routed to `LogRing` - [ ] Plugin stdout/stderr messages (from Lua `log.*` host API calls) appear in the log - [ ] HTTP request/response traces (plugin `http` calls) are logged with method, URL, status code, timing - [ ] Log entries include timestamp, level, source (core/plugin name/http) ### Log Level - [ ] Log level controlled by `RUST_LOG` env var (as spec'd) - [ ] `tui.toml` `[log]` section can override the default level ### Viewer - [ ] `Ctrl+L` opens the log pane as a scrollable overlay - [ ] Auto-scroll to bottom for new entries (unless user has scrolled up) - [ ] Color-coded by level (error=red, warn=yellow, info=white, debug=dim) ### Tests - [ ] Unit test: `LogRing` captures entries from multiple sources and maintains ring buffer invariant - [ ] Unit test: level filtering works ## Out of Scope - Log export to file (can be added later) - Log search/filter UI (can be added later) ## References - Spec §5.1 (Log / Debug Overlay) - Existing code: `src/components/log_pane.rs` - Tracking issue: #47
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/loom#96
No description provided.