mirror of
https://github.com/smittix/intercept.git
synced 2026-07-07 17:18:11 -07:00
test: mode registry consistency checks; fail fast if registry missing
Also documents the registry-driven mode integration in CLAUDE.md. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -3815,6 +3815,9 @@
|
||||
}
|
||||
|
||||
// Mode from query string (e.g., /?mode=wifi)
|
||||
if (!window.INTERCEPT_MODES) {
|
||||
throw new Error('mode-registry.js failed to load — the SPA cannot start');
|
||||
}
|
||||
let pendingStartMode = null;
|
||||
const modeCatalog = {};
|
||||
for (const [mode, def] of Object.entries(window.INTERCEPT_MODES)) {
|
||||
@@ -4918,7 +4921,7 @@
|
||||
refreshDroneDevices();
|
||||
}
|
||||
|
||||
// Module destroy is now handled by moduleDestroyMap above.
|
||||
// Module destroy is now handled by the mode registry (static/js/mode-registry.js).
|
||||
|
||||
// Show/hide Device Intelligence for modes that use it (not for satellite/aircraft/tscm)
|
||||
const reconBtn = document.getElementById('reconBtn');
|
||||
@@ -4999,7 +5002,7 @@
|
||||
}
|
||||
if (requestId !== modeSwitchRequestId) return;
|
||||
|
||||
// Waterfall destroy is now handled by moduleDestroyMap above.
|
||||
// Waterfall destroy is now handled by the mode registry (static/js/mode-registry.js).
|
||||
|
||||
const totalMs = Math.round(performance.now() - switchStartMs);
|
||||
console.info(
|
||||
|
||||
Reference in New Issue
Block a user