Add sync error logging, extend error flash, fix unload saves

- Log workforce sync errors to backend stdout so they appear in docker logs
- Extend error flash from 5s to 15s so errors are readable
- Replace sendBeacon (POST-only) with keepalive fetch (PUT) on unload —
  sendBeacon was hitting 404s on all three unload saves

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
jtricerolph 2026-07-22 14:19:38 +00:00
parent c7066521ff
commit 18e24efbeb
14485 changed files with 1836116 additions and 33 deletions

52
frontend/node_modules/is-document.all/test/index.js generated vendored Normal file
View file

@ -0,0 +1,52 @@
'use strict';
var test = require('tape');
var inspect = require('object-inspect');
var forEach = require('for-each');
var v = require('es-value-fixtures');
var isDocumentAll = require('../');
test('non-DDA values', function (t) {
/** @type {unknown[]} */
var nonDDAs = [].concat(
// @ts-expect-error TS sucks with concat
v.primitives,
v.objects,
[
[],
/a/g,
new Date(),
function () {}
]
);
forEach(nonDDAs, function (nonDDA) {
t.equal(isDocumentAll(nonDDA), false, inspect(nonDDA) + ' is not document.all');
});
t.end();
});
test('document.all', { skip: typeof document !== 'object' }, function (t) {
t.plan(4);
/* globals document: false */
t.equal(isDocumentAll(document.all), true, 'document.all is document.all');
t.equal(isDocumentAll(document), false, 'document is not document.all');
var iframe = document.createElement('iframe');
iframe.style.display = 'none'; // Optional: keep it hidden
document.body.appendChild(iframe);
t.teardown(function () { document.body.removeChild(iframe); });
iframe.onload = function () {
var doc = iframe.contentWindow && iframe.contentWindow.document;
t.equal(
isDocumentAll(doc && doc.all),
true,
'another realms document.all is document.all'
);
t.equal(isDocumentAll(doc), false, 'another realms document is not document.all');
};
iframe.src = 'about:blank'; // or point to a URL
});