Skip to content

Staging#33

Merged
MichaelWheeley merged 14 commits intoMichaelWheeley:feature/thai-language-devfrom
accius:Staging
Apr 3, 2026
Merged

Staging#33
MichaelWheeley merged 14 commits intoMichaelWheeley:feature/thai-language-devfrom
accius:Staging

Conversation

@MichaelWheeley
Copy link
Copy Markdown
Owner

What does this PR do?

Type of change

  • Bug fix
  • New feature
  • Performance improvement
  • Refactor / code cleanup
  • Documentation
  • Translation
  • Map layer plugin

How to test

Checklist

  • App loads without console errors
  • Tested in Dark, Light, and Retro themes
  • Responsive at different screen sizes (desktop + mobile)
  • If touching server.js: caches have TTLs and size caps (we serve 2,000+ concurrent users)
  • If adding an API route: includes caching and error handling
  • If adding a panel: wired into Modern, Classic, and Dockable layouts
  • No hardcoded colors — uses CSS variables (var(--accent-cyan), etc.)
  • No .bak, .old, console.log debug lines, or test scripts included

Screenshots (if visual change)

MichaelWheeley and others added 14 commits March 30, 2026 11:26
…le N0NBH data

Two bugs reported in propagation display:

1. Kp index (and SSN/SFI fallback) treated numeric zero as absent because the
   server used || null when resolving the current value from history.  A quiet
   geomagnetic day (Kp=0) caused kp.current to be set to null, which propagated
   to the header and layout displays as '--'.  Fixed by switching to ?? null /
   ?? '--' throughout (server route + Header, SpaceWeatherPanel, ClassicLayout,
   useSpaceWeather).  Also tightened the !result.sfi.current / !result.ssn.current
   guards to == null so a genuine zero is never treated as missing.

2. When hamqsl.com (N0NBH) was temporarily unreachable the server returned stale
   cached data indefinitely.  The error path never updated the cache timestamp so
   every subsequent request re-tried, failed, and served the same old data with no
   age bound.  Added N0NBH_MAX_STALE_TTL (4 h): beyond that the endpoint returns
   503 rather than misleading clients.  Normal and error-fallback responses now
   include fetchedAt and stale:true when serving fallback data.  useBandConditions
   passes these through extras; BandConditionsPanel and PropagationPanel show a
   stale badge in their headers when N0NBH data could not be refreshed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
NOAA changed noaa-planetary-k-index.json and noaa-planetary-k-index-forecast.json
from array-of-arrays to array-of-objects.  The old parser read d[0]/d[1] on each
row; with objects those are undefined, so parseFloat(undefined) goes to NaN then
0 for every entry, making kp.current always 0 regardless of actual conditions.

Both the server /api/solar-indices handler and the browser-side useSpaceWeather
hook detect the format (Array.isArray check) and read the correct field (d.Kp for
history, d.kp for forecast) in object format, with fallback to old array indexing.

Guard history values with Number.isFinite() instead of bare || 0.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…arser

getSolarData() in propagation.js fetched noaa-planetary-k-index.json
independently and parsed it with the old array-of-arrays accessor d[n][1].
NOAA now returns objects, so d[last][1] was undefined, parseInt gave NaN,
and the NaN || 2 fallback permanently locked kIndex at 2 — matching neither
the actual conditions nor the value shown in the header.

Apply the same format-detection fix (Array.isArray check, read d.Kp for
object format) used in the space-weather route.  Switch to parseFloat so
fractional Kp values (e.g. 4.67) are preserved rather than truncated.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…test entry

NOAA's f107_cm_flux.json array does not guarantee chronological order; the
last element in the array can be months old (observed: last entry was
2026-02-20 with flux=112 while the actual current value from 2026-04-02
was flux=140 at array index 0).

getSolarData() in propagation.js was using data[last].flux and therefore
reporting stale SFI to the panel footer.  Fix: reduce over the array to
find the entry with the maximum time_tag.

space-weather.js was building the SFI history chart with data.slice(-30)
on the unsorted array, giving a chart with out-of-order and non-recent
readings.  Fix: sort a copy by time_tag before slicing.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The N0NBH stale-data badge added in the previous commit had hardcoded
English strings.  Add band.conditions.stale.label and
band.conditions.stale.tooltip keys to all 16 language files and
replace the hardcoded literals in BandConditionsPanel, PropagationPanel,
and ClassicLayout with t() calls using {{mins}} interpolation.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ng from health check (#866)

Stop collecting, storing, and transmitting visitor IP addresses to third parties.
IPs are now only held as SHA-256 hashes in memory for dedup counting — never
persisted to disk or sent externally. Removes ip-api.com integration, country
statistics, and IP display from the dashboard and JSON health endpoint.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add a "Share Presence" toggle in Station settings so users can hide
their callsign from the Active Users map layer. Toggling off stops
heartbeats and sends an immediate leave beacon.

Add a Privacy section to the Community tab documenting the app's
data practices: no cookies, no tracking, hashed visitor stats,
opt-in presence, and local-only browser storage.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…Rate_dev

[Feature] Satellite range / range rate / doppler factor, with languages
… 3 routes

Visitor counting was limited to '/', '/index.html', '/api/config' while
session tracking covered all non-health/asset requests. This caused
concurrent sessions to far exceed reported unique visitors. Now both
use the same scope so the numbers stay consistent.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@MichaelWheeley MichaelWheeley merged commit c23de1a into MichaelWheeley:feature/thai-language-dev Apr 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants