Nova DSO Tracker 5.5.0 Released

Blueprint Migration Complete

The multi-release refactor of the monolithic nova/__init__.py is now complete. All routes have been migrated into dedicated blueprint modules, and supporting infrastructure has been extracted into focused packages:

ModuleWhat moved
nova/blueprints/api.pyAll /api/* routes, weather chain, telemetry_ping, help docs
nova/blueprints/tools.pyEquipment CRUD, import/export, journal photos, YAML portability
nova/blueprints/admin.py5 admin user-management routes (new dedicated admin_bp)
nova/migration.py18 YAML import/export, user provisioning, and catalog pack functions
nova/auth.pyConditional User model, login_manager, and load_user

nova/__init__.py is now a thin entry point that wires up the app, registers blueprints, and starts workers. No route logic remains in it.


Bortle-Aware AI Recommendations

The Ask Nova AI ranking and DSO notes features now factor in your Bortle scale and horizon mask settings:

  • Dark sites (Bortle 1–4) – No restrictions; all target types viable.
  • Suburban (Bortle 5–6) – Nudges toward narrowband filters and emission targets.
  • Bright sites (Bortle 7–9) – Strongly favours emission nebulae with dual-band filters.

Bortle scale and horizon mask presence are injected into the AI prompt context from the active Location model, so recommendations adapt automatically when you switch locations.


Cache Reliability Fixes

Several unbounded in-memory caches have been replaced with BoundedCache to prevent uncontrolled memory growth in long-running deployments:

  • SUN_EVENTS_CACHE and MOON_PHASE_CACHE – capped at 1,000 entries each in modules/astro_calculations.py.
  • Observable objects cache – moved into a dedicated BoundedCache in nova/config.py.
  • nightly_curves_cache key collisions – cache keys now include usernamelatlonaltitude_threshold, and sampling_interval so entries are correctly scoped per-user and per-location instead of colliding on object name + date alone.

A new calculate_moon_phase_cached() helper deduplicates three inline ephem.Moon() blocks into a single cached function, ensuring the moon phase is computed consistently everywhere.


Moon Phase Consistency

Fixed a mismatch between the moon phase shown on the dashboard and the graph view:

  • Both views now use consistent past-midnight date logic (hour < 12 rolls back one day).
  • Moon phase is computed at dusk time via a topocentric ephem.Observer everywhere.
  • Redundant phase update on initial graph view load is skipped to prevent SSR-to-AJAX flicker.

Mobile Improvements

  • Location switcher persists to server – selecting a location on mobile now saves it to the database so all pages (dashboard, outlook, object detail) use the same location consistently.
  • Object detail layout – full-viewport flex layout (100dvh) with a fixed-position edit-notes button that appears above the bottom nav only when the Notes tab is active.
  • Post-save redirect – saving notes on mobile now returns to the object detail page instead of the dashboard.

Bug Fixes

  • Dither fields in YAML export – structured dither fields (dither_typedither_amountdither_every) were missing from per-object journal downloads. They are now included.
  • Dither display in session detail – the detail template referenced entry.dither_display but the dict was built only from DB columns, so the computed value was missing. It is now injected via the dither_display helper.
  • Help topics 404 – PROJECT_ROOT in api.py resolved to nova/ instead of the project root after the blueprint migration, causing all /api/help/* routes to return 404. Fixed with a correct dirname chain.
  • Inspiration modal interpolation – single quotes in the template literal prevented ${wikiUrl} and ${source} from being interpolated, rendering them as literal text.
  • Heatmap status indicators – heatmap section JavaScript refactored for clearer status handling.

Code Quality

  • Removed unused imports across astro_calculations.py__init__.pyapi.pycore.pyjournal.pymobile.pytools.py.
  • Replaced bare except: with specific exception types in helpers.py and log_parser.py.
  • Removed debug print() statements from __init__.py.
  • Cleaned stale refactor markers and commented-out code from blueprints.
  • German translations marked as auto-generated in the i18n config.

Security

  • Telemetry debug endpoint – the /telemetry/debug route now requires login and admin-only access (previously accessible to any authenticated user).

Admin Blueprint

Admin user-management routes have been extracted from tools_bp into a dedicated admin_bp (nova/blueprints/admin.py):

  • 5 routes: list users, create user, toggle active, reset password, delete user.
  • Shared _admin_guard() helper deduplicates the repeated SINGLE_USER_MODE + admin-check pattern.
  • CSRF before_request hook included.
  • 10 new tests in tests/test_nova_admin.py covering guard logic, create, delete, and toggle paths.

Upgrade Notes

  • No database migration required – all changes are backwards-compatible.
  • No new dependencies – this release uses only existing packages.
  • Docker – no changes to the Dockerfile or entry point. Pull the new image and restart as usual.

Thanks for using Nova DSO Tracker! As always, feedback is welcome – please report any issues on GitHub.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top