noctrace 1.4.0 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,7 +7,7 @@
7
7
  <link rel="preconnect" href="https://fonts.googleapis.com" />
8
8
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
9
9
  <link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600;700&display=swap" rel="stylesheet" />
10
- <script type="module" crossorigin src="/assets/index-BGW0xA7n.js"></script>
10
+ <script type="module" crossorigin src="/assets/index-BBxFz4Ap.js"></script>
11
11
  <link rel="stylesheet" crossorigin href="/assets/index-DlKrxvV-.css">
12
12
  </head>
13
13
  <body>
@@ -736,6 +736,14 @@ export function parseJsonlContent(content) {
736
736
  parentToolUseId: null,
737
737
  });
738
738
  }
739
+ // Chronological sort: tool rows, turn rows, api-errors, and hook rows are pushed
740
+ // in separate passes above. Without this sort, turn rows cluster at the end of
741
+ // the waterfall instead of interleaving with the tool calls they happened between.
742
+ top.sort((a, b) => {
743
+ if (a.startTime !== b.startTime)
744
+ return a.startTime - b.startTime;
745
+ return (a.sequence ?? 0) - (b.sequence ?? 0);
746
+ });
739
747
  return top;
740
748
  }
741
749
  /**
@@ -935,10 +943,15 @@ export function parseSubAgentContent(content) {
935
943
  parentToolUseId: null,
936
944
  });
937
945
  }
938
- // Compute per-row token delta for sub-agent rows
939
- const sorted = [...rows].sort((a, b) => a.startTime - b.startTime);
946
+ // Chronological sort same rule as parseJsonlContent.
947
+ rows.sort((a, b) => {
948
+ if (a.startTime !== b.startTime)
949
+ return a.startTime - b.startTime;
950
+ return (a.sequence ?? 0) - (b.sequence ?? 0);
951
+ });
952
+ // Compute per-row token delta over the now-sorted rows.
940
953
  let prevInput = 0;
941
- for (const row of sorted) {
954
+ for (const row of rows) {
942
955
  row.tokenDelta = row.inputTokens > 0 ? Math.max(0, row.inputTokens - prevInput) : 0;
943
956
  if (row.inputTokens > 0)
944
957
  prevInput = row.inputTokens;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "noctrace",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "description": "Claude Code observability — DevTools-style waterfall visualizer for AI agent workflows, token tracking, and context health monitoring",
5
5
  "type": "module",
6
6
  "license": "MIT",