You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
0.1.4 review fixes: deliberate Enter, cached logo misses, honest edges
Four review findings against the unpublished 0.1.4, each with a test
that fails on the previous code:
- Enter commits only a deliberate choice: an arrowed-to row, the single
remaining match, or text naming a make exactly. Focus opens the full
list, and Enter there used to commit the first row alphabetically,
silently replacing whatever the person had already picked. Text that
matches the committed selection falls through to a plain form submit.
- A failed logo fetch is a cached miss for the pageview, not a retry:
rows re-request logos on every render, so a misbehaving logo endpoint
meant up to fifty requests per keystroke, forever.
- Blur restores the committed text synchronously; a submit button
clicked in the same tick can no longer carry a value whose visible
text disagrees with it.
- A server-preselected value missing from the fetched list announces
itself: onChange fires with the cleared state and the dropped value is
named in a warning, instead of the form quietly submitting empty.
Also: sideEffects back to true (the UMD global assignment IS the side
effect; false let bundlers tree-shake bare imports into runtime errors),
consumer onChange exceptions log whole via console.error instead of
masquerading as API failures in onError, the required-field validity
message is configurable (requiredMessage), the selected-make chip no
longer flickers on each pick, the README stops claiming the widget
calls /search, and CI runs once per change instead of twice per PR.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015jjKjr2ajZ4etdoMN6eC6k
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -85,7 +85,7 @@ The vehicle identity data is [CC-BY 4.0](https://vehiclesdb.com/attribution) —
85
85
86
86
## The API underneath
87
87
88
-
The widget speaks the documented Dropdown Data endpoints — [`GET /api/v1/makes`](https://vehiclesdb.com/api), `GET /api/v1/makes/{slug}/models`, `GET /api/v1/search`, and make logos — which cost 0 credits and accept publishable keys, so the dropdown never spends your quota. Public keys are deliberately refused everywhere else. Use a private `vdb_sk_…` key from your backend for the rest of the [VehiclesDB API](https://vehiclesdb.com/api): resolving free-text vehicle strings, full records, imagery, and license-plate validation.
88
+
The widget speaks the documented Dropdown Data endpoints: [`GET /api/v1/makes`](https://vehiclesdb.com/api), `GET /api/v1/makes/{slug}/models`, and make logos. (`GET /api/v1/search` is part of the same free surface if you build your own typeahead.) They cost 0 credits and accept publishable keys, so the dropdown never spends your quota. Public keys are deliberately refused everywhere else. Use a private `vdb_sk_…` key from your backend for the rest of the [VehiclesDB API](https://vehiclesdb.com/api): resolving free-text vehicle strings, full records, imagery, and license-plate validation.
0 commit comments