Skip to content

4845#4850

Merged
ivicac merged 12 commits intomasterfrom
4845
Apr 24, 2026
Merged

4845#4850
ivicac merged 12 commits intomasterfrom
4845

Conversation

@ivicac
Copy link
Copy Markdown
Contributor

@ivicac ivicac commented Apr 24, 2026

  • 4845 Disable embedded chat SSE stream when workflow is disabled
  • 4845 Return explicit disabled response for sync webhook triggers
  • 2729 client - Add Deploy button to project header with selectable environment
  • 4404 client - Fix crash when adding node to workflow with name/type parameters
  • 717 SF
  • 4404 Return empty properties when Google Sheets row deps are missing
  • 2948 client - Preserve graph layout direction across project publish
  • 2246 Return empty properties when JDBC columns parameter is missing
  • 2948 client - Rename layout direction store to workflow UUID semantics

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR combines several server and client fixes around workflow execution behavior (disabled workflows + webhook streaming), dynamic property generation safety, and workflow editor UX stability (task flattening + layout direction persistence).

Changes:

  • Server: return explicit “disabled” responses for webhook sync execution and prevent SSE streaming when the workflow is disabled.
  • Server: avoid exceptions by returning empty dynamic properties when required dependency inputs are missing (JDBC + Google Sheets).
  • Client: prevent workflow-editor crashes when parameter objects contain name/type, and persist layout direction keyed by workflow UUID semantics; extend project deployment dialog to allow selecting an environment.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
server/libs/platform/platform-webhook/platform-webhook-rest/platform-webhook-rest-impl/src/main/java/com/bytechef/platform/webhook/web/rest/WebhookTriggerController.java Adds disabled-workflow handling for sync webhook triggers and SSE stream requests.
server/libs/platform/platform-component/platform-component-service/src/main/java/com/bytechef/platform/component/jdbc/handler/JdbcComponentHandlerImpl.java Returns empty properties when columns dependency is missing.
server/libs/modules/components/google/google-sheets/src/main/java/com/bytechef/component/google/sheets/util/GoogleSheetsUtils.java Returns empty properties when sheet/spreadsheet identifiers are missing.
client/src/pages/platform/workflow-editor/utils/flattenDefinitionTasks.ts Tightens task detection to avoid misclassifying parameter objects as workflow tasks.
client/src/pages/platform/workflow-editor/utils/flattenDefinitionTasks.test.ts Adds coverage for the new task-detection guard.
client/src/pages/platform/workflow-editor/stores/useLayoutDirectionStore.ts Renames persisted direction map to UUID semantics and bumps persist version.
client/src/pages/platform/workflow-editor/stores/tests/useLayoutDirectionStore.test.ts Updates tests for the renamed store API/shape.
client/src/pages/platform/workflow-editor/hooks/useWorkflowEditorCanvas.ts Switches layout-direction keying from workflow id to workflow UUID (as available).
client/src/pages/automation/projects/components/project-list/ProjectListItem.tsx Enables editable environment selection in the deployment dialog entry-point.
client/src/pages/automation/project-deployments/components/project-deployment-dialog/ProjectDeploymentDialogBasicStep.tsx Adds an environment dropdown when environmentEditable is enabled.
client/src/pages/automation/project-deployments/components/project-deployment-dialog/ProjectDeploymentDialog.tsx Wires environmentEditable through and persists selected environmentId into form submission.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread client/src/pages/platform/workflow-editor/hooks/useWorkflowEditorCanvas.ts Outdated
ivicac and others added 10 commits April 24, 2026 13:15
The /webhooks/{id}/sse endpoint executed the workflow unconditionally,
so embedded chat kept working after the deployment or the workflow was
turned off. Mirror the guard from the sibling POST endpoint: wrap the
handler in TenantContext and short-circuit with emitter.complete() when
isWorkflowDisabled returns true.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
For triggers with workflowSyncExecution (chat, form), return 410 Gone
with a JSON detail body instead of 200 OK empty when the workflow is
disabled, so the client can display a meaningful message. Mirror the
same in the SSE path by emitting an error event. Async fire-and-forget
webhooks still get 200 OK so external senders do not retry.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…arameters

Tighten isWorkflowTask in flattenDefinitionTasks so parameter objects with
name and type fields (e.g. PostgreSQL columns like {name: "count", type:
"INTEGER"}) are no longer misclassified as nested workflow tasks. Real task
types always contain a slash (component/vX[/operation]), so require that in
the predicate. Without this, such columns were fed into
useWorkflowDataStore.setWorkflow which then threw "Cannot read properties of
undefined (reading 'replace')" when splitting the bogus type string.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
createPropertiesForNewRows previously NPE'd in getRequiredString(SHEET_NAME)
when the dynamic-properties endpoint was called with sheetName cleared
server-side — which happens when a client changes spreadsheetId and the
WorkflowNodeParameterFacade removes dependents (sheetName's
optionsLookupDependsOn contains spreadsheetId). The server sees the cleared
workflow before the client catches up, so the dependent fetch races.

Guard the lambda with a null check on SPREADSHEET_ID and SHEET_NAME and
return an empty property list — the UI renders nothing until the user
completes the selection.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Key the layout direction store by workflow.workflowUuid instead of
workflow.id. Publishing duplicates the workflow and assigns a new id,
so the previous id-keyed lookup missed and fell back to TB.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The store now tracks currentWorkflowUuid and directionsByWorkflowUuid
so the API name matches what it actually stores. Bumps persist version
to drop stale id-keyed entries from previous releases.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
ivicac and others added 2 commits April 24, 2026 13:28
…ID typing

Use environment.name from useEnvironmentsQuery directly for deployment
dialog option labels instead of toEnvironmentName(+id), which threw for
any id outside the hard-coded 0/1/2 set.

Declare workflowUuid on WorkflowDataType so the layout-direction hook
can read it without an inline type cast. The platform Workflow schema
intentionally omits workflowUuid (it is added by the automation
ProjectWorkflowDTO and embedded IntegrationWorkflowDTO subclasses at
response time), but the store's workflow always flows in from one of
those, so typing it here matches runtime reality.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed for 'client'

Failed conditions
32.3% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@sonarqubecloud
Copy link
Copy Markdown

@ivicac ivicac merged commit ff19efa into master Apr 24, 2026
7 of 8 checks passed
@ivicac ivicac deleted the 4845 branch April 24, 2026 12:15
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.

[bug]: embedded chat connects to bytechef even when deployment is turned off

2 participants