v0.13.2 - s4 event pipeline complete #56
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?
Three additions to the shared event-detail modal, closing the gap versus the standalone SFM webapp: (1) "Show Event Report PDF" button toggles an inline iframe inside the modal (no second-layer modal, no new tab). Lazy-loaded — src isn't set until first reveal, so closing the modal without opening the PDF never spends bandwidth. Sibling "Download PDF" link for direct save. Iframe sized to 80vh / min 600px so the typical letter-portrait single-page report fits with browser-native zoom controls available. (2) "Original .TXT report" download link, rendered only when sidecar.source.txt_filename is present (post-2026-05-27 ingest events). Hidden for legacy events to avoid 404 dead links. (3) Inline Review form — false_trigger checkbox + reviewer text input + notes textarea + Save button. PATCH /api/sfm/db/events/{id}/sidecar with {"review": {...}}. On save, fires a CustomEvent 'sfm-event-review-saved' on window so table-owning pages (/sfm, /unit/{id}, /admin/events, /projects/{p}/nrl/{l}) can listen and refresh their FT badges without reload. Status line shows the last-reviewed timestamp + Save success/failure feedback. Smoke-tested end-to-end against a real BE12599 histogram event: PATCH round-trip lands in the sidecar, GET reflects the change, no 500s on /report.pdf or /sidecar paths through the proxy. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>/admin/events previously rendered events as a flat table with no detail view — admins had to copy an event ID and open the standalone SFM webapp on port 8200 to see the chart, PDF, or sidecar metadata. Adds: - {% include 'partials/event_detail_modal.html' %} + script tag at the bottom of the page (mirrors the pattern in /sfm, /unit/{id}, /projects/.../nrl/...). - onclick on the table <tr> opens the modal via showEventDetail(id). - event.stopPropagation() on the checkbox <td> so selection clicks don't also open the modal. - Listener for the 'sfm-event-review-saved' CustomEvent fired by event-modal.js — reloads the table so any FT-flag changes made in the modal's review form land on the row without a full reload. Also propagates the same listener pattern to the three other pages that already include the modal (sfm.html, unit_detail.html, vibration_location_detail.html) — they call their respective loadEvents / loadUnitEvents / loadLocationEvents on the fire. Keeps the refresh-on-save UX consistent across every page that hosts the modal. Phase 1 of the SFM-into-Terra-View integration is now complete: chart, PDF preview, .TXT download, review form, and per-unit + admin event browsing are all native in Terra-View. The standalone SFM webapp on port 8200 remains as a diagnostic fallback but operators no longer need to bounce to it for routine workflows. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>v0.13.0 shipped the mic_unit_pref default as "dBL", which made the website chart's mic axis inconsistent with the PDF report (which renders psi). Original brief was always "psi on charts, dBL on peaks" — I implemented the default backwards. Operator caught it within an hour of rollout. Same-day patch: - backend/models.py: default "dBL" → "psi" - migrate_add_mic_unit_pref.py: idempotent across both fresh DB ("add column with psi default") and v0.13.0 upgrade ("flip dBL rows to psi"). One-row table, freshness assumed. - backend/routers/settings.py: GET/PUT fallback "dBL" → "psi" - templates/settings.html: dropdown's `selected` flag moves to psi + reorders options + relabels with "(matches PDF report)" hint - backend/static/event-modal.js: module-level fallback + branch conditions flip to make psi the unset/error default Includes the "Captured at" → "Time received" relabel from earlier in the day (already-shipped commit43c804d) rolled into the release notes. Migration is idempotent + safe to re-run; rolled out on the dev container during this commit's smoke test. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>