feat(tui): wire Log overlay to tracing subscriber for live capture #100
No reviewers
Labels
No labels
area:agents
area:ai
area:config
area:dashboard
area:design
area:design-review
area:devtools
area:entities
area:gallery
area:generate
area:image
area:infra
area:meta
area:model-browser
area:navigation
area:presets
area:security
area:sessions
area:settings
area:sharing
area:test
area:ux
area:webhook
area:workdir
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/loom!100
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "tui/log-wire-96"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
LogRingLayer, a customtracing_subscriber::Layerthat captures log events and pushes them into the existingLogRingring bufferfmtsubscriber inmain.rswith a layered subscriber (Registry+ stderr fmt +LogRingLayer) so alltracing::info!()/warn!()/ etc. calls feed the TUI log overlaySharedLogRing(Arc<Mutex<LogRing>>) throughCoreHandlesandAppCtxso screens can read captured entriesTest plan
cargo clippy -p loom-tui -- -D warningscleancargo test -p loom-tuipasses (114 tests, including newtracing_layer_captures_events_into_ring)loom-tuiwithRUST_LOG=loom=debugand verify log entries appear in the log overlayCloses charles/loom#96
🤖 Generated with Claude Code
Review — PR #100: Log overlay wired to tracing subscriber
Clean. Good use of
tracing_subscriber::Layerwith aSharedLogRing. TheOnceLockpattern for global state is appropriate here.Observation
MessageVisitor::record_debugformats with{value:?}which wraps strings in quotes (e.g."hello from test"becomes"\"hello from test\""). In the test this works becauserecord_strfires for string literals, but structured fields usingDisplaywould go throughrecord_debugand get debug-formatted. Consider implementingrecord_f64/record_i64etc. for common field types, or at least stripping the outer quotes from debug-formatted strings.Minor
with_ansi(false)on the stderr layer makes sense for TUI mode but might make log files harder to read if someone redirects stderr to a file while also wanting color. Not a blocker — just noting the tradeoff.LoomTuiConfigin a future ticket.LGTM.