// A simplified look at the Client-Side Traffic Controller eventSource.onmessage = (event) => { const data = JSON.parse(event.data); // Pulse Updates: Update status pills and timers if (data.pulse) { updateStatusDisplay(data.pulse); } // Brain Updates: Update global stats badges if (data.memory) { updateStatsCounters(data.memory); } // Activity Stream: Append new logs to the terminal view if (data.log_entry) { appendLogToStream(data.log_entry); } };