Skip to content

WorkflowBuilder port (Vue 3): official OSS builder 1:1 (S1+S2+S3) - #150

Merged
BMJLearnToHelloWorld merged 3 commits into
mainfrom
m2-workflow-builder
Nov 6, 2026
Merged

BMJLearnToHelloWorld merged 3 commits into
mainfrom
m2-workflow-builder

Conversation

@BMJLearnToHelloWorld

@BMJLearnToHelloWorld BMJLearnToHelloWorld commented Nov 6, 2026 •

Copy link
Copy Markdown
Owner

WorkflowBuilder port (Vue 3) — official OSS builder, 1:1

Ports the official OpenMetadata WorkflowBuilder (pin a3012259ca, 67 files:
canvas + node-config sidebar + execution history, reactflow + dagre) to the
product's Vue 3 UI with @vue-flow (already in use by lineage/pipeline
graphs) and dagre (already a dependency). No new dependencies, no
reactflow, no Tailwind/less/ui-core-components visuals — style is dev_ui
tokens (#005587) + antd.

Scope lock (per the approved ruling)

The official OSS builder is a restricted editor
(WorkflowClassBase defaults all restrictive, no subclass in the OSS repo,
asserted by WorkflowOssRestrictions.test.tsx). This port reproduces the
OSS capability set exactly: canvas view, view-mode node drag, start-node
filter/schedule/batch edit, per-subtype node-config forms, save via PUT
(buildWorkflowForSave), test via POST /validate, suspend/resume, run
(on-demand periodic only), paginated execution history, undo/redo (max 50),
unsaved-changes guard. The palette, structural handlers
(onDrop/onConnect/delete-node), delete button, and create entry are
present in the tree with the same capability gating (not live behavior in
the OSS build). A working structural editor, workflow create/delete,
delete-node, full start-node config, and scheduled-trigger UI are
Collate-only / gated off in OSS and are NOT built.

What lands

  • S1 Foundation: builder types/constants, OSS capabilities, serializer
    (BFS layout 350×150, edge-condition labels, inputNamespaceMap
    migration), validation service (buildWorkflowForSave /
    testWorkflow), API extension (patch/trigger/suspend/resume/validate/
    delete/instance-details), mode/logic/actions/history composables.
  • S2 Canvas: WorkflowCanvas.vue, 4 node components, straight edge,
    custom controls (undo/redo, zoom %, fit, rearrange), gated palette,
    connection-condition modal, empty state, dagre layout helper.
  • S3 Chrome + forms: WorkflowHeader, NodeConfigSidebar,
    NodeFormSidebar, TaskNodeFormRenderer + all 10 node forms
    (end/set-action/check-condition/check-change-description/
    data-completeness/collect-metadata/user-approval/revert/sink/schema
    fallback), ConditionBuilder, navigation block, rebuilt
    WorkflowDetailView (builder on the workflow tab, paginated history
    tab), i18n workflows.builder.* (205 keys, identical en-US + zh-CN).

Gates

  • Full suite: 319 files / 1451 tests, EXIT=0 (fix worktree, real
    npm ci, on main 4969cfa0 + this branch; was 317/1408 before the
    fix round, +43 = 17 OSS-restriction + 3 UserApprovalForm + 1 schema
    pin + 22 round-trip), 754.53s.
  • Build: npm run build EXIT=0, 10.95s.
  • Real typecheck (vue-tsc --noEmit -p tsconfig.app.json): 233 errors,
    0 attributable vs the 234-error main baseline (the package.json
    build script is unchanged by decision; bare vue-tsc --noEmit on the
    solution-style root tsconfig checks nothing).
  • D3 tests: 2 files / 17 tests, EXIT=0.
  • Rebase note: the branch's locale files (based on b3677ebb) lacked
    D3's 4 apps.detail keys (screenshots, screenshotsPage, pause,
    play); merged in from D3: marketplace app screenshots carousel (images left empty, glob resolver) #149 verbatim, D3 tests re-verified green.
  • No live deploy in this PR (frontend-only deploy + live verify follow
    after merge, per the landing order).

Fix round for the merge review (2026-11-06 — all three blockers fixed)

  • Fix 1 — UserApprovalForm assignees shape (silent data loss):
    the form read/wrote config.addReviewers/addOwners/ emptyAssigneeStrategy/candidates FLAT; official reads/writes them
    nested under config.assignees, and the product save path reads the
    nested shape — so official/seeded definitions loaded with empty
    approvers and product-saved definitions silently dropped chosen
    approvers. Now reads/writes config.assignees.* exactly like
    official (plus type: c.type ?? 'user' on candidates, stale flat
    keys stripped on save, and a save-path defense in
    applyUserApprovalConfig). New UserApprovalForm.test.ts (3 its):
    official-shaped nested fixture loads + save round-trips candidates,
    flat legacy config is rebuilt from defaults, empty config yields
    nested defaults.
  • Fix 2 — 46 attributable type errors the build gate cannot see:
    package.json build is vue-tsc --noEmit && vite build, but the
    root tsconfig.json is solution-style ("files": [] + references),
    so bare vue-tsc --noEmit checks NOTHING. The real check
    (vue-tsc --noEmit -p tsconfig.app.json) measured: baseline (main
    4969cfa0) 234 errors, branch before fixes 279, attributable
    46 (42 in 23 PR files + 4 knock-on in TaskFormSettingsView.vue);
    the PR also removed 1 baseline error. After the fixes: 233 errors,
    0 attributable
    (line-insensitive diff vs the baseline) — zero
    attributable errors remain. The package.json build script is
    unchanged by decision (changing it would fail every build on the
    pre-existing 234-error baseline, recorded as accepted in ruling §7).
  • Fix 3(a) — serializer round-trip on the live 21 definitions:
    new tests in workflowSerializer.test.ts (29 its) round-trip all 21
    live governance definitions (fixture
    utils/workflowLiveDefinitions.ts, dumped read-only from the deploy
    host; 19 byte-identical to the official seeds at pin a3012259ca,
    plus AutoPilotWorkflow and the triggerless seed_workflow probe
    artifact) through definition → flow → definition, asserting no data
    loss modulo the documented official normalizations. Every diff was
    checked against official WorkflowValidationService.ts /
    WorkflowNodeConfigUtils.ts.
  • Fix 3(b) — OSS-restriction UI assertions: new
    WorkflowOssRestrictions.test.ts (17 its), mirroring official
    WorkflowOssRestrictions.test.tsx:270-359: palette hidden in edit
    AND view, structural edits blocked, no delete/create at capability
    level and no create entry on the builder surface, header
    (view: edit present, delete absent from the manage menu, run absent;
    edit: save/cancel/validate present, manage menu absent), task-node
    sidebar (view: no save/delete-node; edit: save enabled, delete-node
    absent), start-node event-based and periodic-batch field locks.
  • Cheap items: R-5 header corrected (the schema map is a
    hand-maintained snapshot, not in-tree; all 8 entries verified
    field-by-field against the official JSONs at pin a3012259ca, full
    map pinned in workflowNodeSchemas.test.ts); C-6.1 history fetch now
    sends startTs: 0, endTs: Date.now() as official does; C-6.2 paging
    offset typed string, status tone 'default' → 'warning'.
    One knock-on fixed: the new NodeProps typing made Vue Flow's
    selected: undefined warn — the canvas now passes
    selected: node.selected ?? false.
  • Waiver (parent decision): the per-component test-file requirement
    for the other 34 .vue files is waived in favour of the existing
    dispatch/integration coverage; the round-trip + restriction
    assertions above are not waived.

Residuals (ruling §7)

R-1 (OSS scope), R-10 (no QueryBuilderWidget — raw filter TextArea),
R-11 (no Tag/Glossary/UserTeam pickers — antd-Select + search APIs),
R-18 latent note (dead :node/:is-open prop pass-through into
NodeConfigSidebar, which reads the same values from context),
R-19 (pinned official-behaviour wart: official's save builder drops the
configs of runAppTask / createAndRunIngestionPipelineTask — the
product reproduces this exactly, asserted in the round-trip test),
R-20 (record-only review items: rgb() box-shadow literals,
SchemaBasedNodeForm English titles, dead state.canSave,
trigger?: WorkflowTriggerObject | unknown collapse, asBackendNodes
silent subType default).

Bugs the S3 test round found and fixed (ruling R-14–R-18)

  • R-14: the rebuilt detail view read state.workflowMetadata /
    state.loading / state.selectedNode etc. — those live on the
    wrapped state.state; the title always fell back to "Workflow
    Builder" and no node form could ever open (same misread in
    NodeFormSidebar).
  • R-15: canvas click handlers assumed Vue Flow emits two positional
    args; it emits one {event, node} / {event, edge} object — every
    node/edge click threw.
  • R-16: <Tabs :items> — the installed antd-vue 4.2.6 Tabs has no
    items prop (parses TabPane children); the tab bar rendered empty.
    Now slot-based, the product idiom.
  • R-17: SinkTaskForm masked-secret dance diverged from official in
    3 places (blur never restored the mask → a save could wipe the stored
    token; focus cleared an already-typed value; key replacement reset an
    already re-typed passphrase).
  • R-18: data-testid on antd Drawer never reaches the DOM; the dead
    testids were removed, tests use the inner hooks.

Do not merge from here — merge review is the parent's.

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown

The Java checkstyle failed.

Please run mvn spotless:apply in the root of your repository and commit the changes to this PR.
You can also use pre-commit to automate the Java code formatting.

You can install the pre-commit hooks with make install_test precommit_install.

…tributable type errors, round-trip + OSS-restriction tests, R-5 correction
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown

The Java checkstyle failed.

Please run mvn spotless:apply in the root of your repository and commit the changes to this PR.
You can also use pre-commit to automate the Java code formatting.

You can install the pre-commit hooks with make install_test precommit_install.

@BMJLearnToHelloWorld
BMJLearnToHelloWorld merged commit 2566dc4 into main Nov 6, 2026
57 of 58 checks passed
@BMJLearnToHelloWorld
BMJLearnToHelloWorld deleted the m2-workflow-builder branch November 12, 2026 03:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant