Some checks are pending
Bidi Control Character Guard / bidi-control-guard (push) Waiting to run
Circular Dependency Check / Check for new circular dependencies (push) Waiting to run
Citus Migration Smoke / Combined migrations on single-node Citus (push) Waiting to run
E2E Fresh Install Tests / fresh-install-e2e (push) Waiting to run
ext-v2 guardrails / Run ext-v2 guard and ESLint (push) Waiting to run
Integration Tests / Check for relevant changes (push) Waiting to run
Integration Tests / ${{ (github.event_name == 'schedule' || github.event.inputs.suite == 'full') && 'Full integration suite' || 'Tier-1 integration subset' }} (push) Blocked by required conditions
Mobile checks / Mobile lint + typecheck (push) Waiting to run
Mobile checks / Mobile unit tests (push) Waiting to run
Mobile checks / Mobile dependency audit (report) (push) Waiting to run
Mobile checks / Mobile reproducibility checks (push) Waiting to run
Secrets guard (env backups) / Ensure no tracked env backup files (push) Waiting to run
Temporal Readiness / fast-readiness (push) Waiting to run
Temporal Readiness / docker-parity (push) Waiting to run
TypeScript Type Check / Nx affected typecheck (push) Waiting to run
Unit Tests / Skipped-test budget (push) Waiting to run
Unit Tests / Nx affected unit tests (push) Waiting to run
Unit Tests / Server unit coverage (informational) (push) Waiting to run
Validate Tenant Management Schema / Check for relevant changes (push) Waiting to run
Validate Tenant Management Schema / Validate Tenant Management Schema (push) Blocked by required conditions
EE Workflows Build Guard / ee-workflows-build-guard (push) Waiting to run
Excluded: .git, node_modules, secrets/, compose.env, assemblyscript tgz Source: /opt/alga-psa on psa.joliet.tech
6.0 KiB
6.0 KiB
Scratchpad — Workflow Fixed-Value Editor System
Context
- User wants prompt editing to support a larger dialog-based authoring experience in addition to inline editing.
- User also wants this generalized so picker-backed fields and future rich editors use one system.
- User explicitly wants this new system to subsume today’s picker metadata.
Simplification Cascade
- Current variations:
- standard literal inputs
- picker metadata
- presentation metadata like multiline
- future dialog/popout editors
- Unifying insight:
- all of these are fixed-value editor surfaces for a field
- Result:
- one schema-driven editor contract
- one normalization path
- one fixed-value editor shell
- multiple editor kinds and surfaces inside that shell
Recommended Direction
- Introduce one top-level schema extension such as
x-workflow-editor. - Normalize both new metadata and legacy picker metadata into one
field.editor. - Keep source mode as the outer shell.
- Make fixed-value editor rendering entirely switch on the unified editor model.
Proposed First Consumer
ai.infer.prompt- inline multiline editor
- dialog editor for larger prompt authoring
Migration Strategy
- Introduce editor normalization and adapter from current picker metadata.
- Migrate prompt first.
- Route current picker fields through the unified editor shell.
- Later replace legacy picker metadata emission with the unified editor contract at the schema source.
Relevant Files
ee/server/src/components/workflow-designer/actionInputEditorState.tsee/server/src/components/workflow-designer/mapping/InputMappingEditor.tsxee/server/src/components/workflow-designer/WorkflowActionInputFixedPicker.tsxshared/workflow/runtime/jsonSchemaMetadata.tsshared/workflow/runtime/actions/businessOperations/tickets.ts
Notes
- This should stay designer-only metadata and not alter runtime semantics.
- The contract must support both inline and dialog surfaces without parallel picker/editor systems.
Implementation Log
2026-03-14
- Introduced shared
x-workflow-editormetadata inshared/workflow/runtime/jsonSchemaMetadata.ts.- Contract supports
kind, inline surface metadata, dialog surface metadata, dependencies, fixed-value hints, dynamic-reference allowances, and picker resource metadata. - Kept legacy
x-workflow-picker-*annotations intact so existing action schemas and tests continue to export the old shape during migration.
- Contract supports
- Moved
ai.infer.promptonto the new schema contract at the source inshared/workflow/runtime/actions/registerAiActions.ts.- Prompt now emits
kind: "text"with inlinetextareaplus dialoglarge-text.
- Prompt now emits
- Kept a designer-side hint adapter in
ee/server/src/components/workflow-designer/workflowActionPresentation.ts.- Rationale: if any registry payload still lacks the new prompt metadata, the designer injects the same unified editor contract instead of reviving
x-workflow-input-control.
- Rationale: if any registry payload still lacks the new prompt metadata, the designer injects the same unified editor contract instead of reviving
- Replaced field-level
picker/presentationnormalization with a singlefield.editormodel inee/server/src/components/workflow-designer/actionInputEditorState.ts.- New metadata is normalized directly.
- Legacy picker metadata is adapted into
kind: "picker"with inlinepicker-summary. - This is the compatibility layer for incremental migration.
- Refactored fixed-value rendering in
ee/server/src/components/workflow-designer/mapping/InputMappingEditor.tsx.- Added
FixedValueEditorShellto host inline-only, dialog-only, and inline-plus-dialog surfaces. - String editors now render from unified editor metadata.
- Prompt dialog uses the same fixed-value contract as inline editing and writes back through the same
onChangepath. - Added narrow component-boundary fallback helpers so older test fixtures using
picker/presentationstill exercise the unified shell during migration.
- Added
- Updated picker rendering and source-mode defaults to read unified editor metadata first.
- Files:
ee/server/src/components/workflow-designer/WorkflowActionInputFixedPicker.tsxee/server/src/components/workflow-designer/WorkflowActionInputSourceMode.tsx
- Files:
- Regression coverage added/updated:
shared/workflow/runtime/__tests__/jsonSchemaMetadata.test.tsshared/workflow/runtime/actions/__tests__/registerAiActions.test.tsshared/workflow/runtime/actions/__tests__/registerTicketActionPickerMetadata.test.tsee/server/src/components/workflow-designer/__tests__/actionInputEditorState.test.tsee/server/src/components/workflow-designer/__tests__/workflowActionPresentation.test.tsee/server/src/components/workflow-designer/__tests__/TransformActionInputEditor.test.tsxee/server/src/components/workflow-designer/__tests__/InputMappingEditorUnifiedEditor.test.tsxee/server/src/components/workflow-designer/__tests__/InputMappingEditorPickerFields.test.tsxee/server/src/components/workflow-designer/__tests__/WorkflowActionInputSourceMode.test.tsx
Commands / Validation
npx vitest run workflow/runtime/__tests__/jsonSchemaMetadata.test.tsnpx vitest run workflow/runtime/actions/__tests__/registerAiActions.test.ts workflow/runtime/actions/__tests__/registerTicketActionPickerMetadata.test.tscd ee/server && npx vitest run src/components/workflow-designer/__tests__/actionInputEditorState.test.ts src/components/workflow-designer/__tests__/workflowActionPresentation.test.ts src/components/workflow-designer/__tests__/TransformActionInputEditor.test.tsx src/components/workflow-designer/__tests__/InputMappingEditorUnifiedEditor.test.tsx src/components/workflow-designer/__tests__/InputMappingEditorPickerFields.test.tsx src/components/workflow-designer/__tests__/WorkflowActionInputSourceMode.test.tsx
Gotchas
ee/serverandshareduse different Vitest roots; targeted test commands must be run from each package directory.- Prompt-dialog behavior is implemented only for
dialog.mode === "large-text"in this phase; picker/browser dialog infrastructure is represented in metadata but intentionally not shipped as a second editor implementation yet.