Add callsign/grid/band search to the Logbook Recent tab#677
Merged
Conversation
The Recent tab listed every logged QSO with no way to search, so answering
the everyday question "have I worked this station before, and on what band?"
meant scrolling the whole log. Add a search box above the recent list that
filters as you type.
The match is a case-insensitive substring over the fields an operator actually
searches a log by — callsign (primary), grid, band, DXCC entity, and the stored
location — so a partial call ("K1A"), a grid ("FN42"), a band ("40M"), or a
country all narrow the list. A clear (✕) button resets it, and a distinct
"no matching QSOs" state keeps the search box in place so the query can be
refined. The match logic is extracted into a pure, unit-tested filterQsoRecords
helper; the search bar is a thin Compose wrapper over it.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #677 +/- ##
============================================
- Coverage 36.73% 36.71% -0.03%
- Complexity 197 211 +14
============================================
Files 216 219 +3
Lines 26882 27168 +286
Branches 3284 3340 +56
============================================
+ Hits 9876 9975 +99
- Misses 16781 16957 +176
- Partials 225 236 +11
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
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.
What & why
The Logbook Recent tab listed every logged QSO with no way to search. Answering the everyday operator question — "have I worked this station before, and on what band?" — meant scrolling the entire log. This PR adds a search box above the recent list that filters the log as you type.
Users notice this immediately: tap Logbook → Recent, type a partial call, and the list narrows to matching contacts.
Behavior
PA3XYZandW1PA) across the fields an operator actually searches a log by:FN42)40M)Japan)rememberSaveable, so it survives rotation/recomposition but resets when you leave the Logbook — matching the expectation that search is a transient "find this contact" action, not a persisted filter.Design
Per the project convention (Composables can't be unit-tested directly), all match logic is extracted into a pure top-level
internal fun filterQsoRecords(records, query); the search bar (LogSearchBar) is a thin Compose wrapper that just calls it. Sorting is unchanged — the filtered list still flows through the existingsortQsosByDateTimeDesc.Tests
New
LogbookSearchTest(pure JVM, no Robolectric) covering: blank/whitespace query passthrough, callsign prefix + mid-string substring, case-insensitivity, match by grid/band/DXCC/where, query trimming, no-match empty result, empty log, and null optional fields.:app:compileDebugKotlinalso passes. No decoder/TX/protocol code touched.Scope
Focused, additive, UI-only. Nothing outside the Recent tab changes.