Skip to content

improvement(deploy): improve auto-generated version descriptions#4075

Merged
waleedlatif1 merged 3 commits intostagingfrom
waleedlatif1/deploy-diff-description
Apr 9, 2026
Merged

improvement(deploy): improve auto-generated version descriptions#4075
waleedlatif1 merged 3 commits intostagingfrom
waleedlatif1/deploy-diff-description

Conversation

@waleedlatif1
Copy link
Copy Markdown
Collaborator

Summary

  • Resolve raw subBlock IDs to human-readable titles in deploy diff descriptions (e.g. systemPrompt → "System Prompt")
  • Resolve dropdown option IDs to labels (e.g. calendly_get_current_user → "Get Current User")
  • Show granular per-key data diffs instead of opaque data blob changes
  • Show edge connection details with block names (e.g. "Added connection: AI Assistant → Gmail")
  • Show variable names in add/remove/modify descriptions
  • Filter out noisy .properties metadata changes
  • Increase change-per-block limit from 3 to 6, add edge detail limit of 3
  • Increase deploy modal size from md to lg
  • Add 35 tests covering formatting, field resolution, and end-to-end diff scenarios with loops, parallels, variables, and edge rewiring

Type of Change

  • Improvement (enhancement to existing feature)

Testing

  • 242 tests passing across comparison module (143 existing + 64 normalize + 35 new)
  • Typecheck clean
  • No regression in hasWorkflowChanged or generateWorkflowDiffSummary

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@cursor
Copy link
Copy Markdown

cursor bot commented Apr 9, 2026

PR Summary

Medium Risk
Changes workflow diff generation/formatting used to auto-generate deployment version descriptions, which could alter what changes are detected and how they’re presented. Risk is mitigated by extensive new test coverage but regressions could impact deploy notes quality or change detection edge cases.

Overview
Deploy version auto-descriptions now produce richer, less noisy diffs. Workflow comparison output includes human-readable field titles (including data.* keys), resolves dropdown option IDs to labels, filters out .properties metadata noise, and increases per-block reported changes (3 → 6).

Diff summaries now include detailed connection (edge) add/remove lines with block names (capped to 3 details) and variable add/remove/modify lists using variable names; block data changes are reported per-key (data.foo) instead of as an opaque blob. The deploy UI’s version description modal is widened (mdlg), and a comprehensive new format-description.test.ts suite is added to cover these formatting and diff scenarios.

Reviewed by Cursor Bugbot for commit 4040a25. Configure here.

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 9, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Apr 9, 2026 4:42pm

Request Review

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Apr 9, 2026

Greptile Summary

This PR improves auto-generated deploy version descriptions by resolving raw subBlock IDs to human-readable titles, resolving dropdown option IDs to labels, surfacing granular per-key data diffs instead of an opaque data blob, adding block names to edge connection entries, and including variable names in add/remove/modify lines. It also filters noisy .properties metadata changes, bumps the change-per-block limit to 6 and the edge detail limit to 3, and widens the deploy modal. Thirty-five new tests cover the formatting helpers, field resolution, and end-to-end diff scenarios.

Confidence Score: 5/5

Safe to merge — improvements are additive display-layer changes with no effect on workflow execution or data integrity.

All findings are P2 style suggestions (no-any in test mocks, API design nit on formatEdgeDetailList). The feature logic is correct, well-tested with 35 new cases, and typecheck is clean. The previous P1 (empty catch) was already addressed in a731fa1.

format-description.test.ts — two as any casts; otherwise no files require special attention.

Vulnerabilities

No security concerns identified. The changes are confined to display/formatting logic with no new API surface, user-input handling, or credential exposure paths.

Important Files Changed

Filename Overview
apps/sim/lib/workflows/comparison/compare.ts Core diff generation and formatting logic; adds edge/variable name resolution, .properties filtering, and extracts helper functions — well-structured and consistent.
apps/sim/lib/workflows/comparison/resolve-values.ts Adds resolveFieldLabel export and resolveDropdownLabel helper; removes unnecessary optional-chaining after guard clauses; dropdown fallback now properly logged via logger.warn.
apps/sim/lib/workflows/comparison/format-description.test.ts 35 new tests covering field resolution, filtering, async path, and end-to-end diff scenarios; two test cases use as any for mock state, which violates the project no-any rule.
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/general/components/version-description-modal.tsx Single-line change: modal size bumped from md to lg to accommodate richer diff descriptions.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[generateWorkflowDiffSummary] --> B{First deployment?}
    B -- Yes --> C[Collect all edges with block names\nCollect all variable names]
    B -- No --> D[Diff blocks, subBlocks, data fields]
    D --> E[Diff edges → addedDetails / removedDetails]
    D --> F[Diff variables → addedNames / removedNames / modifiedNames]
    D --> G[Filter .properties fields]
    C & E & F & G --> H[WorkflowDiffSummary]
    H --> I{Async or sync?}
    I -- Sync --> J[formatDiffSummaryForDescription]
    I -- Async --> K[formatDiffSummaryForDescriptionAsync\nresolves dropdown labels / credentials]
    J --> L[resolveFieldLabel\ndata.* → Title Case\nsubBlock ID → config title]
    K --> L
    J --> M[formatEdgeChanges\nformatCountChanges\nformatVariableChanges]
    K --> M
    M --> N[Human-readable deploy description]
Loading

Reviews (2): Last reviewed commit: "lint" | Re-trigger Greptile

Comment on lines +248 to +254
try {
const label = resolveDropdownLabel(subBlockConfig, value)
if (label) {
return { original: value, displayLabel: label, resolved: true }
}
} catch {}
}

This comment was marked as resolved.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Good catch — replaced the empty catch {} with a logger.warn so dropdown resolution failures are observable. Fixed in a731fa1.

@waleedlatif1
Copy link
Copy Markdown
Collaborator Author

Addressed both Greptile findings in a731fa1:

  1. Silent catch in dropdown resolution — replaced empty catch {} with logger.warn so failures are observable in production.

  2. First-deploy path missing edge/variable name details — the !previousState branch now populates edgeChanges.addedDetails with source/target block names and variableChanges.addedNames with variable names, so first-deploy descriptions are as informative as subsequent ones.

@waleedlatif1
Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1
Copy link
Copy Markdown
Collaborator Author

@cursor review

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 4040a25. Configure here.

@waleedlatif1 waleedlatif1 merged commit b67c068 into staging Apr 9, 2026
12 checks passed
@waleedlatif1 waleedlatif1 deleted the waleedlatif1/deploy-diff-description branch April 9, 2026 17:51
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