Skip to content

feat: callsign lookup while typing (FR-LOG-05) and spot-click prefill (FR-LOG-06) - #254

Merged
dc0sk merged 3 commits into
mainfrom
feat/wavelog-lookup
Oct 28, 2026
Merged

dc0sk merged 3 commits into
mainfrom
feat/wavelog-lookup

Conversation

@dc0sk

@dc0sk dc0sk commented Oct 28, 2026

Copy link
Copy Markdown
Owner

Completes section R (QSO logging to Wavelog): FR-LOG-05 and FR-LOG-06 were the last two proposed requirements.

Lookup while typing (FR-LOG-05)

  • After the call has been unchanged for 400 ms and has at least three characters including a digit, K4 Remote asks Wavelog's lookup with the band and the main ADIF mode (MFSK, not FT4; Wavelog compares the main mode).
  • The strip shows the country, continent, name and grid, plus whether the call was worked before: at all, on this band, on this band and mode, or new.
  • The lookup runs on its own thread with its own 5 s timeout, so a slow send can't delay it. Only the newest waiting request is asked, and each call/band/mode is asked once.
  • An answer is shown only while the form still has the call, band and mode it was asked for.
  • A 401 or 403 turns the lookup off until the URL or token changes, so a dead token isn't sent with every call typed (Wavelog rate-limits failed authentication per IP).
  • No lookup while the queue is paused or Wavelog is unreachable (new Status.unreachable).

Spot-click prefill (FR-LOG-06)

  • A nameplate click sends SpotQsy with the call. The call goes into the call field only if logging is set up and the field is empty, and nothing is sent. The click then tunes exactly as before.

Verification

  • 11 new tests (3 in k4-log, 8 in the app). Each new rule was broken once on purpose, 16 times in all, and each break turned its own test red.
  • Against the local Wavelog: the FT4 QSO looked up as MFSK is reported as worked on this band and mode; as FT4, only on this band.
  • On screen (demo build, local Wavelog):
    • a DL1ABC nameplate click filled the empty call and showed the lookup;
    • a second click tuned and left the call in place;
    • a typed call showed no lookup while typing and "BRAZIL (SA) · new" once settled.
  • Full gate green twice: 670 passed, 0 failed; clippy and xtask clean.

Found along the way

  • My new unreachable test was flaky: it failed 3 of 5 gate runs because it assumed two entries queued in the same second are listed in order. They aren't (whole-second file names plus a random id). Fixed by counting the requests instead of ordering them.
  • Open: for the same reason, two QSOs logged within the same second can be sent in either order. Each carries its own times, so nothing is lost. Recorded in ledger 4.59, not fixed here.
  • The private D-Bus session used for screen tests was not isolation either: its default config started a keyring daemon that went looking for the real one. No secret was touched. Runs now use a bus with no activatable services, checked by a probe before launch.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Ma4bQKqGNFTYyVSEKPcXRk

Simon Keimer and others added 3 commits October 28, 2026 08:47
… (FR-LOG-06)

- k4-log: lookup.rs -- when to ask (three characters, a digit, callsign characters), the
  query (band + main ADIF mode), the reply parsed as the local Wavelog sends it.
- app: a lookup thread with its own transport (5 s), newest request only; 401/403 turn the
  lookup off until the URL or token changes; no lookup while the queue is paused or Wavelog
  unreachable (new Status.unreachable); 400 ms settle; each call/band/mode asked once; an
  answer shown only for the call, band and mode it was asked for.
- spectrum: a nameplate click sends on_spot with the call; SpotQsy offers it to an empty
  call field, then tunes exactly as before. Nothing is sent.
- local-instance test: an FT4 QSO looked up as MFSK is worked on band and mode, as FT4 not.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ma4bQKqGNFTYyVSEKPcXRk
…NGELOG); the unreachable test counts requests instead of ordering them

The test assumed two entries queued in one second are listed in queue order; the
queue's file names have whole seconds and a random id, so it failed 3 of 5 gate runs.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ma4bQKqGNFTYyVSEKPcXRk
…, not only how many; ledger 4.59 wording

From review: counting requests alone would pass a worker that sent the held entry.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ma4bQKqGNFTYyVSEKPcXRk
@dc0sk
dc0sk merged commit 658c89e into main Oct 28, 2026
5 checks passed
@dc0sk
dc0sk deleted the feat/wavelog-lookup branch October 28, 2026 10:04
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