/* Shared boot-failure banner for the three read-only view bootstraps * (boot-galaxy.js / boot-ladder.js / boot-ontology.js). A `resolveGraph()` * rejection (missing/renamed saved model, malformed graph shape) previously * propagated unhandled, leaving the page's static shell on screen with no * explanation. This renders the specific, actionable error message the * loaders already produce, instead of a silently blank page. */ import { esc } from './util.js'; export function showBootError(e) { const msg = esc((e && e.message) || String(e)); const el = document.createElement('div'); el.setAttribute('role', 'alert'); el.style.cssText = [ 'position:fixed', 'inset:0', 'z-index:99999', 'display:flex', 'align-items:center', 'justify-content:center', 'padding:24px', 'background:#0b0f14', 'color:#f2f4f8', 'font:14px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif', ].join(';'); el.innerHTML = `
⚠️
This view couldn't load its model.
${msg}
`; document.body.innerHTML = ''; document.body.appendChild(el); // still surface it to the console/devtools for anyone debugging further console.error(e); }