update to 0.16.0 #72
Reference in New Issue
Block a user
Delete Branch "dev"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Covers everything since 0.15.0: per-module status (independent sound/vibration
lifecycle, new project_modules.status column + migration), live monitoring on
the internal project Overview, browsable vibration events (Events sub-tab +
location filter + sortable columns), 24-Hour session period type, redesigned
project cards + per-module quick-open, the module-folder header restructure, and
five fixes (SLM start false-error, classify-modal dropdown + stuck button,
deployment GPS on existing locations, event date filters).
/admin/users page and /api/admin/users/* JSON CRUD endpoints, all behind require_role("superadmin"). Temp passwords are returned once on create/reset and never stored in plaintext. Admins get 403; password_hash is never leaked. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>The client portal has a live dashboard but the internal project page only showed static counts. Add a portal-style live section to the Overview tab so operators can see real-time sound levels at a glance. Backend: - New GET /api/projects/{id}/live-stats — resolves each sound NRL to its active SLM unit and returns SLMM's cached /status snapshot (concurrent fetch). Internal-rich: includes battery/power/reachability the portal scrubs. Degrades to no_device/unreachable/no_data per location. Frontend (project detail Overview tab): - Rollup strip (live / offline / loudest-now) + a live tile per NRL with a Live/Stopped/Offline/Wedged badge, color-coded Leq (55/70 thresholds), Lp/Lmax, last-seen, and battery/power. - Self-refreshes every 15s, pauses when the browser tab is hidden, and sits outside the 30s htmx dashboard swap so it never flickers. Polls only for projects with the sound module. Reuses the same SLMM /status source as the portal; no SLMM changes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>Each live monitoring tile is now a clickable link to its NRL detail page (/projects/{id}/nrl/{location_id}) — same target as the NRL card name — with a hover border + lift affordance so it reads as clickable. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>Sessions could only be tagged day or night (weekday/weekend). 24/7 continuous jobs had no fitting period type. Add "24-Hour" (full_24h) — a single full-day period covering day + night. UI (session_list.html): - Full-width "24-Hour" button under the WD/WE x Day/Night grid; teal badge. - Selecting it clears + disables the hour inputs (no window); reopening an existing 24-Hour session opens with hours disabled. Badge current-period kept in sync after save. Backend (projects.py): - full_24h added to VALID_PERIOD_TYPES and the session-label maps ("... - 24-Hour"). Operator-set only; never auto-derived. - Combined report: include ALL rows for a 24-hour session (no day/night window filter) and split them by hour into the three non-overlapping buckets — Daytime 7-18:59, Evening 19-21:59, Nighttime 22:00-06:59. Empty period columns are dropped downstream, so it shows whatever periods have data. Scoped to the combined-report path; the older per-session single report still uses the fixed Evening/Nighttime layout. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>The /deploy classify "Assign to existing location" path dropped the captured GPS — only "Create new location" applied it — so units assigned to pre-existing coordless locations left those locations without a pin. - Classify (promote) now backfills the captured GPS onto an existing location that has no coordinates (doesn't clobber operator-set coords). - Add "Reforward info" button on Assigned deployment cards + endpoint POST /pending/{id}/resync-location that re-pushes a capture's GPS onto its assigned location (explicit action, overwrites). Fixes already-classified locations and guards against this recurring. Logged to unit history. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>Two additions to the project Vibration tab: - Events sub-tab (next to Locations): a project-wide events table across all vibration locations. New GET /api/projects/{id}/vibration-events fans events_for_location across the project's vibration locations, tags each event with its location, and merges newest-first (From/To date filters, Real/FT filter, limit). Table columns Timestamp/Location/Serial/Tran/Vert/Long/PVS/ Mic/Flags; rows open the shared event-detail modal (Chart.js + event-modal.js come from the modal partial). Lazy-loads on first open; refreshes on sfm-event-review-saved. - Last event per location card: thread last_event (already in events_for_location stats) through the locations endpoint and show "Last event: …" on vibration cards. Reuses the same event source + modal as the per-location Events tab. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>Each ProjectModule now carries its own status (active|on_hold|completed) so one half of a combined project can wrap up while the other keeps running — e.g. mark Sound "completed" while Vibration stays "active", without archiving the whole project. - models.py: ProjectModule.status column (default 'active') - migrate_add_module_status.py: idempotent ALTER (run on prod before deploy) - projects.py: _get_module_statuses() helper, MODULE_STATUSES, and a PUT /{id}/modules/{type}/status endpoint; module_status now included in the project GET, header, and /list contexts so the UI can render it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015m9FuJvk65kJmmP3c9c6r1