Commit 9be4319
committed
feat(v7-l46,l47): ErrorDetailsPanel + auto-scroll first failed stage
L46 — RPC error.data is now surfaced, not silently dropped:
- New ErrorDetailsPanel component renders the headline + code +
optional stage / type metadata. When error.data carries an
errors[] (Pydantic shape) or a detail[] array, each entry expands
to loc / msg / type rows with their own testids:
error-details-field-{i}-loc / -msg / -type.
- Traceback hides behind a <details> wrapper so the modal doesn't
blow up vertically for non-validation failures.
- testid contract: error-details-panel + headline / stage / type /
field-errors / trace-wrap / trace.
L47 — first failed stage no longer hides below the fold:
- RunResultModal pre-expands the first 'fail' stage on initial
render (useState init from firstFailed.name) so the user sees
the failure detail row without clicking.
- Adds a red outline + soft red background on the failing stage
row + data-first-failed='true' attribute for e2e to target.
- Scrolls the row into view on render (guarded for jsdom which
doesn't implement scrollIntoView).
vbgui/src/App.tsx:
- runError state migrated from string|null to ErrorDetails|null.
setRunError now normalizes inputs: a plain string becomes
{message}, an RpcError instance keeps {code, message, data}
intact. All existing setRunError(String(e)) sites updated to
setRunError(e) so the data blob threads through to the modal.
vbgui/src/components/HelpIcon.tsx:
- New HELP_TOPICS entries: rpc_error_data + spec_validation_recovery
(the latter wired in by L48 follow-up).
vbgui/tests/ErrorDetailsPanel.test.tsx — 6 unit tests:
- Headline shows code + message.
- Pydantic errors[] expands per-field with loc/msg/type cells.
- 'detail' key falls back to same expansion.
- stage + type metadata rendered when present.
- Traceback wrapped in collapsible <details>.
- No field list when neither errors[] nor detail[] present.
vbgui/tests/RunResultModal.test.tsx — updated 2 existing tests to
match the L47 auto-expand behaviour.
28/28 pass (ErrorDetailsPanel + RunResultModal + App.integration).
Playwright e2e for L46/L47 lands in follow-up commit.
Ref: cppmega-mlx-ybig (epic)1 parent 6c6ac8f commit 9be4319
6 files changed
Lines changed: 386 additions & 31 deletions
File tree
- vbgui
- src
- components
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
120 | | - | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
121 | 138 | | |
122 | 139 | | |
123 | 140 | | |
| |||
375 | 392 | | |
376 | 393 | | |
377 | 394 | | |
378 | | - | |
| 395 | + | |
379 | 396 | | |
380 | 397 | | |
381 | 398 | | |
| |||
582 | 599 | | |
583 | 600 | | |
584 | 601 | | |
585 | | - | |
| 602 | + | |
586 | 603 | | |
587 | 604 | | |
588 | 605 | | |
| |||
593 | 610 | | |
594 | 611 | | |
595 | 612 | | |
596 | | - | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
597 | 645 | | |
598 | 646 | | |
599 | 647 | | |
600 | | - | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
601 | 653 | | |
602 | | - | |
| 654 | + | |
603 | 655 | | |
604 | | - | |
| 656 | + | |
605 | 657 | | |
606 | | - | |
607 | | - | |
608 | | - | |
609 | | - | |
| 658 | + | |
610 | 659 | | |
611 | 660 | | |
| 661 | + | |
612 | 662 | | |
613 | | - | |
614 | | - | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
615 | 670 | | |
616 | 671 | | |
| 672 | + | |
| 673 | + | |
617 | 674 | | |
618 | | - | |
| 675 | + | |
| 676 | + | |
619 | 677 | | |
620 | 678 | | |
621 | 679 | | |
622 | 680 | | |
623 | 681 | | |
624 | | - | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
625 | 686 | | |
626 | | - | |
| 687 | + | |
627 | 688 | | |
628 | | - | |
| 689 | + | |
| 690 | + | |
629 | 691 | | |
630 | | - | |
631 | | - | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
632 | 696 | | |
633 | 697 | | |
634 | 698 | | |
| |||
701 | 765 | | |
702 | 766 | | |
703 | 767 | | |
| 768 | + | |
704 | 769 | | |
705 | 770 | | |
706 | 771 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 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 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
122 | 151 | | |
123 | 152 | | |
124 | 153 | | |
| |||
0 commit comments