detail
Second bug found while verifying the fix-log.html token fix was truly complete: the 'Add to Log' button's insertion logic checked for a bare '
---
' separator, but FIX-LOG.md actually uses
line endings throughout (confirmed directly: '
---
' present, '
---
' absent). The check silently always failed, so every entry added through the web UI landed appended at the absolute end of the file instead of after the header where new entries belong -- correct display order was preserved on-screen only because renderLog() re-sorts by parsed date/time client-side; the raw .md file itself would have drifted out of the newest-first convention that SOP-FIX-LOG.md documents and that other systems' manual/API writes rely on. Fixed: checks for '
---
' first (the real format), falls back to bare '
---
', falls back to plain append only if neither separator is found at all.