-
Notifications
You must be signed in to change notification settings - Fork 3.1k
feat(versions): added the ability to rename deployment versions #1610
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
| if (res.ok) { | ||
| await fetchVersions() | ||
| setEditingVersion(null) | ||
| } else { | ||
| logger.error('Failed to rename version') | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.* 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
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