fix(search): let operators filter by every band they can log (add 2200M/630M/4M/1.25M/33CM/13CM)#241
Merged
Conversation
…0M/4M/1.25M/33CM/13CM) The Search band filter hard-coded its own lowercase band list that had drifted from the canonical band plan (`AMATEUR_BANDS` in @/lib/bands). The logging forms (new-contact, QuickLogCard) present one-click pills for the full band plan, but the search dropdown omitted 2200M, 630M, 4M, 1.25M, 33CM and 13CM — so an operator could log a QSO on those bands yet never filter it back out. Source the dropdown from the shared band plan instead, eliminating the drift by construction. Server-side matching is already case-insensitive (`UPPER(band) = UPPER($n)`), so the uppercase canonical values match stored data. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced Jul 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The Search → Band filter hard-coded its own band list that had drifted out of sync with the rest of the app. The logging forms (
new-contact,QuickLogCard) present one-click band pills sourced from the canonical band plan (AMATEUR_BANDSin@/lib/bands), and the ADIF importer derives bands from the same plan — so a QSO can be logged/imported on any of 20 bands. But the search dropdown only offered 14, silently omitting:Result: an operator could log a contact on, say, 4M or 630M with a single click, then find it impossible to filter for that band in Search — the option simply wasn't in the list. The hard-coded copy was also lowercase (
'20m') while the app stores/derives uppercase ('20M'), a classic drift trap.Solution
Source the Search band dropdown from the single source of truth,
AMATEUR_BANDS, the same list the logging forms use. This removes the drift by construction — the search filter can no longer fall behind the band plan.Server-side matching is already case-insensitive (
UPPER(band) = UPPER($n)inbuildContactSearchQuery), so switching the option values from lowercase to the canonical uppercase form matches existing stored data without any migration.One line of behavior, plus an explanatory comment:
Testing
tests/bands.spec.tswith a test asserting the canonical band plan covers every band the search filter must offer — explicitly including the six previously-unfilterable bands and the legacy set (nothing regressed). This guards against the band plan ever being trimmed in a way that would re-break search coverage.npm run typecheck— cleannpm run lint— cleannpm run build— succeeds (/searchcompiles)npx playwright test tests/bands.spec.ts— 5/5 passScope / follow-up
🤖 Generated with Claude Code