Commit 14c6f1d
committed
fix(dashboard/config): handle string fallback_models + dreamer card padding
Two distinct config-page fixes that landed together because they ride the
same hot path the user just reported.
## 1. "No models found" in historian / sidekick fallback dropdowns
The plugin's `AgentOverrideConfigSchema` accepts `fallback_models` as
either a string (single model) or `string[]` (chain):
fallback_models: z.union([z.string(), z.array(z.string())]).optional()
The dashboard cast every read as `string[]`, which hid two bugs that only
surfaced when the user's config stored the field as a bare string:
1. The chip list iterated the value per-character, rendering single
characters as "fallback" entries.
2. The "Add fallback" dropdown filter ran
`String.prototype.includes(m)` against every available model.
Substring-matching is aggressive — any model containing common
fragments like "/", "openai", or even single common letters
would be filtered out, leaving the dropdown empty with the user-
reported "No models found" message and no way to add a fallback.
Added a `readFallbackModels(formData, path)` helper near the other
nested-access helpers that normalizes both shapes to a real `string[]`.
Replaced all 8 unsafe call sites across historian, dreamer, and sidekick
fallback sections (chip list `<Show>`, chip list `<For>`, chip remove
`onClick`, dropdown filter, dropdown `onChange`).
Dreamer wasn't reported because the user happened to have its
fallback_models as an array or unset, but the same bug existed there too —
fix is uniform across all three agents.
## 2. Padding between Dreamer's two `.config-card-two-col` rows
The Dreamer card stacks two sibling `.config-card-two-col` blocks:
Row 1: Enabled / Schedule / Inject Docs | Model / Fallbacks
Row 2: User Memories | Key File Pinning
Both rows had `gap: 24px` between columns within the same row, but no
margin between the rows themselves, so the two visually fused into one
unbroken block — Inject Docs flowed straight into User Memories with no
breathing room.
Added a CSS rule:
.config-card-two-col + .config-card-two-col { margin-top: 24px; }
Sibling-selector scoped, so it only applies when two two-col blocks
stack. Other cards with a single two-col block (Memory, Historian, etc.)
are unaffected.
Verified: dashboard frontend build clean (147 KB bundle), biome clean.1 parent dc4df59 commit 14c6f1d
2 files changed
Lines changed: 74 additions & 69 deletions
Lines changed: 65 additions & 69 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
219 | 243 | | |
220 | 244 | | |
221 | 245 | | |
| |||
818 | 842 | | |
819 | 843 | | |
820 | 844 | | |
821 | | - | |
822 | | - | |
823 | | - | |
824 | | - | |
825 | | - | |
826 | | - | |
| 845 | + | |
| 846 | + | |
827 | 847 | | |
828 | 848 | | |
829 | 849 | | |
| |||
832 | 852 | | |
833 | 853 | | |
834 | 854 | | |
835 | | - | |
836 | | - | |
837 | | - | |
838 | | - | |
839 | | - | |
840 | | - | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
841 | 859 | | |
842 | 860 | | |
843 | 861 | | |
| |||
848 | 866 | | |
849 | 867 | | |
850 | 868 | | |
851 | | - | |
852 | | - | |
853 | | - | |
854 | | - | |
855 | | - | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
856 | 874 | | |
857 | 875 | | |
858 | | - | |
859 | | - | |
860 | | - | |
| 876 | + | |
861 | 877 | | |
862 | 878 | | |
863 | 879 | | |
| |||
872 | 888 | | |
873 | 889 | | |
874 | 890 | | |
875 | | - | |
876 | | - | |
877 | | - | |
878 | | - | |
879 | | - | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
880 | 894 | | |
881 | 895 | | |
882 | 896 | | |
883 | 897 | | |
884 | 898 | | |
885 | | - | |
886 | | - | |
887 | | - | |
888 | | - | |
889 | | - | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
890 | 903 | | |
891 | 904 | | |
892 | 905 | | |
| |||
1143 | 1156 | | |
1144 | 1157 | | |
1145 | 1158 | | |
1146 | | - | |
1147 | | - | |
| 1159 | + | |
1148 | 1160 | | |
1149 | 1161 | | |
1150 | 1162 | | |
1151 | 1163 | | |
1152 | 1164 | | |
1153 | | - | |
1154 | | - | |
1155 | | - | |
1156 | | - | |
1157 | | - | |
| 1165 | + | |
1158 | 1166 | | |
1159 | 1167 | | |
1160 | 1168 | | |
| |||
1164 | 1172 | | |
1165 | 1173 | | |
1166 | 1174 | | |
1167 | | - | |
1168 | | - | |
1169 | | - | |
1170 | | - | |
1171 | | - | |
| 1175 | + | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
1172 | 1179 | | |
1173 | 1180 | | |
1174 | 1181 | | |
| |||
1187 | 1194 | | |
1188 | 1195 | | |
1189 | 1196 | | |
1190 | | - | |
1191 | | - | |
1192 | | - | |
1193 | | - | |
| 1197 | + | |
1194 | 1198 | | |
1195 | 1199 | | |
1196 | 1200 | | |
1197 | 1201 | | |
1198 | | - | |
1199 | | - | |
1200 | | - | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
1201 | 1206 | | |
1202 | 1207 | | |
1203 | 1208 | | |
| |||
1470 | 1475 | | |
1471 | 1476 | | |
1472 | 1477 | | |
1473 | | - | |
1474 | | - | |
1475 | | - | |
1476 | | - | |
| 1478 | + | |
1477 | 1479 | | |
1478 | 1480 | | |
1479 | | - | |
1480 | | - | |
1481 | | - | |
1482 | | - | |
1483 | | - | |
| 1481 | + | |
1484 | 1482 | | |
1485 | 1483 | | |
1486 | 1484 | | |
| |||
1490 | 1488 | | |
1491 | 1489 | | |
1492 | 1490 | | |
1493 | | - | |
1494 | | - | |
1495 | | - | |
1496 | | - | |
1497 | | - | |
| 1491 | + | |
| 1492 | + | |
| 1493 | + | |
| 1494 | + | |
1498 | 1495 | | |
1499 | 1496 | | |
1500 | 1497 | | |
| |||
1513 | 1510 | | |
1514 | 1511 | | |
1515 | 1512 | | |
1516 | | - | |
1517 | | - | |
1518 | | - | |
| 1513 | + | |
1519 | 1514 | | |
1520 | 1515 | | |
1521 | 1516 | | |
1522 | 1517 | | |
1523 | | - | |
1524 | | - | |
1525 | | - | |
| 1518 | + | |
| 1519 | + | |
| 1520 | + | |
| 1521 | + | |
1526 | 1522 | | |
1527 | 1523 | | |
1528 | 1524 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1182 | 1182 | | |
1183 | 1183 | | |
1184 | 1184 | | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
1185 | 1194 | | |
1186 | 1195 | | |
1187 | 1196 | | |
| |||
0 commit comments