Commit 4f834db
feat: add cross-PCAP comparison with joint topology diagram (#187)
* feat: add cross-PCAP comparison with joint topology diagram
Introduces a new Compare feature allowing analysts to select two or more
PCAP files and visualise their network topologies in a single merged graph.
Key changes:
- New /compare?files=id1,id2,... route with ComparePage
- mergeGraphs utility merges N graphs with MAC-address tiebreaker to
prevent false node merges on DHCP lease reuse
- useCompareData hook fetches all files in parallel and merges client-side
- NetworkGraph extended with primarySource prop for source-aware rendering:
dashed edges and borders for secondary-only nodes/edges, bi-layers badge
for nodes present in multiple files
- Per-file stats bar and file-source toggle pills in ComparePage
- FileList updated: row click no longer navigates; added checkboxes for
multi-select and Compare selected button; info popover explains both
single-file and multi-file workflows
- NetworkControls gains defaultCollapsed prop (used by ComparePage)
- .network-diagram-page added to shared max-width/margin CSS rule
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix: resolve NodeDetails fileId and fragile filename lookup in ComparePage
- NodeDetails fileId now resolves to the file where the selected node
actually exists (using sources[0] label → fileIds index) rather than
always using fileIds[0], fixing broken conversation links for nodes
exclusive to secondary PCAPs
- Filename resolution now fetches each file's metadata individually via
FILE_METADATA endpoint instead of a paginated list capped at 50, so
labels are always correct regardless of upload history length
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 724df6c commit 4f834db
File tree
9 files changed
+1040
-34
lines changed- frontend/src
- assets/styles
- components
- network
- NetworkControls
- NetworkGraph
- upload/FileList
- features/network
- hooks
- services
- types
- pages/Compare
- router
9 files changed
+1040
-34
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
| 161 | + | |
161 | 162 | | |
162 | 163 | | |
163 | 164 | | |
| |||
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| 88 | + | |
| 89 | + | |
88 | 90 | | |
89 | 91 | | |
90 | 92 | | |
| |||
153 | 155 | | |
154 | 156 | | |
155 | 157 | | |
| 158 | + | |
156 | 159 | | |
157 | | - | |
| 160 | + | |
158 | 161 | | |
159 | 162 | | |
160 | 163 | | |
| |||
Lines changed: 57 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
42 | 48 | | |
43 | 49 | | |
44 | 50 | | |
45 | 51 | | |
46 | 52 | | |
47 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
48 | 58 | | |
49 | 59 | | |
50 | 60 | | |
51 | 61 | | |
52 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
53 | 67 | | |
54 | 68 | | |
55 | 69 | | |
| |||
215 | 229 | | |
216 | 230 | | |
217 | 231 | | |
218 | | - | |
| 232 | + | |
| 233 | + | |
219 | 234 | | |
220 | 235 | | |
221 | 236 | | |
| |||
237 | 252 | | |
238 | 253 | | |
239 | 254 | | |
| 255 | + | |
| 256 | + | |
240 | 257 | | |
241 | 258 | | |
242 | 259 | | |
243 | 260 | | |
244 | 261 | | |
245 | 262 | | |
246 | 263 | | |
| 264 | + | |
| 265 | + | |
247 | 266 | | |
248 | 267 | | |
249 | 268 | | |
250 | 269 | | |
251 | 270 | | |
252 | | - | |
| 271 | + | |
253 | 272 | | |
254 | 273 | | |
255 | | - | |
| 274 | + | |
256 | 275 | | |
257 | 276 | | |
258 | 277 | | |
| |||
265 | 284 | | |
266 | 285 | | |
267 | 286 | | |
268 | | - | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
269 | 291 | | |
270 | | - | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
271 | 300 | | |
272 | 301 | | |
273 | 302 | | |
| |||
284 | 313 | | |
285 | 314 | | |
286 | 315 | | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
287 | 329 | | |
288 | 330 | | |
289 | 331 | | |
| |||
293 | 335 | | |
294 | 336 | | |
295 | 337 | | |
296 | | - | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
297 | 344 | | |
298 | 345 | | |
299 | 346 | | |
| |||
322 | 369 | | |
323 | 370 | | |
324 | 371 | | |
325 | | - | |
| 372 | + | |
326 | 373 | | |
327 | 374 | | |
328 | 375 | | |
| |||
360 | 407 | | |
361 | 408 | | |
362 | 409 | | |
| 410 | + | |
363 | 411 | | |
364 | 412 | | |
365 | 413 | | |
| |||
403 | 451 | | |
404 | 452 | | |
405 | 453 | | |
406 | | - | |
| 454 | + | |
407 | 455 | | |
408 | 456 | | |
409 | 457 | | |
| |||
419 | 467 | | |
420 | 468 | | |
421 | 469 | | |
422 | | - | |
| 470 | + | |
423 | 471 | | |
424 | 472 | | |
425 | 473 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
25 | 47 | | |
26 | 48 | | |
27 | 49 | | |
| |||
80 | 102 | | |
81 | 103 | | |
82 | 104 | | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
87 | 146 | | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
96 | 169 | | |
97 | 170 | | |
98 | 171 | | |
| |||
117 | 190 | | |
118 | 191 | | |
119 | 192 | | |
120 | | - | |
121 | | - | |
122 | | - | |
| 193 | + | |
123 | 194 | | |
124 | 195 | | |
125 | 196 | | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
126 | 209 | | |
127 | 210 | | |
128 | 211 | | |
| |||
147 | 230 | | |
148 | 231 | | |
149 | 232 | | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
| 233 | + | |
154 | 234 | | |
155 | 235 | | |
156 | 236 | | |
157 | 237 | | |
158 | 238 | | |
159 | 239 | | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
| 240 | + | |
164 | 241 | | |
165 | 242 | | |
166 | 243 | | |
| |||
0 commit comments