fix(sfm): page polish from the 1c bench -- #6, #10, #12, #16 (Batch 2)

- #6 Config tab by serial: the empty legacy edit form stays hidden (settings
  are read-only until phase 5); the settings box shows from the start, 'Not read
  yet', and a different unit's settings are never left on screen.
- #10 A start/stop that went out but was not confirmed is no longer called
  'failed'.  The route now adds 'sent' (acknowledged / unknown) and 'audit_id'
  to a ChangeUnconfirmed -- same status, same message -- and the page says
  'Start monitoring not confirmed: <what happened, audit record>'.
- #12 Device tab by serial: the empty legacy Compliance/Project tables are
  hidden behind a pointer to the Config tab; a Micromate's Firmware card reads
  'Thor line (version not read)' (its version string is in 0x01, undecoded).
- #16 A 504 with nothing sent adds: the connection opened, so the modem is
  reachable -- another program (THOR or Blastware) may be holding the line, or
  the unit is busy.  Measured 2026-10-29: THOR polling leaves SFM a 0-byte 504.

New logic lives in sfm/static/device_routing.js (firmwareLabel,
deviceErrorText, changeErrorText, serialPanes) under Node tests; the page glue
in sfm_webapp.js only applies them.  Checked in jsdom against the real page
(served at a fake origin, /static from disk): all four, legacy mode unchanged,
no script errors.

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-02 16:22:22 -05:00
1 parent 2b886c4f39
commit 8123d75d72
7 files changed
+163 -22

No files matched your search

@@ -681,7 +681,9 @@ a short plan; #14 waits for the line-hold decision above.
4. List vector sum 0 / −0 for three events whose peaks reach 1.08 in/s --
suspected escapes in the `0C` record (not checked).
5. Stored S3 event: client "Terra-Mechanic" (last letter missing) -- unexplained.
6. Page: the Config tab shows the empty write form until Read in serial mode.
6. ✅ **Fixed 2026-11-02 (Batch 2):** by serial the edit form stays hidden and the settings
box shows from the start ("Not read yet"); another unit's settings are cleared.
Page: the Config tab shows the empty write form until Read in serial mode.
7. `/db/events` 500 "database is locked" on the first page load against a new DB.
8. ✅ **Fixed `9492e49`**, plus `3a1d34a` ("already stored" also matches the Blastware
name: a histogram's row sits a second off its 0C time). The download carries the assembled Blastware file and is
@@ -704,10 +706,14 @@ a short plan; #14 waits for the line-hold decision above.
**S3 start over a modem:** the line dropped during the sensor check, the
read-back hit `Broken pipe` and did not reconnect → 503 though the start
worked. Fix: reconnect for the read-back (reads only; the send stays single).
10. Page: "Start monitoring failed:" on a sent-but-unconfirmed change -- wording.
10. ✅ **Fixed 2026-11-02 (Batch 2):** the start/stop route adds `sent` + `audit_id` to a
ChangeUnconfirmed (same status and message); the page says "… not confirmed:".
Page: "Start monitoring failed:" on a sent-but-unconfirmed change -- wording.
11. S3 stop ~19 s, 11.6 s of it the identity check (a full connect) vs ~1 s for a
serial-only read. **Identified only** (speed is secondary to reliability).
12. Page, serial mode: the Device tab's empty legacy compliance table; S4
12. ✅ **Fixed 2026-11-02 (Batch 2):** by serial the legacy tables are hidden behind a
pointer to the Config tab; a Micromate's Firmware reads "Thor line (version not read)".
Page, serial mode: the Device tab's empty legacy compliance table; S4
Firmware "—" (should say Thor line).
13. S4 mic in the event's peaks "0.0 dBL" vs 96.54 dB(L) in the file -- the
`0x0C` mic denormal parked above, now visible.
@@ -717,7 +723,10 @@ a short plan; #14 waits for the line-hold decision above.
**RETRACTED 2026-10-29: not a bug.** `sent` is documented as 1 acknowledged, 0
nothing sent, NULL unknown (`sfm/database.py`, `change.py`); a frame answered by a
ring instead of its ack is exactly unknown, and the row's `error` says it was sent.
16. Page: a 504 on a unit THOR holds should say "connected, but no reply --
16. ✅ **Fixed 2026-11-02 (Batch 2):** a 504 with nothing sent adds "the connection opened,
so the modem is reachable — another program (THOR or Blastware) may be holding
this unit's line, or the unit is busy".
Page: a 504 on a unit THOR holds should say "connected, but no reply --
another program may be holding this unit's line".
17. ✅ **Range part fixed 2026-11-02:** a MiniMate downloaded *while monitoring*
answers 1A with its device-info block, so no range was read and the stored