From aa21c15d0e6d0dabcaafa679d2a8068cdf49ee44 Mon Sep 17 00:00:00 2001 From: Giuseppe Di Giorno Date: Mon, 8 Dec 2025 16:19:50 +0100 Subject: [PATCH] fix: hide linear card when not enabled (#12918) The Linear card now only appears in conversation sidebar when: - The linear_integration feature flag is enabled for the account - LINEAR_CLIENT_ID is configured (inferred from the integration existing in the store) This matches the backend behavior: if LINEAR_CLIENT_ID is not set, the integration is filtered out of the API response, so it won't exist in the store. In addition, I discovered that Settings/Integrations page showed Linear card even if it was disabled but Linear client_id set. Now the Linear card shows only if both conditions are met. Fixes #12909 ## How Has This Been Tested? #### Before https://github.com/user-attachments/assets/cd21b881-5332-48f8-b230-662abc256ba2 #### After https://github.com/user-attachments/assets/d794cc2e-19d6-4545-b2ef-3af054c2ac81 --------- Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com> Co-authored-by: Muhsin Keloth Co-authored-by: Shivam Mishra --- .../dashboard/conversation/ContactPanel.vue | 24 ++++++++++++++++--- app/models/integrations/app.rb | 2 +- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/app/javascript/dashboard/routes/dashboard/conversation/ContactPanel.vue b/app/javascript/dashboard/routes/dashboard/conversation/ContactPanel.vue index 17e8dfd25..b163bfdc8 100644 --- a/app/javascript/dashboard/routes/dashboard/conversation/ContactPanel.vue +++ b/app/javascript/dashboard/routes/dashboard/conversation/ContactPanel.vue @@ -5,7 +5,9 @@ import { useFunctionGetter, useStore, } from 'dashboard/composables/store'; +import { useAccount } from 'dashboard/composables/useAccount'; import { useUISettings } from 'dashboard/composables/useUISettings'; +import { FEATURE_FLAGS } from 'dashboard/featureFlags'; import AccordionItem from 'dashboard/components/Accordion/AccordionItem.vue'; import ContactConversations from './ContactConversations.vue'; @@ -52,12 +54,22 @@ const isShopifyFeatureEnabled = computed( () => shopifyIntegration.value.enabled ); +const { isCloudFeatureEnabled } = useAccount(); + +const isLinearFeatureEnabled = computed(() => + isCloudFeatureEnabled(FEATURE_FLAGS.LINEAR) +); + const linearIntegration = useFunctionGetter( 'integrations/getIntegration', 'linear' ); -const isLinearIntegrationEnabled = computed( +const isLinearClientIdConfigured = computed(() => { + return !!linearIntegration.value?.id; +}); + +const isLinearConnected = computed( () => linearIntegration.value?.enabled || false ); @@ -238,7 +250,13 @@ onMounted(() => { -
+
{ value => toggleSidebarUIState('is_linear_issues_open', value) " > - +
diff --git a/app/models/integrations/app.rb b/app/models/integrations/app.rb index 6a1378f1e..5e4d28c06 100644 --- a/app/models/integrations/app.rb +++ b/app/models/integrations/app.rb @@ -53,7 +53,7 @@ class Integrations::App when 'slack' GlobalConfigService.load('SLACK_CLIENT_SECRET', nil).present? when 'linear' - GlobalConfigService.load('LINEAR_CLIENT_ID', nil).present? + account.feature_enabled?('linear_integration') && GlobalConfigService.load('LINEAR_CLIENT_ID', nil).present? when 'shopify' shopify_enabled?(account) when 'leadsquared'