Default JSON log-line viewer nodes to collapsed

A log line whose text parses as JSON was rendering every nested node
fully expanded, dumping large payloads into the timeline instead of a
collapsed summary the user opts into expanding.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TeyhRfMYjMditek6geDRoQ
This commit is contained in:
Hugh Kaznowski
2026-09-07 12:19:47 +01:00
co-authored by Claude Sonnet 5
parent 49bfd6b020
commit 2cc8ac8138
6 changed files with 22 additions and 136 deletions
+14 -14
View File
@@ -100,31 +100,31 @@ impl EngineHandle {
}
}
pub fn spawn(settings: SettingsHandle, channel_capacity: usize) -> EngineHandle {
/// Builds the handle/receiver/writer triple shared by `spawn` and, in tests, by callers that
/// want the raw receiver without an actor loop draining it.
fn new_channel_and_handle(
channel_capacity: usize,
) -> (EngineHandle, mpsc::Receiver<EngineMessage>, IndexWriter) {
let (tx, rx) = mpsc::channel(channel_capacity);
let (write, read) = left_right::new::<EngineSnapshot, EngineOp>();
let reader = IndexReader {
factory: read.factory(),
};
tokio::spawn(run(rx, settings, IndexWriter { handle: write }));
EngineHandle { tx, reader }
(EngineHandle { tx, reader }, rx, IndexWriter { handle: write })
}
pub fn spawn(settings: SettingsHandle, channel_capacity: usize) -> EngineHandle {
let (handle, rx, write) = new_channel_and_handle(channel_capacity);
tokio::spawn(run(rx, settings, write));
handle
}
#[cfg(test)]
pub(crate) fn test_handle(
channel_capacity: usize,
) -> (EngineHandle, mpsc::Receiver<EngineMessage>) {
let (tx, rx) = mpsc::channel(channel_capacity);
let (_write, read) = left_right::new::<EngineSnapshot, EngineOp>();
(
EngineHandle {
tx,
reader: IndexReader {
factory: read.factory(),
},
},
rx,
)
let (handle, rx, _write) = new_channel_and_handle(channel_capacity);
(handle, rx)
}
async fn run(