Repository navigation
Commit e685ed0
authored
feat(ui): add full control JSON editing and create-from-JSON (#147)
## Summary
- add `Full JSON` mode for editing the entire control definition from
the control modal
- add `From JSON` in the create-control flow so a control can be created
directly from JSON without picking an evaluator first
- reuse a shared JSON editor for both full control definitions and
evaluator config JSON
- add helper text clarifying that the control JSON editor expects the
raw control definition, not `data` / `name` / `id` wrapper objects
- add Playwright coverage for the JSON create/edit flows
## Testing
- `make ui-typecheck`
- `make ui-lint` *(passes; existing `no-img-element` warnings remain in
`ui/src/core/layouts/app-layout.tsx`)*
## Screenshots
New control UI now has `From JSON` button`
<img width="841" height="613" alt="image"
src="https://github.com/user-attachments/assets/0db00e89-5fd0-4cca-bbee-ff2378a1fb87"
/>
When you click on it you get this
<img width="794" height="916" alt="Screenshot 2026-03-24 at 9 11 12 PM"
src="https://github.com/user-attachments/assets/f487e36a-b635-4fbf-b528-e83cb1404f9c"
/>
you can also edit full json in control now
<img width="802" height="917" alt="Screenshot 2026-03-24 at 9 11 38 PM"
src="https://github.com/user-attachments/assets/7207ce13-ec49-4137-9928-7bcdcd27eb64"
/>1 parent 5d70c7d commit e685ed0
8 files changed
Lines changed: 682 additions & 151 deletions
File tree
- ui
- src/core/page-components/agent-detail/modals
- add-new-control
- edit-control
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 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 | + | |
54 | 81 | | |
55 | 82 | | |
56 | 83 | | |
| |||
90 | 117 | | |
91 | 118 | | |
92 | 119 | | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
93 | 126 | | |
94 | 127 | | |
95 | 128 | | |
| |||
110 | 143 | | |
111 | 144 | | |
112 | 145 | | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
129 | 158 | | |
130 | | - | |
131 | | - | |
132 | | - | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
133 | 167 | | |
| 168 | + | |
134 | 169 | | |
135 | | - | |
136 | | - | |
137 | | - | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
138 | 174 | | |
139 | 175 | | |
140 | 176 | | |
| |||
219 | 255 | | |
220 | 256 | | |
221 | 257 | | |
222 | | - | |
| 258 | + | |
223 | 259 | | |
224 | 260 | | |
225 | 261 | | |
| |||
240 | 276 | | |
241 | 277 | | |
242 | 278 | | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
249 | 282 | | |
250 | | - | |
251 | | - | |
252 | | - | |
| 283 | + | |
| 284 | + | |
253 | 285 | | |
254 | | - | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
255 | 301 | | |
256 | | - | |
| 302 | + | |
257 | 303 | | |
258 | 304 | | |
259 | 305 | | |
| |||
307 | 353 | | |
308 | 354 | | |
309 | 355 | | |
| 356 | + | |
310 | 357 | | |
311 | 358 | | |
312 | 359 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | 5 | | |
9 | 6 | | |
10 | 7 | | |
| |||
16 | 13 | | |
17 | 14 | | |
18 | 15 | | |
19 | | - | |
20 | 16 | | |
21 | 17 | | |
22 | 18 | | |
| |||
46 | 42 | | |
47 | 43 | | |
48 | 44 | | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | 45 | | |
53 | 46 | | |
54 | 47 | | |
| |||
0 commit comments