Commit 9274552
committed
refactor: move validation errors from global banner to per-message popover
- Remove global validation error banner from app.tsx and chat.tsx
- Add ValidationErrorPopover component that attaches to user messages
- Add [!] button to user messages with validation errors
- Refactor validation error formatting and display logic
- Add validationErrors field to ChatMessage type
- Create validation-error-helpers utility for filtering network errors
- Update use-send-message to attach errors to user messages instead of creating error messages
Note: This changes the UX for displaying validation errors but introduces
a regression where initial startup validation errors are no longer visible.
This will be addressed in a follow-up commit.1 parent 071bb93 commit 9274552
File tree
14 files changed
+474
-373
lines changed- cli/src
- components
- hooks
- state
- types
- utils
14 files changed
+474
-373
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | 23 | | |
25 | 24 | | |
26 | 25 | | |
| |||
198 | 197 | | |
199 | 198 | | |
200 | 199 | | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | 200 | | |
220 | 201 | | |
221 | 202 | | |
222 | 203 | | |
223 | 204 | | |
224 | 205 | | |
225 | 206 | | |
226 | | - | |
227 | | - | |
228 | 207 | | |
229 | 208 | | |
230 | 209 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| |||
651 | 651 | | |
652 | 652 | | |
653 | 653 | | |
| 654 | + | |
654 | 655 | | |
655 | 656 | | |
656 | 657 | | |
| |||
720 | 721 | | |
721 | 722 | | |
722 | 723 | | |
723 | | - | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
724 | 732 | | |
725 | | - | |
| 733 | + | |
726 | 734 | | |
727 | 735 | | |
728 | 736 | | |
729 | 737 | | |
730 | 738 | | |
731 | | - | |
732 | | - | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
733 | 748 | | |
734 | 749 | | |
735 | 750 | | |
| |||
945 | 960 | | |
946 | 961 | | |
947 | 962 | | |
948 | | - | |
949 | | - | |
950 | | - | |
951 | | - | |
952 | | - | |
953 | 963 | | |
954 | 964 | | |
955 | 965 | | |
| |||
1036 | 1046 | | |
1037 | 1047 | | |
1038 | 1048 | | |
| 1049 | + | |
1039 | 1050 | | |
1040 | 1051 | | |
1041 | 1052 | | |
| |||
1081 | 1092 | | |
1082 | 1093 | | |
1083 | 1094 | | |
1084 | | - | |
1085 | | - | |
1086 | 1095 | | |
1087 | 1096 | | |
1088 | 1097 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
| |||
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
| 45 | + | |
| 46 | + | |
43 | 47 | | |
44 | 48 | | |
45 | 49 | | |
| |||
106 | 110 | | |
107 | 111 | | |
108 | 112 | | |
| 113 | + | |
109 | 114 | | |
110 | 115 | | |
111 | 116 | | |
| |||
127 | 132 | | |
128 | 133 | | |
129 | 134 | | |
| 135 | + | |
130 | 136 | | |
131 | 137 | | |
132 | 138 | | |
| |||
176 | 182 | | |
177 | 183 | | |
178 | 184 | | |
| 185 | + | |
179 | 186 | | |
180 | 187 | | |
181 | 188 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
| 145 | + | |
145 | 146 | | |
146 | 147 | | |
147 | 148 | | |
| |||
156 | 157 | | |
157 | 158 | | |
158 | 159 | | |
| 160 | + | |
159 | 161 | | |
160 | 162 | | |
161 | 163 | | |
| |||
215 | 217 | | |
216 | 218 | | |
217 | 219 | | |
| 220 | + | |
218 | 221 | | |
219 | 222 | | |
220 | | - | |
| 223 | + | |
221 | 224 | | |
222 | | - | |
| 225 | + | |
223 | 226 | | |
224 | 227 | | |
225 | 228 | | |
| 229 | + | |
226 | 230 | | |
227 | 231 | | |
228 | 232 | | |
229 | 233 | | |
230 | 234 | | |
231 | | - | |
232 | | - | |
| 235 | + | |
| 236 | + | |
233 | 237 | | |
234 | 238 | | |
235 | 239 | | |
| |||
308 | 312 | | |
309 | 313 | | |
310 | 314 | | |
311 | | - | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
312 | 318 | | |
313 | 319 | | |
314 | 320 | | |
| |||
0 commit comments