Commit f330c5d
shaft-intellij: unwrap capture_status/capture_api_status union before reading fields (#3954)
GuidedWorkflowPanel's background status poller (applyStatusPoll and its
helpers) read state/active/eventCount/steps directly off the top-level
capture_status/capture_api_status JSON. Since #3881, CaptureService#status()/
apiStatus() return a union (McpCaptureUnionStatus/McpCaptureApiUnionStatus)
with the real status nested under webStatus/playwrightStatus/mobileStatus --
GuidedWorkflowLiveE2ETest's webStatus()/mobileStatus() helpers already proved
this wire shape against a live server. The poller never unwrapped it, so an
active recording never rendered as active in the Guided workflow status strip
for any backend.
Fix: unwrap the union to its populated engine section once, right after
parsing the poll response, before any field is read (mirrors the E2E test's
unwrap helpers). Added a regression test that feeds applyStatusPoll a real
union-shaped fixture and asserts on the rendered status text.
Closes #3949
Claude-Session: https://claude.ai/code/session_01NDQpYzvnTbDPYwqDwHQoRz
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>1 parent ec760e0 commit f330c5d
2 files changed
Lines changed: 77 additions & 3 deletions
File tree
- shaft-intellij/src
- main/java/com/shaft/intellij/ui
- test/java/com/shaft/intellij/ui
Lines changed: 37 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
98 | 101 | | |
99 | 102 | | |
100 | 103 | | |
| |||
1210 | 1213 | | |
1211 | 1214 | | |
1212 | 1215 | | |
1213 | | - | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
1214 | 1220 | | |
1215 | 1221 | | |
1216 | 1222 | | |
| |||
1219 | 1225 | | |
1220 | 1226 | | |
1221 | 1227 | | |
1222 | | - | |
| 1228 | + | |
1223 | 1229 | | |
1224 | 1230 | | |
1225 | 1231 | | |
| |||
1398 | 1404 | | |
1399 | 1405 | | |
1400 | 1406 | | |
| 1407 | + | |
| 1408 | + | |
| 1409 | + | |
| 1410 | + | |
| 1411 | + | |
| 1412 | + | |
| 1413 | + | |
| 1414 | + | |
| 1415 | + | |
| 1416 | + | |
| 1417 | + | |
| 1418 | + | |
| 1419 | + | |
| 1420 | + | |
| 1421 | + | |
| 1422 | + | |
| 1423 | + | |
| 1424 | + | |
| 1425 | + | |
| 1426 | + | |
| 1427 | + | |
| 1428 | + | |
| 1429 | + | |
| 1430 | + | |
| 1431 | + | |
| 1432 | + | |
| 1433 | + | |
| 1434 | + | |
1401 | 1435 | | |
1402 | 1436 | | |
1403 | 1437 | | |
| |||
Lines changed: 40 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
| |||
483 | 485 | | |
484 | 486 | | |
485 | 487 | | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
486 | 526 | | |
487 | 527 | | |
488 | 528 | | |
| |||
0 commit comments