Context
The Compose Multiplatform desktop app surfaces a "Network" tab in the bottom log panel for sessions that have a <session-dir>/network.ndjson artifact (captured by Playwright via --capture-network). The wiring lives in SessionLogsPanel + NetworkLogSource and works on the JVM target — loadNetworkLogs reads the file from disk.
On the WASM target (hosted HTML reports generated by WasmReport) the loadNetworkLogs actual returns null today because the report bundle doesn't embed a network_logs/<sessionId> entry. The Network tab therefore never appears on hosted reports — it works only on the local desktop app.
The parallel device_logs codepath shows what the wiring should look like — see WasmReport.kt (the device_logs: block in createCompressedDataBlock) and the index.html dispatcher branch under key.startsWith("device_logs/").
Scope
Three small pieces, no new logic.
1. WasmReport.kt — accept and emit network logs
Add a compressedNetworkLogs: Map<String, String> = emptyMap() parameter to createCompressedDataBlock and writeCompressedDataBlock, mirroring the existing compressedDeviceLogs. Emit a network_logs: { … } JSON block alongside the existing device_logs block in both functions.
2. index.html dispatcher — recognize the network_logs/ key prefix
Add a branch alongside the existing device-logs lookup:
else if (key.startsWith("network_logs/")) {
const sessionId = key.substring("network_logs/".length);
if (window.trailblaze_report_compressed.network_logs) {
compressedData = window.trailblaze_report_compressed.network_logs[sessionId];
}
}
3. Populate compressedNetworkLogs at the report-generation call site
Wherever createCompressedDataBlock / writeCompressedDataBlock is invoked with compressedDeviceLogs populated, do the same for network.ndjson files. Read <session-dir>/network.ndjson per session, JSON-encode the raw text the same way device logs are, and pass through the existing compression pipeline.
Out of scope
- No changes to the JVM
loadNetworkLogs actual — already works.
- No changes to the parser, panel, or schema.
- Body-file embedding (
bodies/req_<id>.bin and future bodies/res_<id>.bin) is a separate decision — they're referenced from NDJSON via relative paths but aren't part of the NDJSON itself. Likely deferred until response-body capture lands.
Why a separate issue
This is referenced from a TODO comment in ActualsWasm.kt's loadNetworkLogs so a future maintainer hitting "no Network tab on the hosted report" can find it.
Estimated diff
~30 LOC in WasmReport.kt + ~5 lines of JS in index.html + ~10 LOC in the call site that reads ndjson per session. Single PR.
Context
The Compose Multiplatform desktop app surfaces a "Network" tab in the bottom log panel for sessions that have a
<session-dir>/network.ndjsonartifact (captured by Playwright via--capture-network). The wiring lives inSessionLogsPanel+NetworkLogSourceand works on the JVM target —loadNetworkLogsreads the file from disk.On the WASM target (hosted HTML reports generated by
WasmReport) theloadNetworkLogsactual returns null today because the report bundle doesn't embed anetwork_logs/<sessionId>entry. The Network tab therefore never appears on hosted reports — it works only on the local desktop app.The parallel
device_logscodepath shows what the wiring should look like — seeWasmReport.kt(thedevice_logs:block increateCompressedDataBlock) and theindex.htmldispatcher branch underkey.startsWith("device_logs/").Scope
Three small pieces, no new logic.
1.
WasmReport.kt— accept and emit network logsAdd a
compressedNetworkLogs: Map<String, String> = emptyMap()parameter tocreateCompressedDataBlockandwriteCompressedDataBlock, mirroring the existingcompressedDeviceLogs. Emit anetwork_logs: { … }JSON block alongside the existingdevice_logsblock in both functions.2.
index.htmldispatcher — recognize thenetwork_logs/key prefixAdd a branch alongside the existing device-logs lookup:
3. Populate
compressedNetworkLogsat the report-generation call siteWherever
createCompressedDataBlock/writeCompressedDataBlockis invoked withcompressedDeviceLogspopulated, do the same fornetwork.ndjsonfiles. Read<session-dir>/network.ndjsonper session, JSON-encode the raw text the same way device logs are, and pass through the existing compression pipeline.Out of scope
loadNetworkLogsactual — already works.bodies/req_<id>.binand futurebodies/res_<id>.bin) is a separate decision — they're referenced from NDJSON via relative paths but aren't part of the NDJSON itself. Likely deferred until response-body capture lands.Why a separate issue
This is referenced from a TODO comment in
ActualsWasm.kt'sloadNetworkLogsso a future maintainer hitting "no Network tab on the hosted report" can find it.Estimated diff
~30 LOC in
WasmReport.kt+ ~5 lines of JS inindex.html+ ~10 LOC in the call site that reads ndjson per session. Single PR.