fix: preserve workspaceId in bulkUpdateChatflows + optional template name sync#1071
Merged
Merged
Conversation
…sync - bulkUpdateChatflows was spreading the admin template entity without overriding workspaceId, causing all bulk-updated chatflows to land in the template owner's workspace (Default Workspace) instead of each user's Personal Workspace - Add workspaceId: targetChatflow.workspaceId to the override object - Add optional options.updateName flag so admins can choose to propagate the template name to user copies (off by default, preserving existing behaviour) - Wire options through controller and API client - Replace the raw Update button in Admin Chatflows UI with a confirmation dialog that exposes the updateName checkbox - Add migration 1770000000002 to repair chatflows already corrupted by prior bulk updates (idempotent, all orgs, same logic as prod SQL fix)
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Author
|
@copilot please review this pr, thanks! |
Reviewed the PR at commit |
ct3685
added a commit
that referenced
this pull request
May 15, 2026
## 🚀 Release: Staging to Production **Release Date:** 2026-05-15 ### Changes in this release - fix: add missing KeyboardArrowDownIcon import (7d7216e) - feat: collapsible template banner with count pill, green/amber theming, always-green badge (#1074) (99e0c8b) - feat: turn template banner green when all chatflows are up to date (#1073) (7314af5) - fix: reload page after bulk chatflow update and show in-progress state (#1072) (5ca478d) - fix: preserve workspaceId in bulkUpdateChatflows + optional template name sync (#1071) (3e166d6) - chore: update dependencies for improved compatibility and functionality (#1070) (6451d83) - fix: restore Atlassian MCP OAuth by removing stale Passport dependency (#1068) (00bae11) --- *This PR is automatically created/updated when commits are pushed to staging.* *Merging this PR will trigger the release workflow to create a new GitHub release.* --------- Co-authored-by: Cameron Taylor <50385537+ct3685@users.noreply.github.com> Co-authored-by: Cameron Taylor <cameron@lastrev.com>
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
bulkUpdateChatflowswas spreading the admin template entity without overridingworkspaceId, causing every bulk template push to overwrite each user's chatflow workspace with the template owner's workspace ('Default Workspace'). This is the root cause of the repeated prod SQL hotfixes.updateNameflag so admins can choose to propagate the template name to all user copies during a bulk push (off by default — no behaviour change without opt-in).1770000000002-FixBulkUpdateChatflowWorkspaceidempotently repairs chatflows already corrupted by previous bulk updates across all orgs (generalises the prod SQL fix, registered inpostgresMigrations).Changes
packages/server/src/services/chatflows/index.tsworkspaceId: targetChatflow.workspaceIdoverride +options.updateNameconditional name logicpackages/server/src/controllers/chatflows/index.tsoptionsfrom request bodypackages/ui/src/api/chatflows.jsoptionsin PUT bodypackages-answers/ui/src/Admin/Chatflows/index.tsxpackages/server/src/database/migrations/postgres/aai/1770000000002-FixBulkUpdateChatflowWorkspace.tspackages/server/src/database/migrations/postgres/index.tsRoot Cause
Test Plan
parentChatflowIdmove to Personal Workspace