name: ft8-test description: Run an end-to-end FT8 decode round-trip between two virtual wfweb rigs. Boots the testrig bench, drives both browsers via Playwright MCP, has each station CALL CQ on opposite slot parity, verifies each side decodes the other's CQ, screenshots both, and tears down. Use when the user asks to test FT8, run an FT8 QSO/decode, verify the ft8ts decoder, or validate the DIGI panel TX/RX path. (FT4 is a fast variant of the same panel — see the FT4 note; not run by default.)
Run an end-to-end FT8 decode round-trip between two virtual rigs: each station calls CQ on opposite slot parity, and each must decode the other's CQ. Drive both browsers via Playwright MCP, screenshot both sides, tear down. This is bench-only (virtual rigs, no hardware, no real RF).
This skill is the FT8 sibling of packet-test and reuses the same bench (scripts/testrig.sh) and Playwright lifecycle. Read the "Pitfalls" section before debugging — FT8 has one gotcha packet doesn't (RX audio must be enabled for the decoder to see anything).
Prerequisites (verify before starting; fix and stop if missing)
./wfweband./tools/virtualrig/virtualrigare built. If not:qmake wfweb.pro && make -j$(nproc)andcd tools/virtualrig && qmake && make -j$(nproc).- Repo
.mcp.jsonincludes--ignore-https-errorsfor the playwright MCP (wfweb's cert is self-signed; without it chromium fails withERR_CERT_AUTHORITY_INVALID). Verify the running MCP:pgrep -af @playwright/mcpmust show--ignore-https-errors. If.mcp.jsonwas just edited, the user must restart Claude Code (a/mcpreconnect re-uses cached args). Stop and tell them. - Load the playwright tools via ToolSearch:
select:mcp__playwright__browser_navigate,mcp__playwright__browser_snapshot,mcp__playwright__browser_click,mcp__playwright__browser_type,mcp__playwright__browser_take_screenshot,mcp__playwright__browser_wait_for,mcp__playwright__browser_evaluate,mcp__playwright__browser_close,mcp__playwright__browser_tabs,mcp__playwright__browser_select_option.
Boot the bench
./scripts/testrig.sh up 2
Both rigs come up on 14.074.000 USB — which is the 20 m FT8 dial frequency, so no retune is needed and audio gates (matching freq+mode) just like real FT8.
- A → https://127.0.0.1:9080 (virtual-IC7300-A)
- B → https://127.0.0.1:9090 (virtual-IC7300-B)
Per-tab UI bring-up (do for both A and B)
The FT8 panel is the DIGI bar, toggled from the MODE overlay (the FT8 button toggles the bar; it does NOT change rig mode — opening it forces USB + the FT8 dial freq automatically).
browser_navigateto the rig URL.- Wipe stale browser state (Playwright reuses its profile across runs):
browser_evaluate() => { localStorage.clear(); sessionStorage.clear(); }, thenbrowser_navigateto the same URL again. - Click the CLICK TO START splash (browsers refuse
AudioContextwithout a gesture). - Wait for RX audio to come up. This is the FT8-specific step packet doesn't need: the decoder only runs on RX audio, and the splash enables it asynchronously ~1 s after START. Poll until
window.audioEnabled === truebefore continuing — otherwise no audio reaches the decoder and nothing ever decodes. - Open MODE, then click the FT8 button (find by text
FT8among visible buttons). Confirmwindow.digiBarVisible === true. - Open settings (
#digiSettingsBtn), set MY CALL (#digiMyCall) and GRID (#digiGrid), then close (#digiSettingsCloseBtn). Dispatchinputevents so the handlers fire.- A:
W1AAA/FN20. B:W1BBB/FN21. - Both call AND grid are required —
digiCallCq()silently aborts (and pops the settings modal) if either is missing. The callsign is the shared station call (CW/FT8/JS8/FreeDV/APRS) — that's by design.
- A:
- Set opposite slot parity. A keeps the default TX EVEN (
digiCqParity === 0). On B, click#digiCqParityBtnonce to flip it to TX ODD (digiCqParity === 1). Opposite parity is mandatory: a station can't receive while it transmits, so if both call CQ on the same parity they transmit in the same slot and never hear each other.
When refs go stale across snapshots, drive directly via browser_evaluate with stable IDs (this is the normal path, not a fallback):
- Buttons:
digiSettingsBtn,digiSettingsCloseBtn,digiCqParityBtn,digiCallCqBtn,digiEnableTxBtn,digiHaltBtn,digiTuneBtn,digiCloseBtn - Fields:
digiMyCall,digiGrid,digiDxCall - Functions (global):
digiCallCq(),getMyCall(),getMyGrid(),toggleDigiBar(),getDigiSlotInfo() - State (globals on
window— classic script, NOT a namespaced object):digiDecodes(array of{msg, snr, dt, freq, time, slotIndex}),digiMode('FT8'/'FT4'),digiCqParity,digiTxEnabled,digiTxArmed,digiTxQueued,digiTxActive,audioEnabled,digiBarVisible
QSO sequence (single run — FT8)
- Both → CALL CQ: on each tab call
window.digiCallCq()(or click#digiCallCqBtn). This armsCQ <call> <grid>and enables TX. ConfirmdigiTxQueuedis"CQ W1AAA FN20"on A and"CQ W1BBB FN21"on B. - Wait for decodes (FT8 slots are 15 s; a decode appears only after a full slot completes). Poll up to ~75 s:
- On A:
window.digiDecodescontains an entry whosemsgmatchesCQ W1BBB FN21. - On B:
window.digiDecodescontains an entry whosemsgmatchesCQ W1AAA FN20. - In practice the first decode lands in ~10–20 s. Each entry carries a real
snr/dt/freq— sanity-check the SNR is finite (a genuine decode, not an empty array).
- On A:
- Screenshot both with
browser_take_screenshot,fullPage: true. Save as.playwright-mcp/wfweb-ft8-A.pngand...-B.png. (The MCP does NOT auto-target.playwright-mcp/— bare names land in the project root;/tmpis rejected as outside the allowed roots.) - Halt TX on both: click
#digiHaltBtn(setsdigiTxEnabled = false). Good hygiene even on a virtual rig.
Teardown and report
browser_close(both tabs), then./scripts/testrig.sh down.- Report PASS/FAIL and the two screenshot paths. PASS = each side decoded the other's CQ with a finite SNR.
Pitfalls — read before debugging
- The decoder needs RX audio.
handleAudioData()returns early whenaudioEnabledis false (no PCM reachesprocessDigiAudioChunk). CLICK TO START enables audio ~1 s later, so gate onwindow.audioEnabled === truebefore expecting decodes. This is the #1 cause of "nothing decodes". - Opposite parity is mandatory. Same parity on both ⇒ simultaneous TX ⇒ each is deaf during the other's transmission ⇒ zero decodes. A = TX EVEN, B = TX ODD.
- Call + grid both required. No grid ⇒
digiCallCq()aborts and opens the settings modal; you'll see TX never arm. - FT8 is slot-timed. Don't expect an instant decode — poll for up to ~75 s (a few 15 s slots).
getDigiSlotInfo()returns{slotIndex, slotPhase, remaining, period}if you need to reason about timing. digiDecodesis a window global, notwindow.Something.state. Readwindow.digiDecodesdirectly. (Packet useswindow.Packet.state; FT8 does not — it predates that pattern and uses top-levelvars.)- Don't skip
localStorage.clear()— prior runs leave a saved callsign/grid and could boot into a stale state. Clean-slate mirrors a fresh user. - Stale Playwright
ref=handles re-render constantly; drive viabrowser_evaluate+ the stable IDs above. - Screenshots are sandboxed to the project dir /
.playwright-mcp/;/tmpis rejected. - FT4 variant (optional, not run by default): clicking the mode label (
#digiModeLabel) toggles FT8 ↔ FT4; FT4 uses 7.5 s slots (digiPeriod()returns 7.5) so the round-trip is ~2× faster. To test FT4, toggle it on both tabs before CALL CQ and match the assert messages (sameCQ <call> <grid>text). Both rigs must be in the same submode or they won't decode each other.