Skip to content

feat(electron): secondary display detection and dedicated fullscreen window manager #593

Not planned

Description

@khaira777

Overview

Enable FloCafe to detect physically connected secondary monitors (HDMI / DisplayPort) and launch a dedicated, borderless fullscreen menu board or customer display window directly from the desktop POS app.

Technical Specification

1. Display Management Module (main/display-window.ts)

  • Display Enumeration: Query connected displays via Electron's screen.getAllDisplays() and screen.getPrimaryDisplay().
  • Display Lifecycle Events:
    • Listen to screen.on('display-added') and screen.on('display-removed').
    • Automatically update available monitor choices in settings.
    • Safely close secondary windows if a physical cable is disconnected without crashing the main application.

2. Window Lifecycle Management

  • Spawn a secondary BrowserWindow targeting the selected display's coordinates (display.bounds.x, display.bounds.y, display.bounds.width, display.bounds.height).
  • Window attributes:
    • fullscreen: true
    • frame: false
    • autoHideMenuBar: true
    • kiosk: false (to prevent trapping the user, controlled via settings toggle)
  • Load URL: http://localhost:3001/menu-board?channel=<assigned_channel_id>.

3. POS Settings Integration

  • Under Hardware / Display Settings:
    • Toggle: "Enable Secondary Monitor Display".
    • Dropdown: "Target Monitor" (Display 2: 1920x1080 [HDMI-1]).
    • Dropdown: "Display Content" (Select Menu Board Channel or Customer Order Status Display).

Tasks

  • Implement main/display-window.ts managing secondary BrowserWindow creation, position calculation, and cleanup.
  • Add IPC handlers (signage:get-displays, signage:launch-window, signage:close-window) in main/ipc.ts.
  • Connect display settings UI to Electron IPC channels.
  • Handle graceful window recovery and crash isolation between primary cashier window and secondary display window.

Acceptance Criteria

  • Connecting an HDMI display allows launching a dedicated fullscreen menu board directly from FloCafe settings.
  • Primary cashier POS window remains fully responsive and focused during order taking.
  • Unplugging or turning off the secondary monitor cleans up the secondary window gracefully without POS downtime.

Activity

  1. added
    enhancement
    on Sep 1, 2026
  2. added
    type:feature
    state:needs-design
    on Sep 21, 2026
  3. khaira777 commented on Nov 28, 2026

    @khaira777
    ContributorAuthor

    Consolidating into #362. Both #362 and #593 specify the same Electron screen-API secondary BrowserWindow manager (main/display-window.ts). To avoid building two window managers, #362 is now the canonical owner of the shared secondary-display window manager (including monitor selection, disconnect safety, and dual-window boot auto-launch), and #594 (Digital Signage) will plug into it as an additional display content mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementstate:needs-designtype:feature

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions