Commit 89cc891
fix(ui): preserve visibility selection when editing entities (#3402)
* fix: append visibility in edit form handlers to retain selection across edits
Signed-off-by: Oriol Morros Vilaseca <OM368@student.aru.ac.uk>
* fix(ui): add visibility append to A2A edit handler for consistency
The handleEditA2AAgentFormSubmit handler was missing the
formData.append("visibility", ...) call that all other edit
and create handlers have. This ensures visibility is preserved
when editing A2A agents, matching the pattern in the other five
edit handlers.
Closes #3391
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
* test(ui): add tests for visibility preservation in edit form handlers
Cover all six edit form submit handlers to verify that the
visibility field selected by the user is included in the
submitted FormData: tool, prompt, gateway, server, resource,
and A2A agent.
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
* fix(ui): use formData.set() instead of append() to prevent duplicate visibility entries
formData.append() creates a second visibility key in the submitted
FormData. Since Starlette's ImmutableMultiDict resolves duplicate
keys to the last value, this introduces ordering-dependent behavior.
Replace all 12 append("visibility", ...) calls (6 create + 6 edit
handlers) with set(), which replaces the existing entry instead of
duplicating it. Also strengthen tests to assert exactly one
visibility entry (toEqual([value]) instead of toContain(value)),
so they now fail if duplicates are reintroduced.
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
* chore: fix trailing whitespace in sandbox.rs tests
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
---------
Signed-off-by: Oriol Morros Vilaseca <OM368@student.aru.ac.uk>
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
Co-authored-by: Mihai Criveti <crivetimihai@gmail.com>1 parent 08f1f05 commit 89cc891
File tree
3 files changed
+343
-8
lines changed- mcp-servers/rust/filesystem-server/src
- mcpgateway/static
- tests/js
3 files changed
+343
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
| 134 | + | |
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15627 | 15627 | | |
15628 | 15628 | | |
15629 | 15629 | | |
15630 | | - | |
| 15630 | + | |
15631 | 15631 | | |
15632 | 15632 | | |
15633 | 15633 | | |
| |||
15714 | 15714 | | |
15715 | 15715 | | |
15716 | 15716 | | |
15717 | | - | |
| 15717 | + | |
15718 | 15718 | | |
15719 | 15719 | | |
15720 | 15720 | | |
| |||
15784 | 15784 | | |
15785 | 15785 | | |
15786 | 15786 | | |
15787 | | - | |
| 15787 | + | |
15788 | 15788 | | |
15789 | 15789 | | |
15790 | 15790 | | |
| |||
15854 | 15854 | | |
15855 | 15855 | | |
15856 | 15856 | | |
| 15857 | + | |
15857 | 15858 | | |
15858 | 15859 | | |
15859 | 15860 | | |
| |||
15916 | 15917 | | |
15917 | 15918 | | |
15918 | 15919 | | |
15919 | | - | |
| 15920 | + | |
15920 | 15921 | | |
15921 | 15922 | | |
15922 | 15923 | | |
| |||
16093 | 16094 | | |
16094 | 16095 | | |
16095 | 16096 | | |
16096 | | - | |
| 16097 | + | |
16097 | 16098 | | |
16098 | 16099 | | |
16099 | 16100 | | |
| |||
16195 | 16196 | | |
16196 | 16197 | | |
16197 | 16198 | | |
16198 | | - | |
| 16199 | + | |
16199 | 16200 | | |
16200 | 16201 | | |
16201 | 16202 | | |
| |||
16265 | 16266 | | |
16266 | 16267 | | |
16267 | 16268 | | |
| 16269 | + | |
16268 | 16270 | | |
16269 | 16271 | | |
16270 | 16272 | | |
| |||
16360 | 16362 | | |
16361 | 16363 | | |
16362 | 16364 | | |
| 16365 | + | |
16363 | 16366 | | |
16364 | 16367 | | |
16365 | 16368 | | |
| |||
16459 | 16462 | | |
16460 | 16463 | | |
16461 | 16464 | | |
| 16465 | + | |
16462 | 16466 | | |
16463 | 16467 | | |
16464 | 16468 | | |
| |||
16513 | 16517 | | |
16514 | 16518 | | |
16515 | 16519 | | |
| 16520 | + | |
16516 | 16521 | | |
16517 | 16522 | | |
16518 | 16523 | | |
| |||
16622 | 16627 | | |
16623 | 16628 | | |
16624 | 16629 | | |
| 16630 | + | |
16625 | 16631 | | |
16626 | 16632 | | |
16627 | 16633 | | |
| |||
0 commit comments