fix(sfm): the top bar names a Micromate's firmware line; a stale overlay comment

- The page's top bar Firmware read '—' for a Micromate: Batch 2 gave the Device
  tab's card firmwareLabel() but not populateDeviceBar.  Seen at the bench
  2026-11-03; checked in jsdom ('—' before, 'Thor line (version not read)' after).
- save_imported_bw's overlay comment said the waveform codec was undecoded and
  gave +-10 in/s; the overlay now stays because production keeps a paired
  Blastware report as the record until the file-only decode has no blanks
  (flagged by the decode-checker session).  Comment only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SyJ2ip3Krb6dtdv2cXua44
This commit is contained in:
serversdownandClaude Opus 5.5 committed 2026-11-03 15:32:02 -05:00
1 parent f35845d403
commit 789e24be50
2 files changed
+10 -9

No files matched your search

+1 -1
View File
@@ -346,7 +346,7 @@ async function loadEventList() {
// ── Device bar ─────────────────────────────────────────────────────────────────
function populateDeviceBar() {
qs('di-serial').textContent = unitInfo.serial || '—';
qs('di-fw').textContent = unitInfo.firmware_version || unitInfo.firmware || '—';
qs('di-fw').textContent = firmwareLabel(unitInfo);
const cc = unitInfo.compliance_config || {};
qs('di-sr').textContent = cc.sample_rate ? `${cc.sample_rate} sps` : '—';
qs('di-rt').textContent = cc.record_time != null ? `${cc.record_time.toFixed(1)} s` : '—';
+9 -8
View File
@@ -345,14 +345,15 @@ class WaveformStore:
exc,
)
# If we have a report, overlay its device-authoritative fields
# (peaks, project, sample_rate, record_time) onto the Event
# BEFORE handing it to db.insert_events(). Without this overlay
# the DB row gets `peak_values` from _peaks_from_samples(), which
# runs the still-undecoded waveform codec on the BW body and
# produces ±10 in/s saturation values on every channel for every
# event. The sidecar JSON had the correct values via
# event_to_sidecar_dict(bw_report=...) but the DB columns didn't.
# If we have a report, overlay its fields (peaks, project,
# sample_rate, record_time) onto the Event BEFORE handing it to
# db.insert_events(). The file decode reads these itself now (the
# decode checker compares it with Blastware's XML reports, DL2's
# 70,042 events); the overlay stays because production keeps a
# paired Blastware report as the record until the file-only decode
# has no blanks. The sidecar's `bw_report` block keeps the report's
# own values either way. (The old reason -- an undecoded codec
# giving ±10 in/s -- has not held since the 2026-08 codec fixes.)
if bw_report is not None:
try:
event_file_io.apply_report_to_event(ev, bw_report)