Skip to content

fix: review follow-ups for Time Shift playback and the VOACAP heatmap - #1270

Merged
accius merged 1 commit into
accius:Stagingfrom
KoenVdH:fix/review-followups
Nov 9, 2026
Merged

accius merged 1 commit into
accius:Stagingfrom
KoenVdH:fix/review-followups

Conversation

@KoenVdH

@KoenVdH KoenVdH commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

This PR takes up the non-blocking review notes on #1263, #1265 and #1266. Thanks for the careful reviews.

#1265: VOACAP on the globe

  • Settings changes reach the globe at once. subscribeVoacapSettings now also listens for openhamclock-config-change. It only fires when mode or power actually change, so unrelated settings such as the theme don't trigger a refetch. A mode or power change in the main Settings now updates the globe's fetch and its panel's dropdowns immediately, instead of after the 5-minute refresh.
  • Status line after a remount. publishVoacapData and getLastVoacapData keep the globe's last response summary, so a remounted panel shows its status at once instead of "Loading..." until the next refresh.

#1266: VOACAP and Time Shift

  • Past shifts. For a shifted day without a forecast (the past, or beyond the 27-day outlook), today's live SFI/K stand in, and the status line now says so with · today's solar. Shifting within today adds nothing, since the values are today's anyway.
  • Loading flicker. In useVOACAPHeatmap, a request that a newer one aborted no longer clears the newer one's loading state, so the status line no longer flickers during playback.

#1263: playback

  • Fine-slider centre label. The fine slider is now anchored on a whole display hour (an absolute time), so its centre reads e.g. 19:00z instead of real time plus offset (18:48z). It still re-centres when the display time leaves the ±3 h window.
  • Satellite Passes during playback. While playing, a short hint above the list says that passes update when you pause. The list keeps filtering on the moving display time while prediction waits.
  • Grayline Planner moves to subscribeDisplayTimeSettled, like the Sat and EME planners, so its windows no longer re-list five times a second.
  • VOACAP during playback stays on the live subscription, as you suggested: watching propagation move is the point.
  • Translations: still English only, through the defaultValues. That leaves the wording to translators. One string is new: satPasses.updatesWhenPaused.

Type of change

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

How to test

  1. Turn on VOACAP and switch to 3D, then change the propagation mode in Settings. The globe panel and the map update right away.
  2. On the 3D globe, hide and show the map controls. The VOACAP panel shows its status immediately.
  3. Turn on VOACAP and move Time Shift to −1 day. The status line ends with · today's solar.
  4. Turn on Time Shift. The fine slider's centre label is a whole hour, e.g. 18:00z at 18:28 UTC; after a +5 h shift it reads 23:00z.
  5. Open Satellite Passes and press ▶. The red hint appears above the list and disappears on ⏸.
  6. Run npx vitest run src/utils/voacapHeatmap.test.js src/components/VoacapGlobeControl.test.jsx src/components/TimeShiftControl.test.jsx.

Checklist

  • App loads without console errors
  • Tested in Dark, Light, and Retro themes (Dark only; the only new visual is a one-line hint in the existing Time Shift red)
  • Responsive at different screen sizes (no layout change)
  • If touching server.js: n/a
  • If adding an API route: n/a
  • If adding a panel: n/a
  • No hardcoded colors (the hint uses the existing Time Shift red)
  • No .bak, .old, console.log debug lines, or test scripts included

Full suite: 3775 tests pass, including 8 new ones covering the Settings sync, remount status, the today's solar and forecast notes, and the whole-hour fine-slider label. eslint reports no new warnings.

Side note for anyone running the suite locally: rig-bridge/plugins/hardware-plugins.test.js (the brightness plugin tests) writes rig-bridge's default config to the real ~/.config/openhamclock/rig-bridge-config.json. That resets a developer's radio settings and API token. I found it while testing this and am fixing it in a separate PR. Until then, HOME=$(mktemp -d) npx vitest run avoids it.

🤖 Generated with Claude Code

Addresses the non-blocking review notes on accius#1263, accius#1265 and accius#1266.

VOACAP on the globe (accius#1265)
- subscribeVoacapSettings also reacts to openhamclock-config-change, but
  only when mode or power actually differ: a mode/power change in the main
  Settings now reaches the globe's fetch and its panel at once instead of
  after the 5-minute refresh.
- publishVoacapData / getLastVoacapData keep the globe's last response
  summary, so a remounted panel shows its status line at once instead of
  "Loading..." until the next refresh.

VOACAP and Time Shift (accius#1266)
- Status line adds "· today's solar" for a shifted day without a forecast
  (the past, or beyond the 27-day outlook), where today's live SFI/K stand in.
- useVOACAPHeatmap: a request aborted by a newer one no longer clears the
  newer one's loading state (status flicker during playback).

Time Shift playback (accius#1263)
- Fine slider anchored on a whole display hour (absolute time): its centre
  reads e.g. "19:00z" instead of real time + offset ("18:48z").
- Satellite Passes: while playing, a hint says passes update on pause (the
  list filters on the moving display time while prediction waits).
- Grayline Planner moves to subscribeDisplayTimeSettled, like the Sat and
  EME planners.
- VOACAP stays on the live subscription during playback, as suggested.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@accius accius left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, Koen. This covers every note from the three reviews. I test-merged it onto current Staging: the full suite passes, lint shows no errors and the build is fine. Approving.

The pieces I checked closely:

  • subscribeVoacapSettings keeps its own last per subscriber and only fires on a real mode/power change, so a theme save doesn't refetch. Good.
  • Guarding setLoading(false) on signal.aborted is the right fix for the playback flicker.
  • Anchoring the fine slider on an absolute display hour reads much better. The clamped fineMin/fineMax keep it inside ±30 days.

One nit, not blocking: the Satellite Passes hint hardcodes #ff4d4d. voacapHeatmap.js already exports that as SHIFTED_COLOR ("the Time Shift colour"), so importing it would keep the two in step if the colour ever changes.

And thanks for flagging hardware-plugins.test.js writing to the real ~/.config/openhamclock/rig-bridge-config.json. It reset mine too, so the fix PR will be very welcome.

@accius
accius merged commit 7022100 into accius:Staging Nov 9, 2026
8 checks passed
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.

2 participants