DashboardManager handles dashboard content and layouts across the system. It provides contextual information to users through various display modes, manages content from multiple apps, implements circular queue rotation for content cycling, and supports system-level dashboard updates.File: packages/cloud/src/services/dashboard/DashboardManager.ts
enum DashboardMode { MAIN = "main", // Full dashboard with all sections EXPANDED = "expanded", // More space for app content ALWAYS_ON = "always_on" // Persistent minimal overlay}
// Separate queues for each modeprivate mainContent: Map<string, AppContent> = new Map();private expandedContent: Map<string, AppContent> = new Map();private alwaysOnContent: Map<string, AppContent> = new Map();// Rotation tracking for main modeprivate mainContentRotationIndex: number = 0;
public onHeadsUp(): void { // Only in main mode if (this.currentMode !== DashboardMode.MAIN) { return; } // Need multiple items to cycle if (this.mainContent.size <= 1) { return; } // Advance rotation index this.mainContentRotationIndex = (this.mainContentRotationIndex + 1) % this.mainContent.size; // Update display this.updateDashboard();}
private sendDisplayRequest(displayRequest: DisplayRequest): void { // Use DisplayManager for actual display const sent = this.userSession.displayManager.handleDisplayRequest(displayRequest); if (!sent) { this.logger.warn("Display request not sent - DisplayManager not ready"); return; } this.logger.debug({ packageName: displayRequest.packageName, view: displayRequest.view, layoutType: displayRequest.layout.layoutType }, "Display request sent successfully");}