Commit 5fcad49
committed
fix(settings): improve fault tolerance and fix TypeScript errors in settings components
- Fix ProfileManager.tsx: Add proper async/await for exportProfile and importProfile
- Fix ProfileManager.tsx: Handle Date | number type for formatDate function
- Fix ProfileManager.tsx: Correct createProfile call to match API signature (2 params, not 3)
- Fix SettingsContext.tsx: Fix deepMerge function to handle PartialCortexSettings type
- Fix SettingsContext.tsx: Properly cast CustomEvent handlers to EventListener via unknown
- Fix SettingsContext.tsx: Remove unused destructured variables in useWorkbenchEditorSettings
- Fix PolicySettingsContext.tsx: Remove unused imports (createSignal, createEffect)
- Fix profiles/ProfileManager.tsx: Remove unused imports and activeProfile variable
These fixes improve configuration persistence reliability and prevent 'Cannot read properties of undefined' errors.1 parent 59aee04 commit 5fcad49
File tree
4 files changed
+28
-23
lines changed- cortex-gui/src
- components
- profiles
- settings
- context
4 files changed
+28
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
| 1 | + | |
| 2 | + | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
| |||
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
14 | | - | |
15 | 13 | | |
16 | 14 | | |
17 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
80 | | - | |
| 79 | + | |
| 80 | + | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
| 107 | + | |
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
140 | | - | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
141 | 143 | | |
142 | 144 | | |
143 | 145 | | |
| |||
437 | 439 | | |
438 | 440 | | |
439 | 441 | | |
440 | | - | |
441 | | - | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
442 | 450 | | |
443 | 451 | | |
444 | 452 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | 22 | | |
24 | | - | |
25 | 23 | | |
26 | 24 | | |
27 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1051 | 1051 | | |
1052 | 1052 | | |
1053 | 1053 | | |
1054 | | - | |
| 1054 | + | |
1055 | 1055 | | |
1056 | 1056 | | |
1057 | | - | |
| 1057 | + | |
1058 | 1058 | | |
| 1059 | + | |
1059 | 1060 | | |
1060 | 1061 | | |
1061 | 1062 | | |
1062 | | - | |
| 1063 | + | |
1063 | 1064 | | |
1064 | 1065 | | |
1065 | 1066 | | |
| |||
1707 | 1708 | | |
1708 | 1709 | | |
1709 | 1710 | | |
1710 | | - | |
1711 | | - | |
| 1711 | + | |
| 1712 | + | |
1712 | 1713 | | |
1713 | | - | |
1714 | | - | |
| 1714 | + | |
| 1715 | + | |
1715 | 1716 | | |
1716 | 1717 | | |
1717 | 1718 | | |
| |||
1741 | 1742 | | |
1742 | 1743 | | |
1743 | 1744 | | |
1744 | | - | |
| 1745 | + | |
1745 | 1746 | | |
1746 | | - | |
| 1747 | + | |
1747 | 1748 | | |
1748 | 1749 | | |
1749 | 1750 | | |
| |||
2044 | 2045 | | |
2045 | 2046 | | |
2046 | 2047 | | |
2047 | | - | |
| 2048 | + | |
2048 | 2049 | | |
2049 | 2050 | | |
2050 | 2051 | | |
| |||
0 commit comments