From be6e8ff77b92d3f276c1d1ccb6c0c836521c43b7 Mon Sep 17 00:00:00 2001 From: liuxiongfeng Date: Sat, 14 Feb 2026 21:29:36 +0800 Subject: [PATCH] fix(ui): extend mixed channel check to both Antigravity and Anthropic accounts Problem: - When creating Anthropic Console accounts to groups with Antigravity accounts, the mixed channel warning was not triggered - Only Antigravity accounts triggered the confirmation dialog Solution: - Renamed isAntigravityAccount to needsMixedChannelCheck - Extended check to include both 'antigravity' and 'anthropic' platforms - Updated all 8 call sites in CreateAccountModal and EditAccountModal Changes: - frontend/src/components/account/CreateAccountModal.vue: 4 updates - frontend/src/components/account/EditAccountModal.vue: 4 updates Testing: - Frontend compilation: passed - Backend unit tests: passed - OAuth flow: confirmation parameter correctly passed in Step 2 - Backend compatibility: verified with checkMixedChannelRisk logic Impact: - Both Antigravity and Anthropic accounts now show mixed channel warning - OAuth accounts correctly pass confirm_mixed_channel_risk parameter - No breaking changes to existing functionality --- backend/cmd/server/VERSION | 2 +- frontend/src/components/account/CreateAccountModal.vue | 8 ++++---- frontend/src/components/account/EditAccountModal.vue | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/backend/cmd/server/VERSION b/backend/cmd/server/VERSION index 8bfe3bae..5d0156a7 100644 --- a/backend/cmd/server/VERSION +++ b/backend/cmd/server/VERSION @@ -1 +1 @@ -0.1.81.9 +0.1.81.10 diff --git a/frontend/src/components/account/CreateAccountModal.vue b/frontend/src/components/account/CreateAccountModal.vue index 3c14d75d..88f45cca 100644 --- a/frontend/src/components/account/CreateAccountModal.vue +++ b/frontend/src/components/account/CreateAccountModal.vue @@ -2545,7 +2545,7 @@ const splitTempUnschedKeywords = (value: string) => { .filter((item) => item.length > 0) } -const isAntigravityAccount = (platform: AccountPlatform) => platform === 'antigravity' +const needsMixedChannelCheck = (platform: AccountPlatform) => platform === 'antigravity' || platform === 'anthropic' const buildMixedChannelDetails = (resp?: CheckMixedChannelResponse) => { const details = resp?.details @@ -2579,7 +2579,7 @@ const openMixedChannelDialog = (opts: { } const withAntigravityConfirmFlag = (payload: CreateAccountRequest): CreateAccountRequest => { - if (isAntigravityAccount(payload.platform) && antigravityMixedChannelConfirmed.value) { + if (needsMixedChannelCheck(payload.platform) && antigravityMixedChannelConfirmed.value) { return { ...payload, confirm_mixed_channel_risk: true @@ -2591,7 +2591,7 @@ const withAntigravityConfirmFlag = (payload: CreateAccountRequest): CreateAccoun } const ensureAntigravityMixedChannelConfirmed = async (onConfirm: () => Promise): Promise => { - if (!isAntigravityAccount(form.platform)) { + if (!needsMixedChannelCheck(form.platform)) { return true } if (antigravityMixedChannelConfirmed.value) { @@ -2628,7 +2628,7 @@ const submitCreateAccount = async (payload: CreateAccountRequest) => { emit('created') handleClose() } catch (error: any) { - if (error.response?.status === 409 && error.response?.data?.error === 'mixed_channel_warning' && isAntigravityAccount(form.platform)) { + if (error.response?.status === 409 && error.response?.data?.error === 'mixed_channel_warning' && needsMixedChannelCheck(form.platform)) { openMixedChannelDialog({ message: error.response?.data?.message, onConfirm: async () => { diff --git a/frontend/src/components/account/EditAccountModal.vue b/frontend/src/components/account/EditAccountModal.vue index 5c7faaed..9266a2de 100644 --- a/frontend/src/components/account/EditAccountModal.vue +++ b/frontend/src/components/account/EditAccountModal.vue @@ -1535,7 +1535,7 @@ function toPositiveNumber(value: unknown) { return Math.trunc(num) } -const isAntigravityAccount = () => props.account?.platform === 'antigravity' +const needsMixedChannelCheck = () => props.account?.platform === 'antigravity' || props.account?.platform === 'anthropic' const buildMixedChannelDetails = (resp?: CheckMixedChannelResponse) => { const details = resp?.details @@ -1569,7 +1569,7 @@ const openMixedChannelDialog = (opts: { } const withAntigravityConfirmFlag = (payload: Record) => { - if (isAntigravityAccount() && antigravityMixedChannelConfirmed.value) { + if (needsMixedChannelCheck() && antigravityMixedChannelConfirmed.value) { return { ...payload, confirm_mixed_channel_risk: true @@ -1581,7 +1581,7 @@ const withAntigravityConfirmFlag = (payload: Record) => { } const ensureAntigravityMixedChannelConfirmed = async (onConfirm: () => Promise): Promise => { - if (!isAntigravityAccount()) { + if (!needsMixedChannelCheck()) { return true } if (antigravityMixedChannelConfirmed.value) { @@ -1632,7 +1632,7 @@ const submitUpdateAccount = async (accountID: number, updatePayload: Record {