feat(watchlist): the DXHunter watchlist as an OpsLog tab

The concept, transplanted: a list of callsigns or prefixes being hunted,
matched against the live spot stream, one card per entry with the spots
underneath and the two questions that matter answered on every line — is this
slot still needed, and what is it worth (the cluster's own NEW badges, read
from the same status index).

The file is DXHunter's own watchlist.json, field for field, ClubLog block
included though phase 2 will fill it — a file that round-trips unchanged is the
whole of 'same format', and a test pins it with a real DXHunter entry. Global
(dataDir), not per profile.

CONTEST is per entry, not the global mode DXHunter has: a contest entry is
judged against the current UTC day — the boundary lives in the query's date
bound, so midnight needs no timer and resets nothing. Normal entries read the
same in-memory worked index the alerts use. Prefix matching is why RI0SP
catches RI0SP/MM, pinned by test.

Notify goes through the existing alert:fired event — the frontend already
toasts and sounds it — throttled to one alert per entry per two minutes,
because a DXpedition lights every skimmer on the planet.

Tab wired like NET Control: opt-in from Tools, persisted, closable. Single
click fills the callsign, double click works the spot — the cluster's own
gesture, kept.
This commit is contained in:
2026-08-29 00:25:40 +02:00
parent 284ee4ba7c
commit e4abcda94f
12 changed files with 991 additions and 3 deletions
+13
View File
@@ -30,6 +30,7 @@ import {lotwusers} from '../models';
import {lookup} from '../models';
import {netctl} from '../models';
import {scp} from '../models';
import {watchlist} from '../models';
export function ACOMSetOperate(arg1:boolean):Promise<void>;
@@ -1357,6 +1358,18 @@ export function UploadCallsign(arg1:string):Promise<string>;
export function UploadQSOsManual(arg1:string,arg2:Array<number>):Promise<void>;
export function WatchlistAdd(arg1:string,arg2:boolean):Promise<void>;
export function WatchlistEntries():Promise<Array<watchlist.Entry>>;
export function WatchlistRemove(arg1:string):Promise<void>;
export function WatchlistSetContest(arg1:string,arg2:boolean):Promise<void>;
export function WatchlistSetNotify(arg1:string,arg2:boolean):Promise<void>;
export function WatchlistWorkedSlots(arg1:Array<main.WatchlistSlotQuery>):Promise<Array<boolean>>;
export function WebPublishColumns():Promise<Array<Record<string, string>>>;
export function WinkeyerBackspace():Promise<void>;
+24
View File
@@ -2654,6 +2654,30 @@ export function UploadQSOsManual(arg1, arg2) {
return window['go']['main']['App']['UploadQSOsManual'](arg1, arg2);
}
export function WatchlistAdd(arg1, arg2) {
return window['go']['main']['App']['WatchlistAdd'](arg1, arg2);
}
export function WatchlistEntries() {
return window['go']['main']['App']['WatchlistEntries']();
}
export function WatchlistRemove(arg1) {
return window['go']['main']['App']['WatchlistRemove'](arg1);
}
export function WatchlistSetContest(arg1, arg2) {
return window['go']['main']['App']['WatchlistSetContest'](arg1, arg2);
}
export function WatchlistSetNotify(arg1, arg2) {
return window['go']['main']['App']['WatchlistSetNotify'](arg1, arg2);
}
export function WatchlistWorkedSlots(arg1) {
return window['go']['main']['App']['WatchlistWorkedSlots'](arg1);
}
export function WebPublishColumns() {
return window['go']['main']['App']['WebPublishColumns']();
}
+80
View File
@@ -4301,6 +4301,24 @@ export namespace main {
this.text = source["text"];
}
}
export class WatchlistSlotQuery {
call: string;
band: string;
mode: string;
contest: boolean;
static createFrom(source: any = {}) {
return new WatchlistSlotQuery(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.call = source["call"];
this.band = source["band"];
this.mode = source["mode"];
this.contest = source["contest"];
}
}
export class WebPublishStatus {
last_run: string;
last_err: string;
@@ -5990,6 +6008,68 @@ export namespace udp {
}
export namespace watchlist {
export class Entry {
callsign: string;
// Go type: time
lastSeen: any;
lastSeenStr: string;
// Go type: time
addedAt: any;
spotCount: number;
isContest: boolean;
notify: boolean;
isExpedition: boolean;
clubLogQSOs24h: number;
clubLogTotalQSOs: number;
clubLogHasOQRS: boolean;
clubLogLiveStream: boolean;
// Go type: time
clubLogUpdatedAt?: any;
static createFrom(source: any = {}) {
return new Entry(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.callsign = source["callsign"];
this.lastSeen = this.convertValues(source["lastSeen"], null);
this.lastSeenStr = source["lastSeenStr"];
this.addedAt = this.convertValues(source["addedAt"], null);
this.spotCount = source["spotCount"];
this.isContest = source["isContest"];
this.notify = source["notify"];
this.isExpedition = source["isExpedition"];
this.clubLogQSOs24h = source["clubLogQSOs24h"];
this.clubLogTotalQSOs = source["clubLogTotalQSOs"];
this.clubLogHasOQRS = source["clubLogHasOQRS"];
this.clubLogLiveStream = source["clubLogLiveStream"];
this.clubLogUpdatedAt = this.convertValues(source["clubLogUpdatedAt"], null);
}
convertValues(a: any, classs: any, asMap: boolean = false): any {
if (!a) {
return a;
}
if (a.slice && a.map) {
return (a as any[]).map(elem => this.convertValues(elem, classs));
} else if ("object" === typeof a) {
if (asMap) {
for (const key of Object.keys(a)) {
a[key] = new classs(a[key]);
}
return a;
}
return new classs(a);
}
return a;
}
}
}
export namespace webpub {
export class Config {