Skip to main content

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

  1. Display Throttling: 300ms minimum between updates to prevent flicker
  2. Boot Screen Management: Shows loading screens while apps start
  3. App Prioritization: Manages display conflicts between apps
  4. Background Lock System: Allows background apps temporary display control
  5. Onboarding Support: Shows first-time user instructions
  6. 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

  1. Always respect throttling unless forceDisplay is set
  2. Save displays during boot for restoration afterward
  3. Validate display ownership before showing saved displays
  4. Handle onboarding gracefully without blocking other displays
  5. Clean up expired locks to prevent display blocking
  6. 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