Skip to content

Editor v0.2 Overview

Status

Current editor milestone: v0.2.0 — workspace-ready workflow editor.

The same @governed-events/editor package is used by:

  • embedded eFEC platform Admin, and
  • standalone editor at http://localhost:5178.

The common editor is platform-agnostic. Hosts provide workflow files, selection, and optional menu commands.

Layout

text Menu bar ├─ Filetree sidebar ─ Main view │ ├─ Breadcrumb bar │ ├─ JSON | Graph tabs │ └─ JSON editor or Graph canvas Bottom/status bar

Behavior:

  • Filetree is persistent and foldable.
  • Folder rows use +/- expand/collapse.
  • Clicking a workflow opens Graph by default.
  • JSON remains available as the left tab.
  • Graph auto-fits after paint in embedded and standalone hosts.
  • Graph States/Actions and Inspector/Validate side panels open collapsed by default.
  • Inspector default width is expanded for readability.
  • JSON editor has aligned line numbers, no soft wrap, and horizontal scrolling.

Embedded platform editor

Admin discovers workspace rows from deployed workflow paths:

text case customer demo product screening system

Routes:

text /admin/workflows?workspace=customer /admin/workflows/customer/retail/retail-customer

Opening a workspace passes only that first-segment subset to the editor.

Export Workspace

File -> Export Workspace exports the selected deployed workspace subset.

Browser behavior:

  • directory export when File System Access API is available,
  • ZIP download fallback otherwise.

Exported layout:

text customer/retail/retail-customer.json customer/corporate/corporate-customer.json workspace.json

Standalone editor

Run:

bash cd editor npm run dev

Open http://localhost:5178.

Open Workspace

File -> Open Workspace imports:

  • exported directory workspace when directory picker is available,
  • exported ZIP workspace otherwise.

Import behavior:

  • validates all files before replacing the current workspace,
  • treats workspace.json as optional metadata,
  • starts with no selected workflow and Filetree visible,
  • clicking a workflow opens Graph by default.

Standalone keeps an in-memory baseline/current snapshot. Dirty flags are shown for draft changes, but Save Workspace is not implemented yet.

Validation

Import/export validation checks:

  • file path equals $path + '.json',
  • $path is present and valid,
  • no duplicate paths,
  • no recursive $category,
  • no basename -Vn,
  • no unresolved spawn.workflow,
  • workflow validator errors block import/export.

Warnings are shown as dismissible feedback. Success/info messages such as All checks passed are not treated as warnings.

Known next work

  • durable BrowserWorkspaceStore,
  • Save Workspace with baseline diff,
  • Deploy Workspace changed-only flow,
  • mandatory Save/Deploy review dialog,
  • workflow lifecycle/versioning,
  • dynamic namespace creation.