feat(decodes): answer a station on click, DT and Freq, badge filters

Clicking a decode now ANSWERS it. It sends WSJT-X/MSHV a Reply message
(type 4), which is the same thing as double-clicking the line in their own
Band Activity window: the application looks the decode up, sets its
transmit frequency to the caller's and starts the exchange.

It deliberately does not tune the radio, which is what it did before and
why nothing happened. On FT8 the whole band sits inside one passband, so
moving the dial changes nothing about who gets answered - the decision
belongs to the decoding application, and the Reply is the only way to hand
it over. Tuning would also just fight it for the VFO. The entry is still
filled so the QSO can be logged here.

The reply is routed by PROGRAM ID, not by listener: two receivers can share
one multicast group, and answering a station heard on the 6 m instance by
talking to the 20 m one would start a call on the wrong band. It goes to
the address that instance's packets actually arrive from - a multicast
listener must answer the sender, never the group. WSJT-X matches the reply
against its own decode list, so the payload replays the decode field for
field: time, snr, delta time, audio offset, mode and message text.

Two columns added, DT and Freq - the audio offset inside the passband, not
the RF frequency, which is the same for every station in the list and says
nothing. Past about two seconds DT takes a warning tint: that station is
drifting out of the window.

The transmit strip. "You cannot see what you are sending, or who you are
calling" - two separate faults. The message was only ever threaded into its
period, and in FT8 you transmit in the slots you are NOT receiving in, so
its period had no decodes and the whole line was dropped; a transmit slot
now creates its period. And the state is a strip of its own at the top,
because it is the one thing on the screen that is about the operator rather
than the band. It is fed by every Status rather than only by one carrying
transmit text, so it can still name the station being called on MSHV and
older JTDX builds, which stop before tx_message in the Status payload.

"New only" became per-category badges, in the colours and the vocabulary of
the Chase New panel. None lit shows the whole band - this is a decode log
first, and a panel that opened by hiding most of the traffic would be lying
about what is on the air.
This commit is contained in:
2026-08-18 06:53:10 +02:00
parent d829726679
commit fba7e79a1c
9 changed files with 417 additions and 38 deletions
+28 -12
View File
@@ -94,7 +94,7 @@ import { ShutdownProgress } from '@/components/ShutdownProgress';
import { ClusterGrid } from '@/components/ClusterGrid';
import { cleanSpotter, inferSpotMode, spotModeCategory, spotStatusKey } from '@/lib/spot';
import { applySpotDisplay, readSpotDisplayOptions, spotIsWorked, SPOT_DISPLAY_OPTIONS_EXPOSED } from '@/lib/spotDisplay';
import { GetMatrixColors, GetRotorPresets, GetRowColors, GetSpotTTLMinutes, IsNewUSCounty } from '../wailsjs/go/main/App';
import { AnswerDecode, GetMatrixColors, GetRotorPresets, GetRowColors, GetSpotTTLMinutes, IsNewUSCounty } from '../wailsjs/go/main/App';
import { applyMatrixColors } from '@/lib/matrixColors';
import { WorkedBeforeGrid } from '@/components/WorkedBeforeGrid';
import { NetControlPanel } from '@/components/NetControlPanel';
@@ -2042,6 +2042,9 @@ export default function App() {
const DECODE_KEEP_MS = 30 * 60 * 1000;
const [decodes, setDecodes] = useState<DecodeRow[]>([]);
const [txMsgs, setTxMsgs] = useState<TxMsgRow[]>([]);
// The LIVE transmit state, replaced on every Status — what is going out now
// and to whom, which the period history cannot answer between overs.
const [txState, setTxState] = useState<TxMsgRow | null>(null);
// Staged like the cluster's, so a period arriving as one burst of fifty
// packets costs one status lookup and one render, not fifty of each.
const pendingDecodesRef = useRef<DecodeRow[]>([]);
@@ -3099,7 +3102,13 @@ export default function App() {
// The operator's own transmission. Status repeats it about once a second
// for the whole over, so it is recorded ONCE per message: the panel wants
// "I sent this in that period", not sixty copies of it.
const unsubTx = EventsOn('udp:tx_message', (m: any) => {
const unsubTx = EventsOn('udp:tx_state', (m: any) => {
// The live strip takes every Status: it has to say who is being called
// even between overs, and on a sender that never reports its transmit
// text at all.
setTxState(m as TxMsgRow);
// The period history takes only real transmissions — Status repeats
// itself once a second whether the carrier is up or not.
if (!m?.transmitting || !String(m?.msg ?? '').trim()) return;
setTxMsgs((arr) => {
const last = arr[arr.length - 1];
@@ -7176,18 +7185,25 @@ export default function App() {
<DecodesPanel
decodes={decodes}
txMsgs={txMsgs}
txState={txState}
spotStatus={spotStatus as any}
myCall={station.callsign}
// Same handler as a cluster spot click: one way to answer a
// station, whether it came off the telnet feed or the receiver.
onCall={(d) => handleSpotClick({
dx_call: d.call,
freq_hz: d.freq_hz,
freq_khz: d.freq_hz / 1000,
band: d.band,
comment: d.mode,
spotter: '',
} as any)}
// A click ANSWERS the station: it hands the decode back to
// WSJT-X/MSHV as a Reply, which is the same thing as
// double-clicking the line in their own window.
//
// Deliberately NOT a rig tune, unlike a cluster spot. On FT8
// the whole band is inside one passband, so moving the dial
// changes nothing about who gets answered — and it would only
// fight the digital application for the VFO. The entry is
// still filled, so the QSO can be logged here.
onCall={(d) => {
onCallsignInput(d.call, { force: true });
AnswerDecode(
d.instance ?? '', d.ms ?? 0, d.snr, d.dt ?? 0,
d.audio_hz ?? 0, d.mode ?? '', d.msg ?? '', !!d.low_conf,
).catch((e: any) => setError(String(e?.message ?? e)));
}}
/>
</TabsContent>
)}