Fix trace packet handling (closes #44)

This commit is contained in:
Jack Kingsman
2026-03-09 09:23:35 -07:00
parent 48bc8c6337
commit 7e384c12bb
3 changed files with 25 additions and 2 deletions
+6 -1
View File
@@ -49,9 +49,14 @@ function decodePacketSummary(
const routeType = Utils.getRouteTypeName(decoded.routeType);
const payloadTypeName = Utils.getPayloadTypeName(decoded.payloadType);
const tracePayload =
decoded.payloadType === PayloadType.Trace && decoded.payload.decoded
? (decoded.payload.decoded as { pathHashes?: string[] })
: null;
const pathTokens = tracePayload?.pathHashes || decoded.path || [];
// Build path string if available
const pathStr = decoded.path && decoded.path.length > 0 ? ` via ${decoded.path.join('-')}` : '';
const pathStr = pathTokens.length > 0 ? ` via ${pathTokens.join('-')}` : '';
// Generate summary based on payload type
let summary = payloadTypeName;