improvement(serializer): canonical subblock, serialization cleanups, schedules/webhooks are deployment version friendly (#2848)

* hide form deployment tab from docs

* progress

* fix resolution

* cleanup code

* fix positioning

* cleanup dead sockets adv mode ops

* address greptile comments

* fix tests plus more simplification

* fix cleanup

* bring back advanced mode with specific definition

* revert feature flags

* improvement(subblock): ui

* resolver change to make all var references optional chaining

* fix(webhooks/schedules): deployment version friendly

* fix tests

* fix credential sets with new lifecycle

* prep merge

* add back migration

* fix display check for adv fields

* fix trigger vs block scoping

---------

Co-authored-by: Emir Karabeg <emirkarabeg@berkeley.edu>
This commit is contained in:
Vikhyath Mondreti
2026-01-16 15:23:43 -08:00
committed by GitHub
parent ce3ddb6ba0
commit 78e4ca9d45
70 changed files with 12806 additions and 1011 deletions

View File

@@ -495,6 +495,7 @@ export async function deployWorkflow(params: {
}): Promise<{
success: boolean
version?: number
deploymentVersionId?: string
deployedAt?: Date
currentState?: any
error?: string
@@ -533,6 +534,7 @@ export async function deployWorkflow(params: {
.where(eq(workflowDeploymentVersion.workflowId, workflowId))
const nextVersion = Number(maxVersion) + 1
const deploymentVersionId = uuidv4()
// Deactivate all existing versions
await tx
@@ -542,7 +544,7 @@ export async function deployWorkflow(params: {
// Create new deployment version
await tx.insert(workflowDeploymentVersion).values({
id: uuidv4(),
id: deploymentVersionId,
workflowId,
version: nextVersion,
state: currentState,
@@ -562,10 +564,10 @@ export async function deployWorkflow(params: {
// Note: Templates are NOT automatically updated on deployment
// Template updates must be done explicitly through the "Update Template" button
return nextVersion
return { version: nextVersion, deploymentVersionId }
})
logger.info(`Deployed workflow ${workflowId} as v${deployedVersion}`)
logger.info(`Deployed workflow ${workflowId} as v${deployedVersion.version}`)
if (workflowName) {
try {
@@ -582,7 +584,7 @@ export async function deployWorkflow(params: {
workflowName,
blocksCount: Object.keys(currentState.blocks).length,
edgesCount: currentState.edges.length,
version: deployedVersion,
version: deployedVersion.version,
loopsCount: Object.keys(currentState.loops).length,
parallelsCount: Object.keys(currentState.parallels).length,
blockTypes: JSON.stringify(blockTypeCounts),
@@ -594,7 +596,8 @@ export async function deployWorkflow(params: {
return {
success: true,
version: deployedVersion,
version: deployedVersion.version,
deploymentVersionId: deployedVersion.deploymentVersionId,
deployedAt: now,
currentState,
}