gui/pkg/display/docs/overview.md
Virgil dc53b04d2a
Some checks failed
Security Scan / security (push) Failing after 30s
Test / test (push) Successful in 1m24s
refactor(ax): make window bounds and state updates more declarative
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-31 08:30:58 +00:00

26 lines
1.3 KiB
Markdown

# Overview
The `display` module is the Core GUI surface. It coordinates windows, menus, trays, dialogs, notifications, and WebSocket events through **Wails v3** on the Go side and **Angular** in `ui/` on the frontend side.
## Architecture
The project consists of two main parts:
1. **Backend (Go):** Handles window management, tray/menu setup, dialogs, notifications, layout persistence, and IPC dispatch.
2. **Frontend (Angular):** Provides the user interface. It lives in `ui/` and is built as a custom element that talks to the backend through the Wails runtime.
## Key Components
### Display Service (`display`)
The core service manages the application lifecycle and exposes declarative operations such as:
- `OpenWindow(window.Window{})`
- `CreateWindow(window.Window{Name: "editor", URL: "/#/editor"})`
- `SetWindowBounds("editor", 100, 200, 1280, 720)`
- `SaveLayout("coding")`
- `TileWindows(window.TileModeLeftRight, []string{"editor", "terminal"})`
- `ApplyWorkflowLayout(window.WorkflowCoding)`
### System Integration
- **Menu:** The application menu is constructed in `buildMenu()` and dispatched through IPC.
- **System Tray:** The tray menu is configured in `setupTray()` and keeps the desktop surface in sync with the runtime.
- **Events:** Window, theme, screen, lifecycle, and tray actions are broadcast as WebSocket events for the frontend.