Refresh Play Store screenshots + richer demo-data harness - #770
Conversation
New 1200x2400 screenshot set captured on the PS_Shots emulator with the debug demo-data inject: decode list (full + compact), AZ map with PSK overlay, waterfall, logbook stats/recent/awards, POTA activation, the Band & Mode sheet, the Call CQ options sheet and the Hunt options sheet. Harness (src/debug DebugInject.kt) changes so the fake data looks like a real band instead of identical rows: - `decodes N` now draws from DEMO_SCENE: CQ / CQ POTA / CQ DX / reports / RR73 / 73 across three RX slots with varied SNR, offset, DT, NEW DXCC flags and cty country lookup; the partner row is a TO YOU + CALLING report; the "decoded this cycle" counter is set. - `wf N` streams FT8-shaped audio: 8-FSK tone hopping per 160 ms symbol with Costas sync blocks, per-station strength, 12.64 s bursts in alternating 15 s slots. - `psk N` also sets PskReporterClient.spotsOverride so the phone map's live "who heard me" overlay renders the demo spots offline. - `qsos` pool grows to 24 (8 US states so WAS has progress); `mycall`. PskReporterClient gains a @VisibleForTesting spotsOverride hook (null in normal operation). Unit tests cover the scene builder, report format, ME placeholder, symbol/burst synthesis and the override short-circuit. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #770 +/- ##
============================================
+ Coverage 42.29% 42.35% +0.06%
Complexity 226 226
============================================
Files 267 267
Lines 31745 31818 +73
Branches 3635 3649 +14
============================================
+ Hits 13425 13478 +53
- Misses 18063 18082 +19
- Partials 257 258 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🟡 Changes recommended
There are a couple of concrete correctness issues in the new debug inject path (stale PSKReporter override when psk=0, and locale-sensitive report formatting) that should be fixed before approval.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR upgrades the debug demo-data injection path to generate more realistic “busy band” decode rows and FT8-shaped waterfall audio, and adds a PSKReporter client override to allow the map’s “who heard me” overlay to be driven offline for Play Store screenshots.
Changes:
- Expanded
DebugInjectto script realistic decode scenes (slot-aligned timestamps, TO YOU placeholder, NEW DXCC flag, country/continent lookup) and synthesize FT8-like 8-FSK waterfall audio with Costas sync and slot/burst gating. - Added
PskReporterClient.spotsOverride(test/debug-focused) so debug inject can short-circuit network fetching and supply demo spots directly. - Added/updated unit tests covering the new demo audio behavior, decode-scene shaping, and PSKReporter override behavior.
File summaries
| File | Description |
|---|---|
| ft8af/app/src/testDebug/kotlin/radio/ks3ckc/ft8af/car/DebugInjectTest.kt | Adds tests for the FT8-like demo audio, slot/burst gating, Costas tones, and busy-band scene helpers. |
| ft8af/app/src/test/kotlin/radio/ks3ckc/ft8af/pskreporter/PskReporterClientTest.kt | Adds a test ensuring spotsOverride bypasses network/cooldown and can be cleared to restore live behavior. |
| ft8af/app/src/main/kotlin/radio/ks3ckc/ft8af/pskreporter/PskReporterClient.kt | Introduces spotsOverride and an early-return path in fetchSpotsForMe, plus reset coverage. |
| ft8af/app/src/debug/kotlin/radio/ks3ckc/ft8af/car/DebugInject.kt | Implements the richer demo decode scene, FT8-like audio synthesis, mycall support, and wiring for PSKReporter demo spots. |
Review details
- Files reviewed: 4/18 changed files
- Comments generated: 3
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| /** | ||
| * A CQ decode. Built via the (i3,n3,callTo,callFrom,extra) constructor so | ||
| * callsignTo is non-null ("CQ") — the phone's Decode list renders this same | ||
| * object and calls checkIsCQ()/getMessageText(), both of which NPE on a bare | ||
| * Ft8Message. i3=0,n3=0 = free-text, the safest render path. |
| /** A signed FT8 report field: `-08`, `+02`, `-15`. */ | ||
| internal fun formatDemoReport(snr: Int): String = | ||
| (if (snr < 0) "-" else "+") + String.format("%02d", kotlin.math.abs(snr)) |
| // "Who heard me" PSK spots — projected from grid to lat/lon like a real report. | ||
| if (spec.psk > 0) { | ||
| WhoHeardMeCache.spots = SAMPLE_PSK.take(spec.psk).mapNotNull { (call, grid) -> | ||
| val ll = try { MaidenheadGrid.gridToLatLng(grid) } catch (_: Exception) { null } | ||
| ?: return@mapNotNull null |
Summary
screenshots/(1200x2400, within Play's 2:1 limit), captured on the PS_Shots emulator via the debug demo-data inject: decode (full + compact), AZ map + PSK overlay, waterfall, logbook stats/recent/awards, POTA activation, Band & Mode sheet, Call CQ options, Hunt options.src/debug/.../DebugInject.kt) now produces realistic data: a scripted busy-band decode scene (CQ/POTA/DX/reports/RR73 over 3 slots, varied SNR/Hz/DT, NEW DXCC pills, country lookup, TO YOU partner row, cycle counter), FT8-shaped 8-FSK waterfall audio with Costas sync and slot-aligned bursts, 24 demo QSOs incl. US states,mycallextra.PskReporterClient.spotsOverride(internal,@VisibleForTesting, null in production) lets the inject feed the phone map's live "who heard me" overlay offline.Test plan
testDebugUnitTest --tests DebugInjectTest(26) and--tests PskReporterClientTest(14) passscreenshots/)Notes
DatabaseOpr.createDxccTablesimports dxcc_grid/ituList/cqzoneList row-by-row on a background thread at first DB creation; if the app is killed during those ~10 min the tables stay partial forever (Logbook Stats then show 1 DXCC). Worth a follow-up issue.🤖 Generated with Claude Code