diff --git a/packages/bruno-app/src/components/OpenAPISyncTab/ConnectSpecForm/index.js b/packages/bruno-app/src/components/OpenAPISyncTab/ConnectSpecForm/index.js index 6b0aef0a6..ee8f395f3 100644 --- a/packages/bruno-app/src/components/OpenAPISyncTab/ConnectSpecForm/index.js +++ b/packages/bruno-app/src/components/OpenAPISyncTab/ConnectSpecForm/index.js @@ -128,17 +128,6 @@ const ConnectSpecForm = ({ sourceUrl, setSourceUrl, isLoading, error, setError, ))} - -

- OpenAPI Sync is in Beta — we'd love to hear your feedback and suggestions.{' '} - -

); }; diff --git a/packages/bruno-app/src/components/OpenAPISyncTab/index.js b/packages/bruno-app/src/components/OpenAPISyncTab/index.js index 6a8f70513..9b71dc177 100644 --- a/packages/bruno-app/src/components/OpenAPISyncTab/index.js +++ b/packages/bruno-app/src/components/OpenAPISyncTab/index.js @@ -131,16 +131,6 @@ const OpenAPISyncTab = ({ collection }) => { error={error} onOpenSettings={() => setShowSettingsModal(true)} /> -

- OpenAPI Sync is in Beta — we'd love to hear your feedback and suggestions.{' '} - -

)} diff --git a/packages/bruno-app/src/components/Preferences/Beta/index.js b/packages/bruno-app/src/components/Preferences/Beta/index.js index 8a4ea4cf2..d8cb2d03b 100644 --- a/packages/bruno-app/src/components/Preferences/Beta/index.js +++ b/packages/bruno-app/src/components/Preferences/Beta/index.js @@ -6,20 +6,38 @@ import StyledWrapper from './StyledWrapper'; import * as Yup from 'yup'; import debounce from 'lodash/debounce'; import toast from 'react-hot-toast'; -import { IconFlask } from '@tabler/icons'; import get from 'lodash/get'; -import { BETA_FEATURES as BETA_FEATURE_IDS } from 'utils/beta-features'; +// Commented out while there are no active beta features. Re-enable this import when +// adding a beta feature its keys are then referenced as BETA_FEATURE_IDS.MY_FEATURE in the BETA_FEATURES array. +// import { BETA_FEATURES as BETA_FEATURE_IDS } from 'utils/beta-features'; /** - * UI metadata for beta features rendered in Preferences. - * IDs must match keys from utils/beta-features.js BETA_FEATURES. + * UI metadata for the Beta Features section in Preferences — one entry per toggle. + * The whole tab is data-driven from this array: the form fields, validation schema, + * initial values and the rendered checkboxes are all generated from it. + * + * Each entry has the shape { id, label, description }: + * - id (required) the feature key. MUST be a value from BETA_FEATURES in + * utils/beta-features.js (imported here as BETA_FEATURE_IDS). It is + * used as the preference key (preferences.beta[id]), the form field + * name and the checkbox id, so it must be stable and unique. + * - label (required) short name shown next to the checkbox. + * - description (required) one-line explanation shown under the label. + * + * To add a beta feature: + * 1. Add its key to BETA_FEATURES in utils/beta-features.js (e.g. MY_FEATURE: 'my-feature'). + * 2. Add an entry to the array below using BETA_FEATURE_IDS.MY_FEATURE. + * 3. Gate the feature in code with useBetaFeature(BETA_FEATURES.MY_FEATURE). + * + * When the array is empty, the Beta tab shows "No beta features are currently available", + * so a feature can be hidden by simply removing or commenting out its entry. */ const BETA_FEATURES = [ - { - id: BETA_FEATURE_IDS.OPENAPI_SYNC, - label: 'OpenAPI Sync', - description: 'Synchronize your Bruno collection with an OpenAPI specification. Detect drift, review changes, and sync with a single click.' - } + // { + // id: BETA_FEATURE_IDS.OPENAPI_SYNC, + // label: 'OpenAPI Sync', + // description: 'Synchronize your Bruno collection with an OpenAPI specification. Detect drift, review changes, and sync with a single click.' + // } ]; const Beta = ({ close }) => { diff --git a/packages/bruno-app/src/components/RequestTabs/CollectionHeader/index.js b/packages/bruno-app/src/components/RequestTabs/CollectionHeader/index.js index ff14ba497..2e9bf7f07 100644 --- a/packages/bruno-app/src/components/RequestTabs/CollectionHeader/index.js +++ b/packages/bruno-app/src/components/RequestTabs/CollectionHeader/index.js @@ -37,8 +37,6 @@ import { normalizePath } from 'utils/common/path'; import classNames from 'classnames'; import StyledWrapper from './StyledWrapper'; import { useTheme } from 'providers/Theme'; -import { useBetaFeature, BETA_FEATURES } from 'utils/beta-features'; -import StatusBadge from 'ui/StatusBadge/index'; const CollectionHeader = ({ collection, isScratchCollection }) => { const dispatch = useDispatch(); @@ -50,7 +48,6 @@ const CollectionHeader = ({ collection, isScratchCollection }) => { // Get the current active workspace const currentWorkspace = workspaces.find((w) => w.uid === activeWorkspaceUid); const gitRootPath = collection?.git?.gitRootPath; - const isOpenAPISyncEnabled = useBetaFeature(BETA_FEATURES.OPENAPI_SYNC); // Workspace rename state const [isRenamingWorkspace, setIsRenamingWorkspace] = useState(false); @@ -235,8 +232,8 @@ const CollectionHeader = ({ collection, isScratchCollection }) => { const overflowMenuItems = [ { id: 'variables', label: 'Variables', leftSection: IconEye, onClick: viewVariables }, { id: 'file-mode', label: collection.fileMode ? 'Switch to Code Mode' : 'Switch to File Mode', leftSection: collection.fileMode ? IconFileOff : IconFileCode, onClick: handleFileModeClick }, - ...(isOpenAPISyncEnabled && !hasOpenApiSyncConfigured - ? [{ id: 'openapi-sync', label: 'OpenAPI', leftSection: OpenAPISyncIcon, rightSection: Beta, onClick: viewOpenApiSync }] + ...(!hasOpenApiSyncConfigured + ? [{ id: 'openapi-sync', label: 'OpenAPI', leftSection: OpenAPISyncIcon, onClick: viewOpenApiSync }] : []), { id: 'collection-settings', label: 'Collection Settings', leftSection: IconSettings, onClick: viewCollectionSettings } ]; @@ -588,7 +585,7 @@ const CollectionHeader = ({ collection, isScratchCollection }) => { {!isScratchCollection && (
{/* OpenAPI Sync - standalone only when configured and beta enabled */} - {isOpenAPISyncEnabled && hasOpenApiSyncConfigured && ( + {hasOpenApiSyncConfigured && ( { const getTabInfo = (type, tabName) => { @@ -92,7 +91,6 @@ const SpecialTab = ({ handleCloseClick, type, tabName, handleDoubleClick, hasDra <> OpenAPI - Beta ); } diff --git a/packages/bruno-app/src/components/Sidebar/Collections/Collection/index.js b/packages/bruno-app/src/components/Sidebar/Collections/Collection/index.js index 4092af11c..e95539275 100644 --- a/packages/bruno-app/src/components/Sidebar/Collections/Collection/index.js +++ b/packages/bruno-app/src/components/Sidebar/Collections/Collection/index.js @@ -52,8 +52,6 @@ import { getRevealInFolderLabel } from 'utils/common/platform'; import { openDevtoolsAndSwitchToTerminal } from 'utils/terminal'; import ActionIcon from 'ui/ActionIcon'; import MenuDropdown from 'ui/MenuDropdown'; -import StatusBadge from 'ui/StatusBadge'; -import { useBetaFeature, BETA_FEATURES } from 'utils/beta-features'; import { useSidebarAccordion } from 'components/Sidebar/SidebarAccordionContext'; import { createEmptyStateMenuItems } from 'utils/collections/emptyStateRequest'; import useKeybinding from 'hooks/useKeybinding'; @@ -63,7 +61,6 @@ import useKeybinding from 'hooks/useKeybinding'; const EMPTY_STATE_DELAY_MS = 300; const Collection = ({ collection, searchText }) => { - const isOpenAPISyncEnabled = useBetaFeature(BETA_FEATURES.OPENAPI_SYNC); const { dropdownContainerRef } = useSidebarAccordion(); const [showNewFolderModal, setShowNewFolderModal] = useState(false); const [showNewRequestModal, setShowNewRequestModal] = useState(false); @@ -375,13 +372,12 @@ const Collection = ({ collection, searchText }) => { setShowCloneCollectionModalOpen(true); } }, - ...(isOpenAPISyncEnabled ? [{ + { id: 'sync-openapi', leftSection: OpenAPISyncIcon, label: 'OpenAPI', - rightSection: Beta, onClick: openOpenAPISyncTab - }] : []), + }, ...(hasCopiedItems ? [ { diff --git a/packages/bruno-app/src/components/Sidebar/ImportCollectionLocation/index.js b/packages/bruno-app/src/components/Sidebar/ImportCollectionLocation/index.js index 9fdf186f8..483480568 100644 --- a/packages/bruno-app/src/components/Sidebar/ImportCollectionLocation/index.js +++ b/packages/bruno-app/src/components/Sidebar/ImportCollectionLocation/index.js @@ -14,7 +14,6 @@ import { processOpenCollection } from 'utils/importers/opencollection'; import { wsdlToBruno } from '@usebruno/converters'; import { toastError } from 'utils/common/error'; import { addLog } from 'providers/ReduxStore/slices/logs'; -import { useBetaFeature, BETA_FEATURES } from 'utils/beta-features'; import Portal from 'components/Portal'; import Modal from 'components/Modal'; import Help from 'components/Help'; @@ -111,8 +110,7 @@ const ImportCollectionLocation = ({ onClose, handleSubmit, rawData, format, sour const [groupingType, setGroupingType] = useState('tags'); const [collectionFormat, setCollectionFormat] = useState(DEFAULT_COLLECTION_FORMAT); const [showFileFormat, setShowFileFormat] = useState(false); - const isOpenAPISyncEnabled = useBetaFeature(BETA_FEATURES.OPENAPI_SYNC); - const [enableCheckForSpecUpdates, setEnableCheckForSpecUpdates] = useState(isOpenAPISyncEnabled); + const [enableCheckForSpecUpdates, setEnableCheckForSpecUpdates] = useState(false); const dropdownTippyRef = useRef(); const optionsDropdownTippyRef = useRef(); const isOpenApi = format === 'openapi'; @@ -120,7 +118,7 @@ const ImportCollectionLocation = ({ onClose, handleSubmit, rawData, format, sour const isOpenApiFromUrl = isOpenApi && !!sourceUrl && !filePath; const isOpenApiFromFile = isOpenApi && !!filePath && !sourceUrl; const isSwagger2 = isOpenApi && rawData?.swagger && String(rawData.swagger).startsWith('2'); - const showCheckForSpecUpdatesOption = isOpenAPISyncEnabled && (isOpenApiFromUrl || isOpenApiFromFile); + const showCheckForSpecUpdatesOption = isOpenApiFromUrl || isOpenApiFromFile; const { workspaces, activeWorkspaceUid } = useSelector((state) => state.workspaces); const preferences = useSelector((state) => state.app.preferences); @@ -391,7 +389,6 @@ const ImportCollectionLocation = ({ onClose, handleSubmit, rawData, format, sour
)} - {showCheckForSpecUpdatesOption && (