feat(logging): let operators log every supported mode (JS8/FST4/Q65/…), not just 8#243
Merged
Merged
Conversation
The Quick Log card and the full new-contact form both hard-coded an 8-mode menu (SSB/CW/FT8/FT4/RTTY/PSK31/AM/FM). Search already offers the full canonical mode list (#242) and ADIF import promotes submodes like JS8/FST4/JT65/Q65/PSK63/Olivia — so an operator could import or filter those modes but could not *log* one without editing the QSO afterward. Both forms now draw their menu from the canonical AMATEUR_MODES, exactly as they already do for AMATEUR_BANDS. The per-mode RST default heuristic (duplicated and drifting between the two forms) is centralized as modes.defaultRstForMode, preserving the classification each form used. 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 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
Both logging forms — the dashboard Quick Log card and the full New Contact page — hard-coded the same 8-entry mode menu:
Meanwhile the rest of the app has moved past that list:
SUBMODEto the stored mode (feat(adif): store the ADIF submode (FT4/JS8/PSK31) as the QSO mode on import #240), so a JS8 or Q65 run lands in the log asJS8/Q65.The result was a drift: an operator could import and filter those modes, but could not log one directly. Working a JS8 or Q65 station from the dashboard meant picking the wrong mode and fixing it after the fact. This is exactly the class of hard-coded-list-drift the search filters were fixed for in #241/#242.
Solution
AMATEUR_MODES(src/lib/modes.ts) — precisely the way they already source their band menu fromAMATEUR_BANDS. Every mode the log can store is now loggable, and the list can never fall behind import/search again.-10for the digital families,59otherwise) was duplicated across the two forms with two subtly different, incomplete copies. It's now a singledefaultRstForMode(mode)helper in the canonical modes module. The classification is preserved exactly for every mode both forms already handled, and extended to the newly loggable digital modes (JS8, FST4, JT65, JT9, Q65, MSK144, PSK63).No new options were removed — all 8 legacy modes remain, in the same lead position (SSB/CW/FT8/FT4 stay at the top of the list). The menus are ordered common-first, so the everyday phone/CW modes are still the first thing an operator sees.
Behavior note
On the New Contact page, selecting a mode that fell outside the old three
ifbranches (e.g.DMR) previously left the RST untouched; it now resets to59, matching what the Quick Log card already did. This makes the two forms consistent and is a sensible default for digital-voice/image modes.Testing
npm run typecheck— cleannpm run lint— cleannpm run build— succeedsnpx playwright test tests/modes.spec.ts— 12 passed, including newdefaultRstForModecoverage (CW→599, phone→59, dB modes→-10, digital-voice/image→59, case-insensitivity, backward-compat with the pre-centralization classification, and a default for every canonical mode).Future follow-up
-10default currently also covers RTTY/PSK/MFSK/Olivia/Contestia. That's preserved from the prior behavior (not necessarily conventionally correct — RTTY/PSK operators often send RST), and could be revisited separately if desired.