chore(release): staging to production - 2026.05.15#1069
Merged
Conversation
#1068) ## Summary **Commit 1 — fix: Atlassian MCP OAuth 500 error** - **Root cause:** Commit `0ae736e41` intentionally disabled Passport.js session infrastructure when the AAI JWT/API-key auth system was integrated. The `atlassian-dynamic` Passport strategy was left in place but never ran because Passport was never initialized — causing a hard `500: Unknown authentication strategy "atlassian-dynamic"` on every OAuth callback. - **Fix:** Removed Passport from the Atlassian auth flow entirely. Token exchange logic now lives directly in the controller using the already-existing utility functions `exchangeCodeForTokens`, `createCompleteCredentialData`, `clearPendingRegistration` from `utils/index.ts`. - **Removed dead code:** The `GET /api/v1/atlassian-auth/` root route and `authenticate` controller method (both solely called `passport.authenticate(...)`) are gone. **Commit 2 — feat: pre-fetch cloudId context to prevent null cloudId errors (global fix for all Atlassian actions)** - **Root cause:** The Atlassian Remote MCP server requires a `cloudId` parameter for almost every Jira/Confluence tool call (`add_comment_to_jira_issue`, `search_jira_issues`, `create_jira_issue`, `write:confluence-content`, etc.). Without upfront knowledge of it, the LLM would pass `null`, receive a `-32602` validation error, then self-correct by calling `get_accessible_resources` before retrying — one wasted round-trip on every first call. - **Fix is global across all Atlassian MCP actions:** During `getTools()` initialization, the node invokes `get_accessible_resources` using its own `MCPTool` instance (no new MCP SDK imports), parses the cloud resource list, then iterates **every tool** returned by the MCP server and appends a cloudId hint to the description of any tool that declares a `cloudId` parameter in its zod schema. This covers all current and future Atlassian MCP tools automatically — no per-action changes needed. - Single site: `[cloudId for this Atlassian site: "8ca3c755..." (lastrev — https://lastrev.atlassian.net)]` - Multi-site: `[Available Atlassian cloudIds: "8ca3c755..." → lastrev, "f08c36cd..." → lastrev-new]` - Falls back silently if the pre-fetch fails, so no regression on errors. - Node version bumped `1.0 → 1.1`. ## Files changed | File | Change | |------|--------| | `packages/server/src/controllers/atlassian-auth/index.ts` | Removed Passport; inlined OAuth flow using existing utilities; removed dead `authenticate` method | | `packages/server/src/routes/atlassian-auth/index.ts` | Removed Passport import and middleware; removed dead root route | | `packages/server/src/config/passport.ts` | Removed `atlassian-dynamic` CustomStrategy and its unused imports | | `packages/components/nodes/tools/MCP/Atlassian/AtlassianMcp.ts` | Added `fetchCloudResources` + `enrichToolsWithCloudContext`; bumped version to 1.1 | ## OAuth callback flow (unchanged behavior) 1. UI calls `GET /api/v1/atlassian-auth/mcp-initialize` → registers dynamic OAuth client, returns `sessionId`, `client_id`, `authorization_endpoint`, `redirect_uri`, `scope` 2. UI opens popup → user authenticates → Atlassian redirects to `/api/v1/atlassian-auth/callback?code=...&state=<sessionId>` 3. Controller exchanges code for tokens using stored client credentials → builds credential object → posts `AUTH_SUCCESS` to opener ## Test plan - [ ] Start local dev server (`pnpm dev`) - [ ] Navigate to Credentials and create a new Atlassian MCP credential - [ ] Click "Connect with Atlassian" — popup opens and completes without 500 error - [ ] Save credential and add Atlassian MCP node to a chatflow - [ ] Verify the node's "Available Actions" dropdown loads correctly (cloudId hints visible in descriptions) - [ ] Run a Jira action (comment, search, create) — confirm it succeeds on the **first** attempt without a `get_accessible_resources` round-trip - [ ] Run a Confluence action — confirm same first-attempt success - [ ] Test with multiple Atlassian sites connected — confirm all cloudIds appear in the hint - [ ] Verify token refresh still works (`refreshStoredCredentialTokens` path unchanged) - [ ] Verify Salesforce and Google OAuth flows are unaffected ## Target branch `staging`
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…ty (#1070) - Updated `glob` from version `^11.1.0` to `^13.0.6` in `package.json` and `pnpm-lock.yaml` for enhanced performance and features. - Updated `axios` from version `^1.13.5` to `^1.15.1` in `scripts/bws-secure/package.json` for better stability and security. - Updated `dotenv` from version `^17.2.4` to `^17.4.2` in `scripts/bws-secure/package.json` to leverage the latest improvements. - Added new utility functions in `bws-env-utils.js` for better handling of multi-project IDs and environment variable parsing. - Enhanced `secureRun.js` to support loading secrets from multiple BWS project IDs with improved logging and error handling. - Updated documentation in `README.md` and added a new guide for multi-project ID support in `MULTI_PROJECT_ID_GUIDE.md`. This update aims to streamline the environment variable management process and improve overall project maintainability.
…name sync (#1071) ## Summary - **Bug fix**: `bulkUpdateChatflows` was spreading the admin template entity without overriding `workspaceId`, 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. - **Enhancement**: Adds an optional `updateName` flag 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). - **Data migration**: `1770000000002-FixBulkUpdateChatflowWorkspace` idempotently repairs chatflows already corrupted by previous bulk updates across all orgs (generalises the prod SQL fix, registered in `postgresMigrations`). ## Changes | File | Change | |------|--------| | `packages/server/src/services/chatflows/index.ts` | Add `workspaceId: targetChatflow.workspaceId` override + `options.updateName` conditional name logic | | `packages/server/src/controllers/chatflows/index.ts` | Extract and pass `options` from request body | | `packages/ui/src/api/chatflows.js` | Accept and forward `options` in PUT body | | `packages-answers/ui/src/Admin/Chatflows/index.tsx` | Replace raw button click with confirmation dialog + "Also update chatflow name" checkbox | | `packages/server/src/database/migrations/postgres/aai/1770000000002-FixBulkUpdateChatflowWorkspace.ts` | New idempotent data migration | | `packages/server/src/database/migrations/postgres/index.ts` | Import + register new migration | ## Root Cause ```typescript // Before — templateChatflow.workspaceId leaked onto every user's copy const updatedChatflow = { ...templateChatflow, // workspaceId from admin workspace leaked in id: targetChatflow.id, userId: targetChatflow.userId, // workspaceId NOT overridden } // After — workspace always preserved from the target const updatedChatflow = { ...templateChatflow, id: targetChatflow.id, userId: targetChatflow.userId, workspaceId: targetChatflow.workspaceId, // fixed name: options?.updateName ? templateChatflow.name : targetChatflow.name, } ``` ## Test Plan - [ ] Run migration on staging DB — chatflows in Default Workspace with `parentChatflowId` move to Personal Workspace - [ ] Trigger bulk update via Admin Chatflows UI — user chatflows stay in their Personal Workspace after push - [ ] Confirm "Update Selected" now opens a confirmation dialog before acting - [ ] Check "Also update chatflow name" — names synced to template post-update - [ ] Leave checkbox unchecked — names preserved as-is
#1072) ## Summary Patch for the Admin Chatflows bulk update UX: 1. **Page didn't reload after update** — The previous code gated `window.location.reload()` on `response.updated > 0`, but the axios client wraps the body in `.data`, so `response.updated` was always `undefined` and the condition never fired. Fixed by removing the condition and always reloading on success. 2. **No in-progress feedback** — The button showed no indication the update was running. Added `bulkUpdateInProgress` state that disables both the trigger button and the dialog confirm button, and changes their labels to `Updating N…` while the request is in-flight. On error, the state resets so the admin can retry. ## Changes `packages-answers/ui/src/Admin/Chatflows/index.tsx` only — no server changes. ## Test Plan - [ ] Click "Update Selected", confirm dialog, verify button switches to "Updating N…" and is disabled - [ ] After update completes, verify page reloads and outdated badges are gone - [ ] Simulate a network error and verify the button re-enables for retry
…1073) ## Summary The Organization Default Template banner now reflects the actual sync state of the org: - **Any chatflows outdated** → amber/yellow (existing look, unchanged) - **All chatflows current** → green ## How it works A `hasOutdated` boolean is derived inline from `chatflowsData` (already in scope): ```ts const hasOutdated = chatflowsData.some((cf) => cf.templateStatus === 'outdated') ``` A `bc` (banner colors) palette object is keyed on that boolean, providing green vs amber values for every color token used in the banner: background, border, text, muted text, icon colors, hover states, chips, and the DEFAULT TEMPLATE badge. All hardcoded `isDarkMode ? 'rgba(255, 193, 7, ...)' : '#...'` strings inside the banner block are replaced with `bc.*` references. Nothing outside the banner block is touched. ## Test Plan - [ ] With at least one outdated chatflow → banner stays amber - [ ] After pushing updates so all are current → banner turns green - [ ] Works in both light and dark mode
…g, always-green badge (#1074) ## Summary Combines the green/amber theming (from #1073) with new collapsible + count pill enhancements, all in one PR targeting staging. ## What changed **Collapsible banner** - Clicking anywhere on the header row toggles the details section open/closed - Animated with `maxHeight` transition (same pattern as the filter panel) - Chevron icon rotates 180° when expanded - Smart default: expands automatically when there are outdated chatflows, collapses when all are current — no flash, no useEffect - User preference persisted in `localStorage` under `adminTemplateBannerExpanded`; once manually toggled the stored preference takes over **Count pill** - Always visible in the header (visible even when collapsed) - Shows `N outdated` in amber when any are behind, or `All current` in green when everything is synced **Green/amber theming** - Full `bc` color palette: amber when any chatflows outdated, green when all current — applied to border, background, text, muted labels, category chips, icon buttons, hover states - Action icon buttons use `e.stopPropagation()` so clicking View/Metrics/History doesn't accidentally toggle the banner **DEFAULT TEMPLATE badge always green** - Banner header badge: always green regardless of sync state - Table row chip: always green (was amber) ## Test Plan - [ ] With outdated chatflows: banner is amber, auto-expands on first load, shows "N outdated" pill - [ ] After pushing all current: banner turns green, auto-collapses on first load, shows "All current" pill - [ ] Click header to collapse/expand; reload and confirm preference is remembered - [ ] Click View/Metrics/Version History buttons — confirm banner does NOT toggle - [ ] DEFAULT TEMPLATE chip in table rows is green - [ ] Both light and dark mode
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.
🚀 Release: Staging to Production
Release Date: 2026-05-15
Changes in this release
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.