[eric] apps: render-health beacons ride the runtime log stream where they actually arrive, vite-plugin-terminal owns the page console

This commit is contained in:
ciregenz
2026-08-08 02:14:27 -07:00
parent ab847fe2c4
commit 5c0d6d52b6
@@ -323,6 +323,11 @@ const DashboardViewCard: React.FC<Props> = ({
const terminalLineIdRef = useRef(0);
// Fed by the runtime logs WS (which replays its ring buffer on connect); frontend console lines arrive on the same socket via the console-log beacon echo.
const handleRuntimeLog = useCallback((line: RuntimeLogLine) => {
// The render-health beacons arrive HERE in practice, not on the webview console channel:
// vite-plugin-terminal owns the page console in app workspaces, so console.error rides the
// vite terminal into this runtime stream (live-verified 2026-08-08; the ipc path stays as belt).
if (line.text.includes('[openswarm:app-error]')) setPreviewBroken(true);
else if (line.text.includes('[openswarm:app-ready]')) setPreviewBroken(false);
const fields = terminalLineFromStream(line.stream, line.text);
setTerminalLines((prev) => {
const next = prev.concat({ id: ++terminalLineIdRef.current, ...fields });