Skip to content

feat(logging): let operators log every supported mode (JS8/FST4/Q65/…), not just 8#243

Merged
patrickrb merged 1 commit into
mainfrom
optio/task-5f55fbf2-d9d2-47a5-820e-9de511b34699
Jul 24, 2026
Merged

feat(logging): let operators log every supported mode (JS8/FST4/Q65/…), not just 8#243
patrickrb merged 1 commit into
mainfrom
optio/task-5f55fbf2-d9d2-47a5-820e-9de511b34699

Conversation

@patrickrb

Copy link
Copy Markdown
Owner

Problem

Both logging forms — the dashboard Quick Log card and the full New Contact page — hard-coded the same 8-entry mode menu:

SSB · CW · FT8 · FT4 · RTTY · PSK31 · AM · FM

Meanwhile the rest of the app has moved past that list:

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

  • Both forms now source their mode menu from the canonical AMATEUR_MODES (src/lib/modes.ts) — precisely the way they already source their band menu from AMATEUR_BANDS. Every mode the log can store is now loggable, and the list can never fall behind import/search again.
  • The per-mode RST default (599 for CW, a dB-style -10 for the digital families, 59 otherwise) was duplicated across the two forms with two subtly different, incomplete copies. It's now a single defaultRstForMode(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 if branches (e.g. DMR) previously left the RST untouched; it now resets to 59, 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 — clean
  • npm run lint — clean
  • npm run build — succeeds
  • npx playwright test tests/modes.spec.ts — 12 passed, including new defaultRstForMode coverage (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

  • The dB-style -10 default 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.

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) <[email protected]>
@vercel

vercel Bot commented Jul 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
nodelog Ready Ready Preview, Comment Jul 24, 2026 9:08am

Request Review

@patrickrb
patrickrb merged commit bbd04cb into main Jul 24, 2026
5 checks passed
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