Commit 821ab25
fix: use correct API for canonical path imports in web UI
When importing servers from a canonical config path (e.g., Claude Desktop,
Claude Code), the handleImport function incorrectly used the JSON content
API instead of the path API, causing "Content is required" errors.
The fix tracks when a canonical path import is active and uses the
appropriate importServersFromPath API endpoint for the actual import.
Changes:
- Add activeCanonicalImport state to track canonical path imports
- Set activeCanonicalImport when preview from canonical path succeeds
- Update handleImport to check activeCanonicalImport first and use path API
- Clear activeCanonicalImport on file/paste preview and modal close
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent f2af455 commit 821ab25
1 file changed
Lines changed: 17 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
612 | 612 | | |
613 | 613 | | |
614 | 614 | | |
| 615 | + | |
| 616 | + | |
615 | 617 | | |
616 | 618 | | |
617 | 619 | | |
| |||
870 | 872 | | |
871 | 873 | | |
872 | 874 | | |
| 875 | + | |
| 876 | + | |
873 | 877 | | |
874 | 878 | | |
875 | 879 | | |
| |||
964 | 968 | | |
965 | 969 | | |
966 | 970 | | |
967 | | - | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
968 | 980 | | |
969 | 981 | | |
970 | 982 | | |
| |||
1036 | 1048 | | |
1037 | 1049 | | |
1038 | 1050 | | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
1039 | 1054 | | |
1040 | 1055 | | |
1041 | 1056 | | |
| |||
1078 | 1093 | | |
1079 | 1094 | | |
1080 | 1095 | | |
| 1096 | + | |
1081 | 1097 | | |
1082 | 1098 | | |
1083 | 1099 | | |
| |||
0 commit comments