Skip to content

Feature Workflows

Jim Daley edited this page Jul 2, 2026 · 1 revision

Feature Workflows

Feature workflows are launched from the single Retail UI module. The dashboard displays registered app-level feature modules, creates each feature root view with a shared ModuleContext, and keeps Jamf API access, credentials, and diagnostics centralized.

Dashboard Navigation

flowchart TD
    Dashboard["DashboardView"] --> Status["Tenant state and command activity"]
    Dashboard --> Rail["Navigation rail"]
    Dashboard --> ModuleCards["Module cards"]
    Dashboard --> Inspector["Module mix and runtime boundaries"]
    Dashboard --> Sheets["Settings and diagnostics sheets"]
    Rail --> Route["NavigationLink(moduleID)"]
    ModuleCards --> Route
    Route --> Registry["ModuleRegistry.module(withID:)"]
    Registry --> Factory["module.makeRootView(context:)"]
    Factory --> FeatureRoot["Feature root SwiftUI view"]
Loading

Inventory Search

Computer Search and Mobile Device Search share the same high-level pattern:

  1. The module constructs a feature view model from ModuleContext.
  2. The view model sends authenticated Jamf API requests through JamfAPIGateway.
  3. Search results decode into typed records.
  4. Detail views expose hardware, management, location, security, and extension-attribute fields.
  5. Saved profiles and smart filters persist reusable field selections or search criteria.
  6. Diagnostics capture request shape, decode fallback, pagination, and refresh failures.
sequenceDiagram
    participant User as Operator
    participant View as Search View
    participant VM as Search ViewModel
    participant Gateway as JamfAPIGateway
    participant Jamf as Jamf Pro API
    participant Store as Profile Store
    participant Diag as Diagnostics

    User->>View: enter query or advanced criteria
    View->>VM: search intent
    VM->>Store: load field profile or smart filter
    VM->>Gateway: paged inventory request
    Gateway->>Jamf: authenticated GET
    Jamf-->>Gateway: paged JSON
    Gateway-->>VM: data
    VM->>Diag: decode and pagination telemetry
    VM-->>View: typed records
    User->>View: open detail
    View->>VM: fetch detail
    VM->>Gateway: detail request
    Gateway->>Jamf: authenticated GET detail
    Jamf-->>Gateway: detail JSON
    VM-->>View: hardware, management, location, security fields
Loading

Support Technician

Support Technician is a unified support workspace for computers and mobile devices. It combines search, detail resolution, diagnostics, action availability, command queueing, command history parsing, remote support readiness, temporary admin state, and secret retrieval.

Support Action Flow

flowchart TD
    Search["Search by username, serial, or inventory fields"] --> Detail["Resolve computer or mobile detail"]
    Detail --> Readiness["Evaluate action readiness"]
    Readiness --> Privileges["Map required Jamf privileges"]
    Privileges --> Action{"Action type"}
    Action -->|read-only| Fetch["Fetch diagnostic detail or secret"]
    Action -->|command| Confirm["Typed confirmation where required"]
    Action -->|remote support| RemoteReady["Remote support readiness probe"]
    Confirm --> Queue["Queue MDM command"]
    RemoteReady --> Queue
    Fetch --> Result["Action result presentation"]
    Queue --> History["Command history refresh"]
    History --> Result
    Result --> Diagnostics["Diagnostics events and exportable evidence"]
Loading

Guarded Workflows

Workflow Guarding behavior
Inventory update Uses command availability and command response diagnostics.
Blank push Uses MDM command readiness and records queued command status.
Application discovery Queues installed-application-list command where supported.
Restart, shut down, log out, clear passcode, erase, unmanage Require platform/action gating and typed confirmation for destructive actions.
Device lock Generates or retrieves PIN where applicable and records command output.
Remote support Evaluates target resolution and readiness before queueing enable/disable command.
Temporary admin Uses configured request scopes, status extension attributes, and demotion flow controls.
FileVault, Recovery Lock, Device Lock PIN, LAPS Requires appropriate read privileges and presents sensitive values through guarded UI.

PreStage Director

PreStage Director focuses on mobile device prestage enrollment profiles and assigned-device workflows.

flowchart LR
    Open["Open PreStage Director"] --> LoadProfiles["Load prestage profiles"]
    LoadProfiles --> LoadAssignments["Load assigned devices"]
    LoadAssignments --> Inspect["Inspect profile and device assignment state"]
    Inspect --> Move["Move assigned device"]
    Inspect --> Remove["Remove from prestage"]
    Move --> Diagnostics["Report operation diagnostics"]
    Remove --> Diagnostics
Loading

Scanner Input

Scanner-related UI helpers support scanning or sanitizing input into fields. Scanner lifecycle readiness is represented by com.forsetti.jamfpro.service.scanner, while visible scan controls remain in app UI.

flowchart LR
    Scan["Scan input"] --> Sanitize["ScannerInputSanitization"]
    Sanitize --> TextField["Target text field"]
    TextField --> Feature["Feature search or lookup"]
    Feature --> Gateway["JamfAPIGateway"]
Loading

Dashboard Module Categories

Dashboard categories are derived from module IDs and display metadata.

Category Modules
Inventory Computer Search, Mobile Device Search
Operations Support Technician, PreStage Director
Reporting Reports
Deployment Deployment Tracker Demo

Common Feature Contract

Dashboard-facing feature modules currently implement:

@MainActor
func makeRootView(context: ModuleContext) -> AnyView

ModuleContext provides:

  • apiGateway
  • credentialsStore
  • diagnosticsReporter

That keeps feature roots decoupled from the concrete app container while ensuring all Jamf API calls, credential reads, and diagnostics flow through shared services.

Clone this wiki locally