Skip to content

Commit e2ce4e9

Browse files
Suncussclaude
andcommitted
refactor: API server modularization - route modules, extracted services; dashboard spectrogram end-of-clip fix
Content snapshot of dev (f524937..ad9191a): - api.py shrinks from ~4,700 lines to a slim composition root: routes move into core/routes/ (auth, settings, system, migration, media, images, species, observations, detections) and shared logic into focused services (api_infra, bird_image_service, detection_presenter, settings_store, update_service) - Logging is configured before the import-time DatabaseManager construction so its startup messages reach the configured handlers - Dashboard call player: the rolling spectrogram no longer scrolls a strip of blank columns in at the right edge when playback ends — a digital-silence gate on the analyser's raw waveform stops the scroll exactly when the signal ends Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WqhLxxU3aSJcRAHLJSLs2p
1 parent d0d34ff commit e2ce4e9

34 files changed

Lines changed: 5555 additions & 5025 deletions

‎CHANGELOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## [Unreleased]
44

5+
- Fixed the dashboard call player's rolling spectrogram scrolling a strip of blank columns in at the right edge when playback ended — the display now stops together with the audio
56
- Added a per-species summary table maintained alongside every detection, replacing repeated full-history scans as the source for species facts. It verifies itself at startup and rebuilds automatically if anything drifts
67
- Improved the heaviest species queries by serving them from the new summary table: the dashboard's recent-unique-species list drops from up to seconds on busy stations to ~1ms (this was a known cause of intermittent dashboard timeouts), the species catalog and gallery load in ~1ms instead of scanning the full detection history, and the species detail card computes about twice as fast
78
- Improved species detail chart loading: the per-species distribution queries now use an indexed time-range scan instead of examining every detection of the species per chart view — up to 7x faster on frequently detected species, most noticeable on low-power devices

0 commit comments

Comments
 (0)