Skip to content

Backlog/b 33 search input - #159

Merged
denis1011101 merged 2 commits into
mainfrom
backlog/b-33-search-input
Aug 25, 2026
Merged

Backlog/b 33 search input#159
denis1011101 merged 2 commits into
mainfrom
backlog/b-33-search-input

Conversation

@denis1011101

Copy link
Copy Markdown
Owner

No description provided.

denis1011101 and others added 2 commits August 25, 2026 11:40
The search form bound submit to onFormSubmit, which called preventDefault
for anything that was not a coordinate pair and then did nothing at all
once suggestions were on screen. The button was dead for text, so the name
fallback in SearchesController — LOWER(name) LIKE — was unreachable even
though it works. That handler existed only to block the submit, so it is
gone together with its binding.

The same dropdown could also kill the controller. renderResults kept every
rendered row in lastSearchResults, placeholders included, so Enter while
"Searching…" or "Nothing found" was on screen ran selectResultByIndex(0),
reached setCoordinates(undefined, undefined) and threw on undefined.toFixed.
Stimulus stayed dead until a reload.

The array now holds only rows that can actually be picked — a label with
finite coordinates — and data-idx numbers those instead of the rendered
list, so both placeholder states are unselectable by construction rather
than by a check someone has to remember. Junk coordinates from the geocoder
fall out under the same rule.

Suggestions still come from Nominatim in the browser; moving them onto the
local city table is a separate change.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The form under /courts/:id/suggestions/new carried a free-text comment,
and its placeholder was the game form's example about looking for one
more player — copied together with the key when the form was added. The
field does not belong there at all: a correction is a set of changed
court fields, and the moderator reviews those, not a note beside them.

With the field gone a suggestion has to change something, so the model
now requires a payload instead of "a payload or a comment", and the
error says so in all three locales. The check runs on create only: rows
saved before this change may hold a comment and no payload, and a
moderator must still be able to approve or reject them. Their comment
keeps showing on the review page, and the column stays as it is.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@denis1011101
denis1011101 merged commit 0a5c2a2 into main Aug 25, 2026
4 checks passed
@denis1011101
denis1011101 deleted the backlog/b-33-search-input branch September 4, 2026 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant