Subject of the enhancement
Add an opt-in mode where error and fatal log messages are shown as on-screen push notifications, not only written to the browser console.
Course authors assemble courses in the authoring tool and are generally not developers. When a plugin or config problem fires an error (for example ERROR: Branching: Spoor is misconfigured. Branching requires _spoor._tracking._shouldStoreAttempts = true), it goes to the console only. Authors do not open the console, so the misconfiguration ships unnoticed. There is currently no way for a non-developer to discover that the course logged an error.
Your environment
- Framework: confirmed against v5.56.2 (the relevant code is long-standing)
- Browser/device: not browser-specific
Current behaviour
error and fatal messages are written to the browser console only (when _logging._console is enabled). A non-developer never sees them.
Expected behaviour
With a new opt-in flag, error/fatal logs additionally appear as on-screen notifications so an author can read the message and forward it to a developer. The console output is unchanged, so the developer workflow is untouched.
Suggested Fix
logging.js already triggers log and log:<level> events for this exact purpose ("Allow error reporting plugins to hook and report to logging systems"), so the hook exists. This adds a first-party consumer behind a flag that calls notify.push().
Extend the existing _logging block in config.schema.json with a nested _notify object, disabled by default so published courses and learners are unaffected:
"_logging": {
"_notify": {
"_isEnabled": false,
"_level": "error",
"_timeout": 15000
}
}
_isEnabled (default false): off unless the author opts in.
_level (error or fatal, default error): minimum level to notify.
_timeout (default 15000): generous, because each push is manually dismissible.
Behaviour notes:
- Only the message args are shown, not a stack trace. The console call stack is a devtools feature, not part of the log payload.
- Notifications are deduplicated by message.
error is not covered by _warnFirstOnly, so a repeating error could otherwise flood the push queue (max 2 visible at once).
- Early errors are buffered until the notify UI is ready, then flushed.
- Timeout is per-notification, so this needs no change to the notify subsystem.
Out of scope: rewriting plugin error text into plain language (messages are shown as authored so the developer gets exact wording), and any persistent error badge or log panel.
Screenshots
Posted via collaboration with Claude Code
Subject of the enhancement
Add an opt-in mode where
errorandfatallog messages are shown as on-screen push notifications, not only written to the browser console.Course authors assemble courses in the authoring tool and are generally not developers. When a plugin or config problem fires an
error(for exampleERROR: Branching: Spoor is misconfigured. Branching requires _spoor._tracking._shouldStoreAttempts = true), it goes to the console only. Authors do not open the console, so the misconfiguration ships unnoticed. There is currently no way for a non-developer to discover that the course logged an error.Your environment
Current behaviour
errorandfatalmessages are written to the browser console only (when_logging._consoleis enabled). A non-developer never sees them.Expected behaviour
With a new opt-in flag,
error/fatallogs additionally appear as on-screen notifications so an author can read the message and forward it to a developer. The console output is unchanged, so the developer workflow is untouched.Suggested Fix
logging.js already triggers
logandlog:<level>events for this exact purpose ("Allow error reporting plugins to hook and report to logging systems"), so the hook exists. This adds a first-party consumer behind a flag that callsnotify.push().Extend the existing
_loggingblock in config.schema.json with a nested_notifyobject, disabled by default so published courses and learners are unaffected:_isEnabled(defaultfalse): off unless the author opts in._level(errororfatal, defaulterror): minimum level to notify._timeout(default15000): generous, because each push is manually dismissible.Behaviour notes:
erroris not covered by_warnFirstOnly, so a repeating error could otherwise flood the push queue (max 2 visible at once).Out of scope: rewriting plugin error text into plain language (messages are shown as authored so the developer gets exact wording), and any persistent error badge or log panel.
Screenshots
Posted via collaboration with Claude Code