Skip to content

Startup System

Entry point for the Plant Design module. Displays the startup screen and orchestrates its bound subsystems before the user opens a project.

Structure

startup_system/
  controller/
    pd_startup_controller.py    Main controller, wires up all subsystems
  view/
    pd_startup_view.py          Startup screen (QWidget, styled via StylesheetManager)
  model/                        (reserved)
  constants/
    paths.py                    PathDef definitions for stylesheets
  bound_subsystems/
    recent_projects/            Recent project list and cards
    project_launcher/           Project creation / open flow, technician selection
    project_repository/         R2-backed project CRUD and metadata
    pd_session_orchestration/   Session lifecycle, crash recovery, file transfer
    library_orchestration/      Master + user library management

Key Classes

Class Purpose
PDStartupController Orchestrates subsystems, manages lazy launcher navigation
PDStartupView Startup screen UI with stylesheet registration

Bound Subsystem: project_launcher

Manages the project creation and open flow. Key components:

Class Purpose
LauncherController Full project launcher logic (listing, creation, metadata, write-access)
LauncherView Launcher UI, replaces ComboBox with TechnicianSelectionWidget at runtime
TechnicianSelectionWidget Self-contained widget for selecting project technicians from org members
RESTRICTED_TECHNICIAN_ACCOUNTS Frozen set of service/org accounts excluded from technician selection

The technician selection widget uses get_organization_members_detailed() from the login manager to show avatar + name + email for each organization member.

How It Works

  1. SoftwareController lazily creates PDStartupView + PDStartupController on first click of the Plant Design button.
  2. PDStartupController.__init__ wires up two subsystems:
  3. RecentProjectsController (recent project list)
  4. LibraryOrchestrationController (library management)
  5. When the user clicks the launcher button, on_start_launcher_clicked lazily creates LauncherView + LauncherController and navigates via cache_and_show_widget.
  6. SmartBackButton restores the startup view through the _restore_startup_view callback.