2.5 KiB
2.5 KiB
Encryption Landscape Card — Ring + Key Redesign
Date: 2026-08-19
Problem
The "Encryption Landscape" recon card currently leads with a text headline
(WPA2-PSK / 54 of 96 APs) that duplicates the ring graph below it and is of
little value. The ring itself draws an inline legend on the canvas in a single
row that overflows the 190px card width (6 labels) and gets clipped. The card
should be a proper ring graph with a readable key.
Design
- Remove the
encValue/encSubtext line (WPA2-PSK/54 of 96 APs) entirely. Title + ring + legend tell the whole story. - Ring: existing doughnut grows to fill the card body (canvas ~120px tall),
plain hole. Segments come from the actual
reconEncBucketfamily keys (Open / WEP / WPA / WPA2-PSK / WPA2-Enterprise / WPA3-Personal / WPA3-PSK / WPA3-Enterprise / Unknown) — the nominal six-bucket list was a wrong assumption:reconEncBucketnever returnsWPA2/WPA3/Enterpriseverbatim, so the ring drew an empty ring on WPA2-dominated data. Families are ordered byRECON_ENC_ORDER; colors cycleRECON_ENC_COLORS. - Legend: move out of the canvas into real HTML below the ring. Flex-wrap so
entries never clip at 190px. Each entry: colored dot + label + count
(
● WPA2-PSK 44). Zero-count families are never produced (built from non-zeroencCountskeys). The legend div carries both the class and the idrecon-enc-legend— drawCharts looks it up withgetElementById, and a class-only element made the population block silently no-op. - Empty state unchanged: "No encryption data yet — run a scan."
- Data source, per-scan bucketing (
reconEncBucket), re-sync, and the 5-card layout are untouched. The other cards are untouched.
Implementation notes
chart.js:MiniChart.doughnutkeeps thelegendoption for any other callers (the recon landscape doughnut calls withlegend:false; the enc card switches tolegend:falsesince HTML legend replaces it).views.js: dropencValue/encSub; build an HTML legend container (#recon-enc-legend) populated indrawChartsfrom the sameencCounts; ring drawn with{ legend: false, height: ~120 }from a sharedencSegsarray (real family keys,RECON_ENC_ORDER-sorted, cycled colors).app.css:.recon-enc-legendflex-wrap styles + dot/entry styles.- Ring hole stays plain (no center text).
- On-device verification MUST assert the legend has non-empty entries (class/id mismatch and the bucket-name mismatch both fail silently).