feat(versions): added the ability to rename deployment versions#1610
Merged
waleedlatif1 merged 1 commit intostagingfrom Oct 12, 2025
Merged
feat(versions): added the ability to rename deployment versions#1610waleedlatif1 merged 1 commit intostagingfrom
waleedlatif1 merged 1 commit intostagingfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
There was a problem hiding this comment.
Greptile Overview
Summary
This PR adds the ability to rename deployment versions through an inline editing UI in the deploy modal. The implementation adds a nullable name column to the database, a PATCH API endpoint for renaming, and an inline input field with keyboard shortcuts.
Key Changes:
- Database migration adds nullable
nametext column toworkflow_deployment_versiontable - New PATCH endpoint
/api/workflows/[id]/deployments/[version]validates name (non-empty, max 100 chars) and updates the database - Frontend displays version names with fallback to
v{version}format when no custom name is set - Inline editing with Enter to save, Escape to cancel, and blur-to-save behavior
- Dropdown menu includes new "Rename" option
Minor Issue Found:
- Error handling could be improved to provide user feedback when rename fails
Confidence Score: 4/5
- This PR is safe to merge with low risk
- The implementation is solid with proper validation, permissions checking, and database constraints. Score is 4 instead of 5 due to minor UX improvement opportunity around error feedback.
- No files require special attention - all changes are straightforward and well-implemented
Important Files Changed
File Analysis
| Filename | Score | Overview |
|---|---|---|
| packages/db/schema.ts | 5/5 | Added nullable name text field to workflowDeploymentVersion table schema |
| apps/sim/app/api/workflows/[id]/deployments/[version]/route.ts | 5/5 | Added PATCH endpoint for renaming versions with validation for string type, empty names, and 100 char limit |
| apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/control-bar/components/deploy-modal/deploy-modal.tsx | 4/5 | Added inline rename UI with input field, dropdown control, and keyboard shortcuts (Enter/Escape); handles name persistence and display |
Sequence Diagram
sequenceDiagram
participant User
participant DeployModal
participant API
participant DB
User->>DeployModal: Click "Rename" in dropdown
DeployModal->>DeployModal: Enter editing mode (show input)
User->>DeployModal: Type new name & press Enter
DeployModal->>API: PATCH /api/workflows/{id}/deployments/{version}
API->>API: Validate permissions (write)
API->>API: Validate name (non-empty, ≤100 chars)
API->>DB: UPDATE workflow_deployment_version SET name
DB-->>API: Return updated record
API-->>DeployModal: Success response
DeployModal->>API: GET /api/workflows/{id}/deployments
API->>DB: SELECT versions with names
DB-->>API: Return versions list
API-->>DeployModal: Updated versions
DeployModal->>DeployModal: Exit editing mode
DeployModal->>User: Display updated name
8 files reviewed, 1 comment
Comment on lines
+462
to
+467
| if (res.ok) { | ||
| await fetchVersions() | ||
| setEditingVersion(null) | ||
| } else { | ||
| logger.error('Failed to rename version') | ||
| } |
Contributor
There was a problem hiding this comment.
style: When rename fails, the editing state persists without user feedback. Consider showing a toast notification or resetting the input to the original value.
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/control-bar/components/deploy-modal/deploy-modal.tsx
Line: 462:467
Comment:
**style:** When rename fails, the editing state persists without user feedback. Consider showing a toast notification or resetting the input to the original value.
How can I resolve this? If you propose a fix, please make it concise.
waleedlatif1
added a commit
that referenced
this pull request
Oct 12, 2025
* improvement(performance): remove unused source/target indices, add index on snapshot id (#1603) * fix(blog): rename building to blogs with redirect (#1604) * improvement(privacy-policy): updated privacy policy for google (#1602) * updated privacy policy for google * update terms, privacy, and emails to incl address and update verbiage * feat(guardrails): added guardrails block/tools and docs (#1605) * Adding guardrails block * ack PR comments * cleanup checkbox in dark mode * cleanup * fix supabase tools * fix(inference-billing): fix inference billing when stream is true via API, add drag-and-drop functionality to deployed chat (#1606) * fix(inference): fix inference billing when stream is true via API * add drag-and-drop to deployed chat * feat(mistal): added mistral as a provider, updated model prices (#1607) * feat(mistal): added mistral as a provider, updated model prices * remove the ability for a block to reference its own outluts * fixed order of responses for guardrails block * feat(versions): added the ability to rename deployment versions (#1610) * fix(vulns): fix various vulnerabilities and enhanced code security (#1611) * fix(vulns): fix SSRF vulnerabilities * cleanup * cleanup * regen docs * remove unused deps * fix failing tests * cleanup * update deps * regen bun lock
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
added the ability to rename deployment versions
Type of Change
Testing
Tested manually.
Checklist
Screenshots/Videos
Screen.Recording.2025-10-11.at.9.15.51.PM.mov