Commit aa14947
fix(models-config): namespace input names per type + truthy error gate
Two issues survived the per-type form-state landing:
1. API Key (and Name / URL) appeared filled across all four
sub-tabs even though my per-type bindings were correct. Root
cause: browser autofill. All four tabs' inputs shared
`name="apiKey"`, `name="name"`, `name="url"` — browsers
treat same-named password / text fields as the same logical
field and silently propagate stored credentials across them,
so the value typed into Google was auto-filled into OpenAI /
Anthropic / OpenAI-compatible regardless of what the json-render
`value` binding said. The state was per-type; the DOM input
was being filled by Chrome/Firefox's autofill heuristic.
Fix: every Input now has a `name="${type}-${field}"` (e.g.
`google-apiKey`, `openai-apiKey`, `anthropic-name`). Browsers
no longer cross-pollinate values.
2. Error Alert visibility used `{ neq: null }` which evaluates
`value !== null` — visible for `undefined`, `""`, and any
string. If the seeded `error: null` was missing or got
shadowed, the panel rendered "Error" with an empty message.
Fix: switch to `{ $state: ".../error" }` (no comparator).
The json-render `evaluateCondition` falls back to
`Boolean(value)` when no comparator is supplied — `null`,
`undefined`, and `""` all evaluate to false (hidden); only
a real non-empty string makes the Alert appear.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent 7ff4335 commit aa14947
1 file changed
Lines changed: 12 additions & 8 deletions
Lines changed: 12 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
175 | 179 | | |
176 | 180 | | |
177 | 181 | | |
178 | 182 | | |
179 | | - | |
| 183 | + | |
180 | 184 | | |
181 | 185 | | |
182 | 186 | | |
| |||
186 | 190 | | |
187 | 191 | | |
188 | 192 | | |
189 | | - | |
| 193 | + | |
190 | 194 | | |
191 | 195 | | |
192 | 196 | | |
| |||
196 | 200 | | |
197 | 201 | | |
198 | 202 | | |
199 | | - | |
| 203 | + | |
200 | 204 | | |
201 | 205 | | |
202 | 206 | | |
| |||
259 | 263 | | |
260 | 264 | | |
261 | 265 | | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
267 | 271 | | |
268 | 272 | | |
269 | 273 | | |
| |||
0 commit comments