Overview
DisplayManager is responsible for managing what appears on the smart glasses display. It handles display requests from apps, implements throttling to prevent display flicker, manages boot screens, handles onboarding flows, and enforces display priorities between foreground and background apps. File:packages/cloud/src/services/layout/DisplayManager6.1.ts
Key Features
- Display Throttling: 300ms minimum between updates to prevent flicker
- Boot Screen Management: Shows loading screens while apps start
- App Prioritization: Manages display conflicts between apps
- Background Lock System: Allows background apps temporary display control
- Onboarding Support: Shows first-time user instructions
- Queue Management: Handles display requests during boot and throttling
Architecture
State Management
Display State
Throttling System
Display Request Processing
Main Entry Point
Throttling Implementation
Show Display with Throttling
Throttle Queue Processing
Boot Screen Management
App Start Handler
Boot Screen Display
Background Lock System
Lock Request
Lock Validation
Display Priority Logic
Show Next Display
Onboarding Support
Check and Show Onboarding
Configuration
Timing Constants
Lifecycle Management
Disposal
Best Practices
- Always respect throttling unless
forceDisplayis set - Save displays during boot for restoration afterward
- Validate display ownership before showing saved displays
- Handle onboarding gracefully without blocking other displays
- Clean up expired locks to prevent display blocking
- Use appropriate display types (TEXT_WALL, REFERENCE_CARD, etc.)
Integration Points
- AppManager: Notifies of app start/stop for boot screens
- DashboardManager: Special handling for system dashboard
- WebSocket: Sends display updates to glasses
- Onboarding Service: Checks and completes onboarding
Related Documentation
- AppManager: Triggers boot screens
- DashboardManager: System dashboard
- Layout Types: Available display formats
- Message Types: Display request format