SmythOS Studio: Open-Source Visual AI Agent Builder and deployable runtime stack from SmythOS. Start with an intuitive drag-and-drop workspace, extend with custom code, and deploy your agents anywhere — local, cloud, or edge — with full governance and control.
JavaScript a2aagentic-aiai-agentsdevtoolsmcp-clientn8n-alternativeno-codeopen-sourceorchestrationsmythosvisual-builder
replace metro ui tooltips
ali-inkco2064ab48768e
diff --git a/packages/app/src/builder-ui/ui/dialogs.ts b/packages/app/src/builder-ui/ui/dialogs.tsindex 493eafac..73dbb217 100644--- a/packages/app/src/builder-ui/ui/dialogs.ts+++ b/packages/app/src/builder-ui/ui/dialogs.ts@@ -14,6 +14,7 @@ import {renderExtensionsSkeleton,searchExtensions,} from '../utils';+import { attachRadixTooltip, mapMetroPositionToRadix } from '../utils/tooltip-wrapper';import { createForm, handleTemplateVars, readFormValidation, readFormValues } from './form/';import { errorToast } from '@src/shared/components/toast';@@ -150,7 +151,7 @@ export async function createRightSidebar(title?, content?, actions?, trActions?,tooltip.id = 'tooltip-help-sidebar';tooltip.setAttribute('role', 'tooltip');tooltip.className =- 'tooltip absolute z-10 inline-block text-sm w-max bg-black shadow-lg text-white py-2 px-4 rounded-lg opacity-0 invisible';+ 'tooltip absolute z-50 inline-block text-xs w-max bg-gray-900 shadow-lg text-white py-1.5 px-3 rounded-md opacity-0 invisible';tooltip.style.fontFamily = 'Inter, sans-serif';tooltip.style.transform = 'translate3d(-100%, 0px, 0px)';if (action.tooltip) {@@ -207,9 +208,12 @@ export async function createRightSidebar(title?, content?, actions?, trActions?,if (action.click) button.addEventListener('click', action.click);if (action?.hint) {- button.setAttribute('data-role', 'hint');- button.setAttribute('data-hint-text', action.hint);- button.setAttribute('data-hint-position', action?.hintPosition || 'top');+ // Use Radix Tooltip instead of Metro UI hints+ attachRadixTooltip(button, {+ text: action.hint,+ position: mapMetroPositionToRadix(action?.hintPosition || 'top'),+ delayDuration: 300,+ });}sidebarActions.appendChild(button);@@ -605,7 +609,7 @@ export async function createEmbodimentSidebar(title?, content?, actions?, tooltitooltipElement.setAttribute('role', 'tooltip');tooltipElement.setAttribute('class',- 'tooltip absolute z-10 inline-block text-sm w-max bg-black shadow-lg text-white py-2 px-4 rounded-lg opacity-0 invisible transition-opacity duration-300 pointer-events-none', // Added pointer-events-none+ 'tooltip absolute z-50 inline-block text-xs w-max bg-gray-900 shadow-lg text-white py-1.5 px-3 rounded-md opacity-0 invisible transition-opacity duration-150 pointer-events-none', // Match Radix Tooltip styling);tooltipElement.style.fontFamily = "'Inter', sans-serif";tooltipElement.style.position = 'absolute';diff --git a/packages/app/src/builder-ui/ui/form/createFormField.ts b/packages/app/src/builder-ui/ui/form/createFormField.tsindex 67ab3948..cace3211 100644--- a/packages/app/src/builder-ui/ui/form/createFormField.ts+++ b/packages/app/src/builder-ui/ui/form/createFormField.ts@@ -5,6 +5,7 @@ import {handleVaultBtn,isValidJson,} from '../../utils';+import { attachRadixTooltip, mapMetroClassesToRadix, mapMetroPositionToRadix } from '../../utils/tooltip-wrapper';import { setCodeEditor, toggleMode } from '../dom';import {createButton,@@ -380,11 +381,13 @@ export default function createFormField(entry, displayType = 'block', entryIndex// the hint will be displayed as a floating tooltip that appears on hover rather than// being permanently visible in the form layoutif (['top', 'right', 'bottom', 'left'].includes(entry?.hintPosition)) {- div.setAttribute('data-role', 'hint');- div.setAttribute('data-hint-position', entry?.hintPosition);- div.setAttribute('data-cls-hint', 'bg-gray-50 shadow-lg');- div.setAttribute('data-hint-hide', '500000'); // set to a large number to prevent auto hide- div.setAttribute('data-hint-text', entry.hint);+ // Use Radix Tooltip instead of Metro UI hints+ attachRadixTooltip(div, {+ text: entry.hint,+ position: mapMetroPositionToRadix(entry?.hintPosition),+ className: mapMetroClassesToRadix('bg-gray-50 shadow-lg'),+ delayDuration: 300,+ });// Additional hintif (entry?.additionalHint) {@@ -1004,10 +1007,11 @@ function applyTooltipConfig(actionBtn, action) {? defaultTooltipConfig: { ...defaultTooltipConfig, ...action.tooltip };- actionBtn.setAttribute('data-role', 'hint');- actionBtn.setAttribute('data-hint-position', tooltipConfig.position);- actionBtn.setAttribute('data-cls-hint', tooltipConfig.classes);- actionBtn.setAttribute('data-hint-hide', tooltipConfig.hideDelay);- actionBtn.setAttribute('data-hint-text', tooltipConfig.text);- actionBtn.setAttribute('data-hint-offset', tooltipConfig.offset);+ // Use Radix Tooltip instead of Metro UI hints+ attachRadixTooltip(actionBtn, {+ text: tooltipConfig.text,+ position: mapMetroPositionToRadix(tooltipConfig.position),+ className: mapMetroClassesToRadix(tooltipConfig.classes),+ delayDuration: 300,+ });}diff --git a/packages/app/src/builder-ui/ui/form/fields.ts b/packages/app/src/builder-ui/ui/form/fields.tsindex 08933455..767a5b0f 100644--- a/packages/app/src/builder-ui/ui/form/fields.ts+++ b/packages/app/src/builder-ui/ui/form/fields.ts@@ -1,5 +1,5 @@import DOMPurify from 'dompurify';-import { Tooltip, TooltipContent, TooltipTrigger } from '@src/react/shared/components/ui/tooltip';+import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@src/react/shared/components/ui/tooltip';import React from 'react';import { createRoot } from 'react-dom/client';import { delay } from '../../utils';@@ -1366,26 +1366,30 @@ export function createInfoButton(// and blocks dangerous elements like <script>, event handlers, etc.const sanitizedText = DOMPurify.sanitize(text);- // Render the Tooltip component+ // Render the Tooltip component wrapped in TooltipProviderconst root = createRoot(tooltipContainer);root.render(React.createElement(- Tooltip,- {},- React.createElement(TooltipTrigger, { asChild: true }, iconElement),+ TooltipProvider,+ { delayDuration: 300, skipDelayDuration: 100 },React.createElement(- TooltipContent,- {- side: position as any,- className:- clsHint +- ' whitespace-normal text-xs ' +- (tooltipClasses || (hasLinks ? `min-w-52 max-w-96` : `w-${estimatedWidth}`)) +- ' [&_a]:whitespace-nowrap [&_a]:inline-block',- },- React.createElement('div', {- dangerouslySetInnerHTML: { __html: sanitizedText },- }),+ Tooltip,+ {},+ React.createElement(TooltipTrigger, { asChild: true }, iconElement),+ React.createElement(+ TooltipContent,+ {+ side: position as any,+ className:+ clsHint ++ ' whitespace-normal text-xs ' ++ (tooltipClasses || (hasLinks ? `min-w-52 max-w-96` : `w-${estimatedWidth}`)) ++ ' [&_a]:whitespace-nowrap [&_a]:inline-block',+ },+ React.createElement('div', {+ dangerouslySetInnerHTML: { __html: sanitizedText },+ }),+ ),),),);diff --git a/packages/app/src/builder-ui/ui/react-injects.tsx b/packages/app/src/builder-ui/ui/react-injects.tsxindex 7a07bb3b..f181e28c 100644--- a/packages/app/src/builder-ui/ui/react-injects.tsx+++ b/packages/app/src/builder-ui/ui/react-injects.tsx@@ -22,6 +22,7 @@ import ComponentInputEditor from '@src/react/features/builder/modals/ComponentInimport { MobileHandler } from '@src/react/features/builder/modals/mobile-warning-modal';import ConfirmModal from '@src/react/shared/components/ui/modals/ConfirmModal';import { Spinner } from '@src/react/shared/components/ui/spinner';+import { TooltipProvider } from '@src/react/shared/components/ui/tooltip';import { AppStateProvider, useAppState } from '@src/react/shared/contexts/AppStateContext';import { useAuthCtx } from '@src/react/shared/contexts/auth.context';import { queryClient } from '@src/react/shared/query-client';@@ -49,19 +50,37 @@ const createOneTimeRoot = (id?: string) => {};export function renderDebugLogContainer({ rootID }: { rootID: string }) {- const root = createRoot(document.getElementById(rootID));+ const rootElement = document.getElementById(rootID);+ if (!rootElement) {+ console.error(`Root element with ID "${rootID}" not found`);+ return;+ }+ const root = createRoot(rootElement);const workspace: Workspace = window['workspace'];- root.render(<DebugLogMenu workspace={workspace} />);+ root.render(+ <TooltipProvider delayDuration={300} skipDelayDuration={100}>+ <DebugLogMenu workspace={workspace} />+ </TooltipProvider>,+ );}export function renderAgentDeploymentSidebar({ rootID }: { rootID: string }) {const workspace: Workspace = window['workspace'];- const sidebarRoot = createRoot(document.getElementById(rootID));+ const rootElement = document.getElementById(rootID);++ if (!rootElement) {+ console.error(`Root element with ID "${rootID}" not found`);+ return;+ }++ const sidebarRoot = createRoot(rootElement);sidebarRoot.render(<QueryClientProvider client={queryClient}><AppStateProvider><Router>- <AgentDeploymentSidebar workspace={workspace} />+ <TooltipProvider delayDuration={300} skipDelayDuration={100}>+ <AgentDeploymentSidebar workspace={workspace} />+ </TooltipProvider></Router></AppStateProvider></QueryClientProvider>,@@ -119,49 +138,79 @@ export function renderEndpointFormPreviewSidebar({};};}) {- const root = createRoot(document.getElementById(rootID));+ const rootElement = document.getElementById(rootID);+ if (!rootElement) {+ console.error(`Root element with ID "${rootID}" not found`);+ return;+ }+ const root = createRoot(rootElement);const workspace: Workspace = window['workspace'];root.render(<QueryClientProvider client={queryClient}>- <EndpointFormPreviewSidebar- mode={{- name: 'in-builder',- props: {- defaultSkill: skill,- workspace: workspace,- agentId: workspace.agent.id,- dbg_url: workspace.serverData.dbgUrl,- getAvailableSkills: () =>- workspace.agent?.data?.components- ?.filter((c) => c.name === 'APIEndpoint' && c.inputs?.length > 0)- ?.map((skill) => ({- skillId: skill.id,- details: {- name: skill.title || '',- },- })) || [],- },- }}- />+ <TooltipProvider delayDuration={300} skipDelayDuration={100}>+ <EndpointFormPreviewSidebar+ mode={{+ name: 'in-builder',+ props: {+ defaultSkill: skill,+ workspace: workspace,+ agentId: workspace.agent.id,+ dbg_url: workspace.serverData.dbgUrl,+ getAvailableSkills: () =>+ workspace.agent?.data?.components+ ?.filter((c) => c.name === 'APIEndpoint' && c.inputs?.length > 0)+ ?.map((skill) => ({+ skillId: skill.id,+ details: {+ name: skill.title || '',+ },+ })) || [],+ },+ }}+ />+ </TooltipProvider></QueryClientProvider>,);}export function renderAgentSettingsSidebar({ rootID }: { rootID: string }) {- const workspace: Workspace = window['workspace'];- const sidebarRoot = createRoot(document.getElementById(rootID));- sidebarRoot.render(- <QueryClientProvider client={queryClient}>- <AppStateProvider>- <Router>- <AgentSettingsProvider workspace={workspace} workspaceAgentId={workspace.agent.id}>- <AgentSettingTabs />- </AgentSettingsProvider>- </Router>- </AppStateProvider>- </QueryClientProvider>,- );+ try {+ const workspace: Workspace = window['workspace'];+ const rootElement = document.getElementById(rootID);++ if (!rootElement) {+ console.error(`Root element with ID "${rootID}" not found`);+ return;+ }++ if (!workspace?.agent?.id) {+ console.error('Workspace agent ID is not available');+ return;+ }++ const sidebarRoot = createRoot(rootElement);+ sidebarRoot.render(+ <QueryClientProvider client={queryClient}>+ <AppStateProvider>+ <Router>+ <TooltipProvider delayDuration={300} skipDelayDuration={100}>+ <AgentSettingsProvider workspace={workspace} workspaceAgentId={workspace.agent.id}>+ <AgentSettingTabs />+ </AgentSettingsProvider>+ </TooltipProvider>+ </Router>+ </AppStateProvider>+ </QueryClientProvider>,+ );+ } catch (error) {+ console.error('Error rendering agent settings sidebar:', error);+ const rootElement = document.getElementById(rootID);+ if (rootElement) {+ rootElement.innerHTML =+ '<div style="padding: 20px; color: red;">Error loading agent settings. Please refresh the page.</div>';+ }+ }}/*These modals are self contained and do not need to be inside providers@@ -278,7 +327,9 @@ export function renderAgentModals({ rootID }: { rootID: string }): void {<QueryClientProvider client={queryClient}><AppStateProvider><DeploymentSidebarProvider workspace={workspace}>- <ModalsContent />+ <TooltipProvider delayDuration={300} skipDelayDuration={100}>+ <ModalsContent />+ </TooltipProvider></DeploymentSidebarProvider></AppStateProvider></QueryClientProvider>diff --git a/packages/app/src/builder-ui/utils/component.utils/index.ts b/packages/app/src/builder-ui/utils/component.utils/index.tsindex a2512278..db87f60c 100644--- a/packages/app/src/builder-ui/utils/component.utils/index.ts+++ b/packages/app/src/builder-ui/utils/component.utils/index.ts@@ -60,7 +60,7 @@ export async function handleKvFieldEditBtn(//dispatch custom event for consistencyconst changeEvent = new Event('change');field.dispatchEvent(changeEvent);-+// Also dispatch input event for auto-saveconst inputEvent = new Event('input', { bubbles: true });field.dispatchEvent(inputEvent);@@ -1117,7 +1117,7 @@ export function addTooltipToLockBadge(element, tooltipText) {const tooltipId = `tooltip-${Math.random().toString(36).substr(2, 9)}`;const tooltipHTML = `- <div id="${tooltipId}" role="tooltip" class="absolute cursor-default z-10 invisible inline-block px-3 py-2 text-sm font-medium text-white transition-opacity duration-300 bg-gray-900 rounded-lg shadow-sm opacity-0 tooltip dark:bg-gray-700">+ <div id="${tooltipId}" role="tooltip" class="absolute cursor-default z-50 invisible inline-block px-3 py-1.5 text-xs font-medium text-white transition-opacity duration-150 bg-gray-900 rounded-md shadow-sm opacity-0 tooltip dark:bg-gray-700">${tooltipText}</div>`;element?.setAttribute('data-tooltip-target', tooltipId);@@ -1132,4 +1132,3 @@ export function addTooltipToLockBadge(element, tooltipText) {export { default as PromptGeneratorUtils } from './PromptGenerator.utils';export { default as VisionLLMUtils } from './VisionLLM.utils';-diff --git a/packages/app/src/builder-ui/utils/tooltip-wrapper.ts b/packages/app/src/builder-ui/utils/tooltip-wrapper.tsnew file mode 100644index 00000000..135e5123--- /dev/null+++ b/packages/app/src/builder-ui/utils/tooltip-wrapper.ts@@ -0,0 +1,187 @@+/**+ * Utility to attach Radix UI Tooltip to vanilla DOM elements+ * This bridges the gap between vanilla JS and React components+ */++import DOMPurify from 'dompurify';+import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@src/react/shared/components/ui/tooltip';+import React from 'react';+import { createRoot, Root } from 'react-dom/client';++/**+ * Configuration options for attaching a Radix Tooltip to a DOM element+ */+export interface AttachTooltipConfig {+ /**+ * Tooltip text content (supports HTML)+ */+ text: string;+ /**+ * Tooltip position relative to element+ * @default 'top'+ */+ position?: 'top' | 'right' | 'bottom' | 'left';+ /**+ * Additional CSS classes for tooltip content+ */+ className?: string;+ /**+ * Delay before showing tooltip (ms)+ * @default 300+ */+ delayDuration?: number;+ /**+ * Skip delay duration (ms)+ * @default 100+ */+ skipDelayDuration?: number;+}++/**+ * Attaches a Radix UI Tooltip to an existing vanilla DOM element+ *+ * @param element - The DOM element to attach the tooltip to+ * @param config - Tooltip configuration options+ * @returns Cleanup function to remove the tooltip+ *+ * @example+ * ```typescript+ * const button = document.createElement('button');+ * button.textContent = 'Hover me';+ * const cleanup = attachRadixTooltip(button, {+ * text: 'This is a tooltip',+ * position: 'top'+ * });+ * // Later, call cleanup() to remove the tooltip+ * ```+ */+export function attachRadixTooltip(+ element: HTMLElement,+ config: AttachTooltipConfig,+): () => void {+ // Validate element+ if (!element || !element.parentNode) {+ console.warn('attachRadixTooltip: Element must have a parent node');+ return () => {};+ }++ // Create a wrapper container for the React component+ // We'll wrap the element so we can attach the tooltip to the wrapper+ const wrapper = document.createElement('div');+ wrapper.style.display = 'inline-block';++ // Preserve element's display style if it exists+ const elementDisplay = window.getComputedStyle(element).display;+ if (elementDisplay === 'block' || elementDisplay === 'flex' || elementDisplay === 'grid') {+ wrapper.style.width = '100%';+ }++ // Insert wrapper before element and move element into wrapper+ const parent = element.parentNode;+ const nextSibling = element.nextSibling;+ parent.insertBefore(wrapper, element);+ wrapper.appendChild(element);++ // Sanitize HTML content to prevent XSS attacks+ const sanitizedText = DOMPurify.sanitize(config.text);++ // Create React root and render tooltip+ const root: Root = createRoot(wrapper);++ // Create a span React element that will wrap the DOM element+ // We use display: contents so it doesn't affect layout+ const triggerSpan = React.createElement('span', {+ style: { display: 'contents' },+ ref: (node: HTMLSpanElement | null) => {+ // After React renders, move the element into the span+ if (node && element.parentNode === wrapper) {+ node.appendChild(element);+ }+ },+ });++ root.render(+ React.createElement(+ TooltipProvider,+ {+ delayDuration: config.delayDuration ?? 300,+ skipDelayDuration: config.skipDelayDuration ?? 100,+ },+ React.createElement(+ Tooltip,+ {},+ React.createElement(+ TooltipTrigger,+ {+ asChild: true,+ },+ triggerSpan,+ ),+ React.createElement(+ TooltipContent,+ {+ side: config.position ?? 'top',+ className: config.className ?? 'bg-gray-50 shadow-lg',+ },+ React.createElement('div', {+ dangerouslySetInnerHTML: { __html: sanitizedText },+ }),+ ),+ ),+ ),+ );++ // Return cleanup function+ return () => {+ try {+ root.unmount();+ // Move element back to original position if wrapper still exists+ if (wrapper.parentNode && element.parentNode === wrapper) {+ if (nextSibling) {+ parent.insertBefore(element, nextSibling);+ } else {+ parent.appendChild(element);+ }+ wrapper.remove();+ }+ } catch (error) {+ console.warn('Error cleaning up tooltip:', error);+ }+ };+}++/**+ * Maps Metro UI hint position to Radix Tooltip position+ *+ * @param metroPosition - Metro UI hint position+ * @returns Radix Tooltip position+ */+export function mapMetroPositionToRadix(+ metroPosition?: string,+): 'top' | 'right' | 'bottom' | 'left' {+ const position = metroPosition?.toLowerCase();++ if (position === 'right') return 'right';+ if (position === 'bottom') return 'bottom';+ if (position === 'left') return 'left';++ // Default to 'top' for 'top' or any other value+ return 'top';+}++/**+ * Maps Metro UI hint classes to Radix Tooltip classes+ *+ * @param metroClasses - Metro UI hint classes (e.g., 'bg-gray-50 shadow-lg')+ * @returns Radix Tooltip compatible classes+ */+export function mapMetroClassesToRadix(metroClasses?: string): string {+ if (!metroClasses) {+ return 'bg-gray-50 shadow-lg';+ }++ // Metro UI classes are typically Tailwind-compatible+ // Return as-is, but ensure we have a base style+ return metroClasses;+}+diff --git a/packages/app/src/react/features/agent-settings/components/Assignments/ChatWithAgentWidget.tsx b/packages/app/src/react/features/agent-settings/components/Assignments/ChatWithAgentWidget.tsxindex ba6a22cd..c38683f8 100644--- a/packages/app/src/react/features/agent-settings/components/Assignments/ChatWithAgentWidget.tsx+++ b/packages/app/src/react/features/agent-settings/components/Assignments/ChatWithAgentWidget.tsx@@ -1,6 +1,7 @@import WidgetCard from '@react/features/agent-settings/components/WidgetCard';import { useAgentSettingsCtx } from '@react/features/agent-settings/contexts/agent-settings.context';import { PRIMARY_BUTTON_STYLE, SECONDARY_BUTTON_STYLE } from '@react/shared/constants/style';+import { Tooltip, TooltipContent, TooltipTrigger } from '@react/shared/components/ui/tooltip';import { useAuthCtx } from '@react/shared/contexts/auth.context';import { Observability } from '@src/shared/observability';import { EVENTS } from '@src/shared/posthog/constants/events';@@ -70,61 +71,77 @@ const ChatWithAgentWidget = ({ isWriteAccess, isAgentDeployed }: Props) => {<div className="flex items-center"><label className="flex items-center gap-2 text-sm font-semibold text-gray-700 mb-2">Chat with Agent- <Tooltip- className="w-52 text-center"- content="Interact directly with your agent through a conversational interface."- >- <Info className="w-4 h-4" />+ <Tooltip>+ <TooltipTrigger asChild>+ <Info className="w-4 h-4" />+ </TooltipTrigger>+ <TooltipContent className="w-52 text-center">+ <p>Interact directly with your agent through a conversational interface.</p>+ </TooltipContent></Tooltip></label></div><p className="text-sm text-gray-500">Message your agent, assign a task via chat.</p></div>- <Tooltip- content={- <>- To chat with your agent, please deploy to production.{' '}- <>+ {!isAgentDeployed && (+ <Tooltip>+ <TooltipTrigger asChild>+ <div>+ <Link+ to={isAgentDeployed ? `/chat/${agentId}` : ''}+ className={classNames(+ 'flex items-center justify-center font-normal border border-solid text-base px-4 py-2 text-center rounded transition-all duration-200 outline-none focus:outline-none focus:ring-0 focus:ring-offset-0 focus:ring-shadow-none',+ `${isAgentDeployed ? PRIMARY_BUTTON_STYLE : SECONDARY_BUTTON_STYLE}`,+ )}+ onClick={(e) => {+ Observability.observeInteraction(EVENTS.AGENT_SETTINGS_EVENTS.app_chat_with_agent, {+ source: 'agent settings',+ });+ !isAgentDeployed && e.preventDefault();+ }}+ target="_blank"+ >+ <ChatIcon className="w-6 h-6 mr-1" />+ Chat <FaArrowRight className="ml-1" />+ </Link>+ </div>+ </TooltipTrigger>+ <TooltipContent side="top" className="min-w-[280px] text-center">+ <div>+ To chat with your agent, please deploy to production.{' '}<Linkto={`/builder/${agentId}`}target="_blank"className="underline"reloadDocument+ onClick={(e) => e.stopPropagation()}>Deploy</Link>{' '}your agent now.- </>- </>- }- trigger="hover"- placement="top"- className={classNames(- isAgentDeployed ? 'opacity-0 pointer-events-none' : 'opacity-100',- 'min-w-[280px] text-center',- )}- hidden={isAgentDeployed}- style="dark"- >+ </div>+ </TooltipContent>+ </Tooltip>+ )}+ {isAgentDeployed && (<Link- to={isAgentDeployed ? `/chat/${agentId}` : ''}+ to={`/chat/${agentId}`}className={classNames('flex items-center justify-center font-normal border border-solid text-base px-4 py-2 text-center rounded transition-all duration-200 outline-none focus:outline-none focus:ring-0 focus:ring-offset-0 focus:ring-shadow-none',- `${isAgentDeployed ? PRIMARY_BUTTON_STYLE : SECONDARY_BUTTON_STYLE}`,+ PRIMARY_BUTTON_STYLE,)}- onClick={(e) => {+ onClick={() => {Observability.observeInteraction(EVENTS.AGENT_SETTINGS_EVENTS.app_chat_with_agent, {source: 'agent settings',});- !isAgentDeployed && e.preventDefault();}}target="_blank"><ChatIcon className="w-6 h-6 mr-1" />Chat <FaArrowRight className="ml-1" /></Link>- </Tooltip>+ )}</div></div></WidgetCard>diff --git a/packages/app/src/react/features/agent-settings/pages/AgentSettingsPage.tsx b/packages/app/src/react/features/agent-settings/pages/AgentSettingsPage.tsxindex dff2efe6..410dfb68 100644--- a/packages/app/src/react/features/agent-settings/pages/AgentSettingsPage.tsx+++ b/packages/app/src/react/features/agent-settings/pages/AgentSettingsPage.tsx@@ -11,6 +11,7 @@ import {useAgentSettingsCtx,} from '@react/features/agent-settings/contexts/agent-settings.context';import { Button as CustomButton } from '@react/shared/components/ui/newDesign/button';+import { TooltipProvider } from '@react/shared/components/ui/tooltip';import { PRICING_PLAN_REDIRECT } from '@react/shared/constants/navigation';import { useAuthCtx } from '@react/shared/contexts/auth.context';import config from '@src/builder-ui/config';@@ -29,9 +30,11 @@ type Props = {};export const AgentSettingsPage = (props: Props) => {return (- <AgentSettingsProvider>- <AgentSettingsPageBody />- </AgentSettingsProvider>+ <TooltipProvider delayDuration={300} skipDelayDuration={100}>+ <AgentSettingsProvider>+ <AgentSettingsPageBody />+ </AgentSettingsProvider>+ </TooltipProvider>);};diff --git a/packages/app/src/react/features/agents/components/agentCard/AgentCard.tsx b/packages/app/src/react/features/agents/components/agentCard/AgentCard.tsxindex a3bbff14..31da3f04 100644--- a/packages/app/src/react/features/agents/components/agentCard/AgentCard.tsx+++ b/packages/app/src/react/features/agents/components/agentCard/AgentCard.tsx@@ -14,11 +14,11 @@ import {UnPinIcon,} from '@src/react/shared/components/svgs';import { Button } from '@src/react/shared/components/ui/newDesign/button';+import { Tooltip, TooltipContent, TooltipTrigger } from '@src/react/shared/components/ui/tooltip';import { useAuthCtx } from '@src/react/shared/contexts/auth.context';import { FEATURE_FLAGS } from '@src/shared/constants/featureflags';import { Observability } from '@src/shared/observability';import classNames from 'classnames';-import { Tooltip, TooltipContent, TooltipTrigger } from '@src/react/shared/components/ui/tooltip';import { useEffect, useRef, useState } from 'react';import {FaCircleNotch,@@ -172,324 +172,336 @@ export function AgentCard({ agent, loadAgents, updateAgentInPlace }: AgentCardPr{ 'opacity-50': cardState.isDeleted || cardState.isDeleting },)}>- {/* Avatar Section */}- <div className="w-[25%] h-[120px] p-1">- <img- className={classNames('w-full h-full rounded-l-md', {- 'object-cover': agentData.avatarImage !== DEFAULT_AVATAR,- })}- src={agentData.avatarImage}- alt={agent.name || 'Agent avatar'}- />- </div>+ {/* Avatar Section */}+ <div className="w-[25%] h-[120px] p-1">+ <img+ className={classNames('w-full h-full rounded-l-md', {+ 'object-cover': agentData.avatarImage !== DEFAULT_AVATAR,+ })}+ src={agentData.avatarImage}+ alt={agent.name || 'Agent avatar'}+ />+ </div>- {/* Content Section */}- <div className="p-3 h-[120px] flex-grow flex flex-col justify-between w-[65%]">- {/* Header with name and dropdown */}- <div className="flex items-start justify-between">- <div className="flex-1 min-w-0">- <h3 className="text-base font-medium text-gray-900 truncate" title={agent.name}>- {agent.name}- </h3>- <p- className="mt-1 text-sm text-gray-500 line-clamp-2 whitespace-nowrap text-ellipsis"- title={userName}- >- by {userName}- </p>- </div>- {agent.isPinned && (- <div className="relative py-1">- <PinIconSlim className="text-white text-[10px] m-auto" />+ {/* Content Section */}+ <div className="p-3 h-[120px] flex-grow flex flex-col justify-between w-[65%]">+ {/* Header with name and dropdown */}+ <div className="flex items-start justify-between">+ <div className="flex-1 min-w-0">+ <h3 className="text-base font-medium text-gray-900 truncate" title={agent.name}>+ {agent.name}+ </h3>+ <p+ className="mt-1 text-sm text-gray-500 line-clamp-2 whitespace-nowrap text-ellipsis"+ title={userName}+ >+ by {userName}+ </p></div>- )}- {/* Actions Dropdown */}- {(agentData.permissions.canEdit || agentData.permissions.canRead || isStaffUser) && (- <Menu as="div" className="relative">- {({ open }) => {- // Track dropdown state for tooltip visibility- if (dropdownOpenRef.current !== open) {- dropdownOpenRef.current = open;- // Use setTimeout to avoid setState during render- setTimeout(() => {- cardState.setIsActionDropdownVisible(open);- }, 0);- }+ {agent.isPinned && (+ <div className="relative py-1">+ <PinIconSlim className="text-white text-[10px] m-auto" />+ </div>+ )}+ {/* Actions Dropdown */}+ {(agentData.permissions.canEdit ||+ agentData.permissions.canRead ||+ isStaffUser) && (+ <Menu as="div" className="relative">+ {({ open }) => {+ // Track dropdown state for tooltip visibility+ if (dropdownOpenRef.current !== open) {+ dropdownOpenRef.current = open;+ // Use setTimeout to avoid setState during render+ setTimeout(() => {+ cardState.setIsActionDropdownVisible(open);+ }, 0);+ }- return (- <>- <Menu.Button- className="p-1 text-gray-400 hover:text-gray-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"- onClick={(e) => e.stopPropagation()}- data-qa="agent-card-ellipsis-button"- >- <FaEllipsisVertical className="w-4 h-4" />- </Menu.Button>+ return (+ <>+ <Menu.Button+ className="p-1 text-gray-400 hover:text-gray-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"+ onClick={(e) => e.stopPropagation()}+ data-qa="agent-card-ellipsis-button"+ >+ <FaEllipsisVertical className="w-4 h-4" />+ </Menu.Button>- <Menu.Items className="absolute right-0 top-6 mt-2 w-48 bg-white rounded-md shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none z-10">- <div className="py-1">- {/* Pin/Unpin */}- {agentData.permissions.canDuplicate && (- <Menu.Item>- {({ active }) => (- <button- onClick={(e) => {- e.stopPropagation();- e.preventDefault();- handlePinAgent();- // Don't close menu immediately - let handlePinAgent control it- }}- disabled={cardState.isPinning}- className={classNames(- active ? 'bg-gray-100 text-gray-900' : 'text-gray-700',- 'group flex items-center px-4 py-2 text-sm w-full text-left',- { 'opacity-50 cursor-not-allowed': cardState.isPinning },- )}- >- {cardState.isPinning ? (- <FaCircleNotch className="mr-3 h-4 w-4 animate-spin" />- ) : (- <div className="relative mr-3 h-4 w-4">- {agent.isPinned ? (- <UnPinIcon className="h-4 w-4" />- ) : (- <PinIcon className="h-4 w-4" />- )}- </div>- )}- {cardState.isPinning- ? agent.isPinned- ? 'Unpinning...'- : 'Pinning...'- : agent.isPinned- ? 'Unpin Agent'- : 'Pin Agent'}- </button>- )}- </Menu.Item>- )}- {/* Duplicate */}- {agentData.permissions.canDuplicate && (- <Menu.Item>- {({ active }) => (- <button- onClick={(e) => {- e.stopPropagation();- e.preventDefault();- handleDuplicateAgent();- // Don't close menu immediately - let handleDuplicateAgent control it- }}- disabled={cardState.isDuplicating}- className={classNames(- active ? 'bg-gray-100 text-gray-900' : 'text-gray-700',- 'group flex items-center px-4 py-2 text-sm w-full text-left',- { 'opacity-50 cursor-not-allowed': cardState.isDuplicating },- )}- >- {cardState.isDuplicating ? (- <FaCircleNotch className="mr-3 h-4 w-4 animate-spin" />- ) : (- <FaRegCopy className="mr-3 h-4 w-4" />- )}- {cardState.isDuplicating ? 'Duplicating...' : 'Duplicate'}- </button>- )}- </Menu.Item>- )}+ <Menu.Items className="absolute right-0 top-6 mt-2 w-48 bg-white rounded-md shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none z-10">+ <div className="py-1">+ {/* Pin/Unpin */}+ {agentData.permissions.canDuplicate && (+ <Menu.Item>+ {({ active }) => (+ <button+ onClick={(e) => {+ e.stopPropagation();+ e.preventDefault();+ handlePinAgent();+ // Don't close menu immediately - let handlePinAgent control it+ }}+ disabled={cardState.isPinning}+ className={classNames(+ active ? 'bg-gray-100 text-gray-900' : 'text-gray-700',+ 'group flex items-center px-4 py-2 text-sm w-full text-left',+ { 'opacity-50 cursor-not-allowed': cardState.isPinning },+ )}+ >+ {cardState.isPinning ? (+ <FaCircleNotch className="mr-3 h-4 w-4 animate-spin" />+ ) : (+ <div className="relative mr-3 h-4 w-4">+ {agent.isPinned ? (+ <UnPinIcon className="h-4 w-4" />+ ) : (+ <PinIcon className="h-4 w-4" />+ )}+ </div>+ )}+ {cardState.isPinning+ ? agent.isPinned+ ? 'Unpinning...'+ : 'Pinning...'+ : agent.isPinned+ ? 'Unpin Agent'+ : 'Pin Agent'}+ </button>+ )}+ </Menu.Item>+ )}+ {/* Duplicate */}+ {agentData.permissions.canDuplicate && (+ <Menu.Item>+ {({ active }) => (+ <button+ onClick={(e) => {+ e.stopPropagation();+ e.preventDefault();+ handleDuplicateAgent();+ // Don't close menu immediately - let handleDuplicateAgent control it+ }}+ disabled={cardState.isDuplicating}+ className={classNames(+ active ? 'bg-gray-100 text-gray-900' : 'text-gray-700',+ 'group flex items-center px-4 py-2 text-sm w-full text-left',+ {+ 'opacity-50 cursor-not-allowed': cardState.isDuplicating,+ },+ )}+ >+ {cardState.isDuplicating ? (+ <FaCircleNotch className="mr-3 h-4 w-4 animate-spin" />+ ) : (+ <FaRegCopy className="mr-3 h-4 w-4" />+ )}+ {cardState.isDuplicating ? 'Duplicating...' : 'Duplicate'}+ </button>+ )}+ </Menu.Item>+ )}- {/* Contributors */}- {agent.contributors && agent.contributors.length > 0 && (- <Menu.Item>- {({ active }) => (- <button- onClick={(e) => {- e.stopPropagation();- setIsContributorsModalOpen(true);- }}- className={classNames(- active ? 'bg-gray-100 text-gray-900' : 'text-gray-700',- 'group flex items-center px-4 py-2 text-sm w-full text-left',- )}- >- <FaUsers className="mr-3 h-4 w-4" />- Contributors- </button>- )}- </Menu.Item>- )}+ {/* Contributors */}+ {agent.contributors && agent.contributors.length > 0 && (+ <Menu.Item>+ {({ active }) => (+ <button+ onClick={(e) => {+ e.stopPropagation();+ setIsContributorsModalOpen(true);+ }}+ className={classNames(+ active ? 'bg-gray-100 text-gray-900' : 'text-gray-700',+ 'group flex items-center px-4 py-2 text-sm w-full text-left',+ )}+ >+ <FaUsers className="mr-3 h-4 w-4" />+ Contributors+ </button>+ )}+ </Menu.Item>+ )}- {/* Activity */}- {(featureFlagPayload as { showActivity?: boolean })?.showActivity && (- <Menu.Item>- {({ active }) => (- <button- onClick={(e) => {- e.stopPropagation();- setIsActivityModalOpen(true);- }}- className={classNames(- active ? 'bg-gray-100 text-gray-900' : 'text-gray-700',- 'group flex items-center px-4 py-2 text-sm w-full text-left',- )}- >- <FaClockRotateLeft className="mr-3 h-4 w-4" />- Activity- </button>- )}- </Menu.Item>- )}+ {/* Activity */}+ {(featureFlagPayload as { showActivity?: boolean })?.showActivity && (+ <Menu.Item>+ {({ active }) => (+ <button+ onClick={(e) => {+ e.stopPropagation();+ setIsActivityModalOpen(true);+ }}+ className={classNames(+ active ? 'bg-gray-100 text-gray-900' : 'text-gray-700',+ 'group flex items-center px-4 py-2 text-sm w-full text-left',+ )}+ >+ <FaClockRotateLeft className="mr-3 h-4 w-4" />+ Activity+ </button>+ )}+ </Menu.Item>+ )}- {/* Delete */}- {agentData.permissions.canDelete && (- <Menu.Item>- {({ active }) => (- <button- onClick={(e) => {- e.stopPropagation();- setShowDeleteConfirmationModal(true);- }}- disabled={cardState.isDeleting}- className={classNames(- active ? 'bg-red-100 text-red-900' : 'text-red-700',- 'group flex items-center px-4 py-2 text-sm w-full text-left',- { 'opacity-50 cursor-not-allowed': cardState.isDeleting },- )}- >- {cardState.isDeleting ? (- <FaCircleNotch className="mr-3 h-4 w-4 animate-spin" />- ) : (- <FaTrash className="mr-3 h-4 w-4" />- )}- {cardState.isDeleting ? 'Deleting...' : 'Delete'}- </button>- )}- </Menu.Item>- )}- </div>- </Menu.Items>- </>- );- }}- </Menu>- )}- </div>+ {/* Delete */}+ {agentData.permissions.canDelete && (+ <Menu.Item>+ {({ active }) => (+ <button+ onClick={(e) => {+ e.stopPropagation();+ setShowDeleteConfirmationModal(true);+ }}+ disabled={cardState.isDeleting}+ className={classNames(+ active ? 'bg-red-100 text-red-900' : 'text-red-700',+ 'group flex items-center px-4 py-2 text-sm w-full text-left',+ { 'opacity-50 cursor-not-allowed': cardState.isDeleting },+ )}+ >+ {cardState.isDeleting ? (+ <FaCircleNotch className="mr-3 h-4 w-4 animate-spin" />+ ) : (+ <FaTrash className="mr-3 h-4 w-4" />+ )}+ {cardState.isDeleting ? 'Deleting...' : 'Delete'}+ </button>+ )}+ </Menu.Item>+ )}+ </div>+ </Menu.Items>+ </>+ );+ }}+ </Menu>+ )}+ </div>- {/* Action Buttons */}- <div className="flex justify-end gap-2 pt-2">- {/* Edit/View Button */}- {agentData.permissions.canRead && (- <Button- variant="secondary"- isLink- reloadDocument- linkTo={`/builder/${agent.id}`}- dataAttributes={{ 'data-test': 'edit-agent-button' }}- className="relative h-8 w-20 overflow-hidden border border-solid border-[#D1D1D1] rounded-lg transition duration-300 justify-center bg-white hover:bg-[#e6e6e6]"- Icon={- <div className="block">- {agentData.permissions.canEdit ? (- <PencilIcon className="stroke-[#727272] mr-1" />- ) : (- <FaEye className="text-[#727272] mr-1" size={15} />- )}- </div>- }- addIcon- onMouseEnter={() => cardState.setIsButtonTooltipVisible(true)}- onMouseLeave={() => cardState.setIsButtonTooltipVisible(false)}- >- <span className="text-sm font-normal text-[#5a5a5a] font-body">- {agentData.permissions.canEdit ? 'Edit' : 'View'}- </span>- </Button>- )}+ {/* Action Buttons */}+ <div className="flex justify-end gap-2 pt-2">+ {/* Edit/View Button */}+ {agentData.permissions.canRead && (+ <Button+ variant="secondary"+ isLink+ reloadDocument+ linkTo={`/builder/${agent.id}`}+ dataAttributes={{ 'data-test': 'edit-agent-button' }}+ className="relative h-8 w-20 overflow-hidden border border-solid border-[#D1D1D1] rounded-lg transition duration-300 justify-center bg-white hover:bg-[#e6e6e6]"+ Icon={+ <div className="block">+ {agentData.permissions.canEdit ? (+ <PencilIcon className="stroke-[#727272] mr-1" />+ ) : (+ <FaEye className="text-[#727272] mr-1" size={15} />+ )}+ </div>+ }+ addIcon+ onMouseEnter={() => cardState.setIsButtonTooltipVisible(true)}+ onMouseLeave={() => cardState.setIsButtonTooltipVisible(false)}+ >+ <span className="text-sm font-normal text-[#5a5a5a] font-body">+ {agentData.permissions.canEdit ? 'Edit' : 'View'}+ </span>+ </Button>+ )}- {/* Chat Button */}- {!agentData.isAvailable && (- <Tooltip>- <TooltipTrigger asChild>- <Button- variant="secondary"- isLink={agentData.isAvailable}- linkTo={agentData.isAvailable ? `/chat/${agent.id}` : ''}- dataAttributes={{ 'data-test': 'chat-agent-button' }}- handleClick={(e) => e.stopPropagation()}- className={classNames(- 'relative h-8 w-20 overflow-hidden border border-solid rounded-lg transition duration-300 justify-center',- {- 'border-v2-blue bg-white hover:bg-v2-blue/10': agentData.isAvailable,- 'border-[#D1D1D1] bg-gray-100 cursor-not-allowed': !agentData.isAvailable,- },- )}- Icon={- <div className="block">- <ChatIconWithTail- className="mr-1"- stroke={agentData.isAvailable ? '#3C89F9' : '#727272'}- fill={agentData.isAvailable ? '#3C89F9' : '#727272'}- />- </div>- }- addIcon- onMouseEnter={() => cardState.setIsButtonTooltipVisible(true)}- onMouseLeave={() => cardState.setIsButtonTooltipVisible(false)}- >- <span- className={classNames('text-sm font-normal font-body', {- 'text-v2-blue': agentData.isAvailable,- 'text-[#5a5a5a]': !agentData.isAvailable,- })}+ {/* Chat Button */}+ {!agentData.isAvailable && (+ <Tooltip>+ <TooltipTrigger asChild>+ <Button+ variant="secondary"+ isLink={agentData.isAvailable}+ linkTo={agentData.isAvailable ? `/chat/${agent.id}` : ''}+ dataAttributes={{ 'data-test': 'chat-agent-button' }}+ handleClick={(e) => e.stopPropagation()}+ className={classNames(+ 'relative h-8 w-20 overflow-hidden border border-solid rounded-lg transition duration-300 justify-center',+ {+ 'border-v2-blue bg-white hover:bg-v2-blue/10': agentData.isAvailable,+ 'border-[#D1D1D1] bg-gray-100 cursor-not-allowed':+ !agentData.isAvailable,+ },+ )}+ Icon={+ <div className="block">+ <ChatIconWithTail+ className="mr-1"+ stroke={agentData.isAvailable ? '#3C89F9' : '#727272'}+ fill={agentData.isAvailable ? '#3C89F9' : '#727272'}+ />+ </div>+ }+ addIcon+ onMouseEnter={() => cardState.setIsButtonTooltipVisible(true)}+ onMouseLeave={() => cardState.setIsButtonTooltipVisible(false)}>- Chat- </span>- </Button>- </TooltipTrigger>- <TooltipContent side={cardState.tooltipPosition === 'bottom' ? 'top' : 'bottom'} className="min-w-[280px] text-center">- {chatTooltipContent}- </TooltipContent>- </Tooltip>- )}- {agentData.isAvailable && (- <Button- variant="secondary"- isLink={agentData.isAvailable}- linkTo={agentData.isAvailable ? `/chat/${agent.id}` : ''}- dataAttributes={{ 'data-test': 'chat-agent-button' }}- handleClick={(e) => e.stopPropagation()}- className={classNames(- 'relative h-8 w-20 overflow-hidden border border-solid rounded-lg transition duration-300 justify-center',- {- 'border-v2-blue bg-white hover:bg-v2-blue/10': agentData.isAvailable,- 'border-[#D1D1D1] bg-gray-100 cursor-not-allowed': !agentData.isAvailable,- },- )}- Icon={- <div className="block">- <ChatIconWithTail- className="mr-1"- stroke={agentData.isAvailable ? '#3C89F9' : '#727272'}- fill={agentData.isAvailable ? '#3C89F9' : '#727272'}- />- </div>- }- addIcon- onMouseEnter={() => cardState.setIsButtonTooltipVisible(true)}- onMouseLeave={() => cardState.setIsButtonTooltipVisible(false)}- >- <span- className={classNames('text-sm font-normal font-body', {- 'text-v2-blue': agentData.isAvailable,- 'text-[#5a5a5a]': !agentData.isAvailable,- })}+ <span+ className={classNames('text-sm font-normal font-body', {+ 'text-v2-blue': agentData.isAvailable,+ 'text-[#5a5a5a]': !agentData.isAvailable,+ })}+ >+ Chat+ </span>+ </Button>+ </TooltipTrigger>+ <TooltipContent+ side={cardState.tooltipPosition === 'bottom' ? 'top' : 'bottom'}+ className="min-w-[280px] text-center"+ >+ {chatTooltipContent}+ </TooltipContent>+ </Tooltip>+ )}+ {agentData.isAvailable && (+ <Button+ variant="secondary"+ isLink={agentData.isAvailable}+ linkTo={agentData.isAvailable ? `/chat/${agent.id}` : ''}+ dataAttributes={{ 'data-test': 'chat-agent-button' }}+ handleClick={(e) => e.stopPropagation()}+ className={classNames(+ 'relative h-8 w-20 overflow-hidden border border-solid rounded-lg transition duration-300 justify-center',+ {+ 'border-v2-blue bg-white hover:bg-v2-blue/10': agentData.isAvailable,+ 'border-[#D1D1D1] bg-gray-100 cursor-not-allowed': !agentData.isAvailable,+ },+ )}+ Icon={+ <div className="block">+ <ChatIconWithTail+ className="mr-1"+ stroke={agentData.isAvailable ? '#3C89F9' : '#727272'}+ fill={agentData.isAvailable ? '#3C89F9' : '#727272'}+ />+ </div>+ }+ addIcon+ onMouseEnter={() => cardState.setIsButtonTooltipVisible(true)}+ onMouseLeave={() => cardState.setIsButtonTooltipVisible(false)}>- Chat- </span>- </Button>- )}+ <span+ className={classNames('text-sm font-normal font-body', {+ 'text-v2-blue': agentData.isAvailable,+ 'text-[#5a5a5a]': !agentData.isAvailable,+ })}+ >+ Chat+ </span>+ </Button>+ )}+ </div></div></div>- </div>- <TooltipContent side={cardState.tooltipPosition} className="opacity-100 text-center agent-card-tooltip">+ </TooltipTrigger>+ <TooltipContent+ side={cardState.tooltipPosition}+ className="opacity-100 text-center agent-card-tooltip"+ ><p>{agentData.description}</p></TooltipContent></Tooltip>diff --git a/packages/app/src/react/features/agents/components/modals/deploy-agent-modal.tsx b/packages/app/src/react/features/agents/components/modals/deploy-agent-modal.tsxindex 8003f51c..f26ec81f 100644--- a/packages/app/src/react/features/agents/components/modals/deploy-agent-modal.tsx+++ b/packages/app/src/react/features/agents/components/modals/deploy-agent-modal.tsx@@ -19,12 +19,12 @@ import { OnboardingTaskType } from '@react/shared/types/onboard.types';import { UserSettingsKey } from '@src/backend/types/user-data';import FormEmbodimentModal from '@src/react/features/embodiments/form-embodiment-modal';import LovableEmbodimentModal from '@src/react/features/embodiments/lovable-embodiment-modal';+import { Tooltip, TooltipContent, TooltipTrigger } from '@src/react/shared/components/ui/tooltip';import { errorToast, successToast } from '@src/shared/components/toast';import { SMYTHOS_DOCS_URL } from '@src/shared/constants/general';import { Observability } from '@src/shared/observability';import { builderStore } from '@src/shared/state_stores/builder/store';import { useQuery } from '@tanstack/react-query';-import { Tooltip, TooltipContent, TooltipTrigger } from '@src/react/shared/components/ui/tooltip';import { useFormik } from 'formik';import { Info } from 'lucide-react';import React, { useEffect, useState } from 'react';@@ -596,23 +596,15 @@ function DeployAgentModal({ userInfo, deploymentSidebarCtx }) {</div><Tabs defaultValue="agent-cloud" className="w-full relative"><TabsList className="grid w-full grid-cols-3 mb-4 h-auto">- <Tooltip>- <TooltipTrigger asChild>- <TabsTrigger- value="agent-cloud"- className="px-10 py-2.5 text-sm rounded-sm w-full"- >- Agent Cloud- </TabsTrigger>- </TooltipTrigger>- <TooltipContent side="top">- <div style={{ whiteSpace: 'normal' }}>- Convenient, easy, and instant. We handle all the hosting of your agent- for you at $2 per 1,000 tasks, only pay for what you use. Unlock chat,- bulk work, schedules, analytics, logs, APIs and more.- </div>- </TooltipContent>- </Tooltip>+ <TabsTrigger+ value="agent-cloud"+ className="px-10 py-2.5 text-sm rounded-sm tooltip-trigger relative"+ data-tooltip="Convenient, easy, and instant. We handle all the hosting of your agent for you at $2 per 1,000 tasks, only pay for what you use. Unlock chat, bulk work, schedules, analytics, logs, APIs and more."+ data-tooltip-position="bottom"+ data-tooltip-width="md"+ >+ Agent Cloud+ </TabsTrigger><TabsTrigger value="enterprise" className="px-10 py-2.5 text-sm rounded-sm">Enterprise</TabsTrigger>diff --git a/packages/app/src/react/features/builder/components/agent-deployment-sidebar/DeploymentSidebarContent.tsx b/packages/app/src/react/features/builder/components/agent-deployment-sidebar/DeploymentSidebarContent.tsxindex dcce7ad1..54e3b7e8 100644--- a/packages/app/src/react/features/builder/components/agent-deployment-sidebar/DeploymentSidebarContent.tsx+++ b/packages/app/src/react/features/builder/components/agent-deployment-sidebar/DeploymentSidebarContent.tsx@@ -1,7 +1,7 @@import DeploymentsHistory from '@src/react/features/builder/components/agent-deployment-sidebar/DeploymentsHistory';import DeploymentStatus from '@src/react/features/builder/components/agent-deployment-sidebar/DeploymentStatus';-import { PRIMARY_BUTTON_STYLE } from '@src/react/shared/constants/style';import { Tooltip, TooltipContent, TooltipTrigger } from '@src/react/shared/components/ui/tooltip';+import { PRIMARY_BUTTON_STYLE } from '@src/react/shared/constants/style';import { useState } from 'react';const DeploymentSidebarContent = () => {@@ -78,20 +78,21 @@ const DeploymentSidebarContent = () => {type="button"className="close-btn text-[#757575] hover:bg-gray-100 rounded-lg p-2"onClick={() => window.dispatchEvent(new CustomEvent('toggle-sidebar-request'))}- >- <svg- width="16"- height="16"- viewBox="0 0 24 24"- fill="none"- xmlns="http://www.w3.org/2000/svg">- <path- d="M20.7457 3.32851C20.3552 2.93798 19.722 2.93798 19.3315 3.32851L12.0371 10.6229L4.74275 3.32851C4.35223 2.93798 3.71906 2.93798 3.32854 3.32851C2.93801 3.71903 2.93801 4.3522 3.32854 4.74272L10.6229 12.0371L3.32856 19.3314C2.93803 19.722 2.93803 20.3551 3.32856 20.7457C3.71908 21.1362 4.35225 21.1362 4.74277 20.7457L12.0371 13.4513L19.3315 20.7457C19.722 21.1362 20.3552 21.1362 20.7457 20.7457C21.1362 20.3551 21.1362 19.722 20.7457 19.3315L13.4513 12.0371L20.7457 4.74272C21.1362 4.3522 21.1362 3.71903 20.7457 3.32851Z"- fill="#0F0F0F"- />- </svg>- </button>+ <svg+ width="16"+ height="16"+ viewBox="0 0 24 24"+ fill="none"+ xmlns="http://www.w3.org/2000/svg"+ >+ <path+ d="M20.7457 3.32851C20.3552 2.93798 19.722 2.93798 19.3315 3.32851L12.0371 10.6229L4.74275 3.32851C4.35223 2.93798 3.71906 2.93798 3.32854 3.32851C2.93801 3.71903 2.93801 4.3522 3.32854 4.74272L10.6229 12.0371L3.32856 19.3314C2.93803 19.722 2.93803 20.3551 3.32856 20.7457C3.71908 21.1362 4.35225 21.1362 4.74277 20.7457L12.0371 13.4513L19.3315 20.7457C19.722 21.1362 20.3552 21.1362 20.7457 20.7457C21.1362 20.3551 21.1362 19.722 20.7457 19.3315L13.4513 12.0371L20.7457 4.74272C21.1362 4.3522 21.1362 3.71903 20.7457 3.32851Z"+ fill="#0F0F0F"+ />+ </svg>+ </button>+ </TooltipTrigger><TooltipContent side="left"><p>Close</p></TooltipContent>diff --git a/packages/app/src/react/shared/components/ui/tooltip.tsx b/packages/app/src/react/shared/components/ui/tooltip.tsxindex e178b7b7..365d409b 100644--- a/packages/app/src/react/shared/components/ui/tooltip.tsx+++ b/packages/app/src/react/shared/components/ui/tooltip.tsx@@ -33,7 +33,7 @@ const TooltipContent = React.forwardRef<ref={ref}sideOffset={sideOffset}className={cn(- 'z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md bg-gray-900 px-3 py-1.5 text-xs text-white text-balance animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',+ 'z-50 w-fit max-w-[400px] origin-(--radix-tooltip-content-transform-origin) rounded-md bg-gray-900 px-3 py-1.5 text-xs text-white text-balance animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',className,)}{...props}diff --git a/packages/app/static/css/smyth-global.css b/packages/app/static/css/smyth-global.cssindex 5caf3d69..9f33e4bd 100644--- a/packages/app/static/css/smyth-global.css+++ b/packages/app/static/css/smyth-global.css@@ -1056,15 +1056,16 @@ html {.sidebar-tooltip {visibility: hidden;opacity: 0;- transition: opacity 0.3s ease-in-out;+ transition: opacity 150ms cubic-bezier(0.16, 1, 0.3, 1); /* Match Radix animation timing */position: fixed;- z-index: 999;- padding: 0.5rem 0.75rem;- font-size: 0.875rem;+ z-index: 50; /* Match Radix z-50 */+ padding: 6px 12px; /* py-1.5 px-3 to match Radix Tooltip (0.375rem 0.75rem) */+ font-size: 12px; /* text-xs to match Radix Tooltip (0.75rem) */+ line-height: 1.5; /* Match Radix Tooltip line-height */font-weight: 500;color: white;- background-color: #111827;- border-radius: 0.5rem;+ background-color: #111827; /* bg-gray-900 to match Radix Tooltip */+ border-radius: 6px; /* rounded-md to match Radix Tooltip (0.375rem) */box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);white-space: nowrap;pointer-events: none;@@ -1150,21 +1151,42 @@ html {cursor: pointer;}+.tooltip-trigger[data-tooltip-width='xs']::before {+ max-width: 50px;+}+.tooltip-trigger[data-tooltip-width='sm']::before {+ max-width: 100px;+}+.tooltip-trigger[data-tooltip-width='md']::before {+ max-width: 200px;+}+.tooltip-trigger[data-tooltip-width='lg']::before {+ max-width: 300px;+}+.tooltip-trigger::before {content: attr(data-tooltip);position: absolute;- background: #333;+ background: #111827; /* bg-gray-900 to match Radix Tooltip */color: white;- padding: 8px 12px;- border-radius: 4px;- font-size: 14px;- white-space: nowrap;+ padding: 6px 12px; /* py-1.5 px-3 to match Radix Tooltip (0.375rem 0.75rem) */+ border-radius: 6px; /* rounded-md to match Radix Tooltip (0.375rem) */+ font-size: 12px; /* text-xs to match Radix Tooltip (0.75rem) */+ line-height: 1.5; /* Match Radix Tooltip line-height */+ white-space: normal; /* Allow text wrapping */+ width: max-content; /* Use content width up to max-width */+ max-width: 400px;+ word-wrap: break-word; /* Break long words if needed */+ overflow-wrap: break-word; /* Modern property for word breaking */+ text-align: center; /* Center align text content */opacity: 0;visibility: hidden;+ transform: scale(0.95); /* Initial zoom state to match Radix zoom-in-95 */transition:- opacity 0.2s ease,- visibility 0.2s ease;- z-index: 1000 !important;+ opacity 150ms cubic-bezier(0.16, 1, 0.3, 1),+ visibility 150ms cubic-bezier(0.16, 1, 0.3, 1),+ transform 150ms cubic-bezier(0.16, 1, 0.3, 1); /* Match Radix animation timing */+ z-index: 50 !important; /* Match Radix z-50 */pointer-events: none !important; /* Prevents tooltip from intercepting mouse events and breaking hover behavior */}@@ -1175,9 +1197,9 @@ html {opacity: 0;visibility: hidden;transition:- opacity 0.2s ease,- visibility 0.2s ease;- z-index: 1000 !important;+ opacity 150ms cubic-bezier(0.16, 1, 0.3, 1),+ visibility 150ms cubic-bezier(0.16, 1, 0.3, 1); /* Match Radix animation timing */+ z-index: 50 !important; /* Match Radix z-50 */pointer-events: none !important; /* Prevents tooltip from intercepting mouse events and breaking hover behavior */}@@ -1187,6 +1209,43 @@ html {.tooltip-trigger:focus-visible::after {opacity: 1;visibility: visible;+ /* Scale transform will be combined with position-specific transforms via CSS specificity */+}++/* Combine scale with position-specific transforms for top/bottom positions */+.tooltip-trigger[data-tooltip-position='top']:hover::before,+.tooltip-trigger[data-tooltip-position='top']:focus-visible::before,+.tooltip-trigger[data-tooltip-position='bottom']:hover::before,+.tooltip-trigger[data-tooltip-position='bottom']:focus-visible::before {+ transform: translateX(-50%) scale(1); /* Combine translateX with scale */+}++/* Combine scale with position-specific transforms for left/right positions */+.tooltip-trigger[data-tooltip-position='left']:hover::before,+.tooltip-trigger[data-tooltip-position='left']:focus-visible::before,+.tooltip-trigger[data-tooltip-position='right']:hover::before,+.tooltip-trigger[data-tooltip-position='right']:focus-visible::before {+ transform: translateY(-50%) scale(1); /* Combine translateY with scale */+}++/* For positions without translate, just use scale */+.tooltip-trigger[data-tooltip-position='top-left']:hover::before,+.tooltip-trigger[data-tooltip-position='top-left']:focus-visible::before,+.tooltip-trigger[data-tooltip-position='top-right']:hover::before,+.tooltip-trigger[data-tooltip-position='top-right']:focus-visible::before,+.tooltip-trigger[data-tooltip-position='bottom-left']:hover::before,+.tooltip-trigger[data-tooltip-position='bottom-left']:focus-visible::before,+.tooltip-trigger[data-tooltip-position='bottom-right']:hover::before,+.tooltip-trigger[data-tooltip-position='bottom-right']:focus-visible::before,+.tooltip-trigger[data-tooltip-position='left-top']:hover::before,+.tooltip-trigger[data-tooltip-position='left-top']:focus-visible::before,+.tooltip-trigger[data-tooltip-position='left-bottom']:hover::before,+.tooltip-trigger[data-tooltip-position='left-bottom']:focus-visible::before,+.tooltip-trigger[data-tooltip-position='right-top']:hover::before,+.tooltip-trigger[data-tooltip-position='right-top']:focus-visible::before,+.tooltip-trigger[data-tooltip-position='right-bottom']:hover::before,+.tooltip-trigger[data-tooltip-position='right-bottom']:focus-visible::before {+ transform: scale(1); /* Final zoom state to match Radix zoom-in-95 animation */}/* Modifier: pill-style dark tooltip with soft shadow */@@ -1254,32 +1313,55 @@ html {.tooltip-trigger.tooltip-active::after {opacity: 1;visibility: visible;+ /* Scale transform will be combined with position-specific transforms via CSS specificity */+}++/* Combine scale with position-specific transforms for tooltip-active state */+.tooltip-trigger[data-tooltip-position='top'].tooltip-active::before,+.tooltip-trigger[data-tooltip-position='bottom'].tooltip-active::before {+ transform: translateX(-50%) scale(1); /* Combine translateX with scale */+}++.tooltip-trigger[data-tooltip-position='left'].tooltip-active::before,+.tooltip-trigger[data-tooltip-position='right'].tooltip-active::before {+ transform: translateY(-50%) scale(1); /* Combine translateY with scale */+}++.tooltip-trigger[data-tooltip-position='top-left'].tooltip-active::before,+.tooltip-trigger[data-tooltip-position='top-right'].tooltip-active::before,+.tooltip-trigger[data-tooltip-position='bottom-left'].tooltip-active::before,+.tooltip-trigger[data-tooltip-position='bottom-right'].tooltip-active::before,+.tooltip-trigger[data-tooltip-position='left-top'].tooltip-active::before,+.tooltip-trigger[data-tooltip-position='left-bottom'].tooltip-active::before,+.tooltip-trigger[data-tooltip-position='right-top'].tooltip-active::before,+.tooltip-trigger[data-tooltip-position='right-bottom'].tooltip-active::before {+ transform: scale(1); /* Final zoom state to match Radix zoom-in-95 animation */}/* Top position */.tooltip-trigger[data-tooltip-position='top']::before {bottom: calc(100% + 10px);left: 50%;- transform: translateX(-50%);+ transform: translateX(-50%) scale(0.95); /* Initial zoom state to match Radix zoom-in-95 */}.tooltip-trigger[data-tooltip-position='top']::after {bottom: calc(100%);left: 50%;transform: translateX(-50%);- border-top-color: #333;+ border-top-color: #111827; /* bg-gray-900 to match Radix Tooltip */}/* Top-left position */.tooltip-trigger[data-tooltip-position='top-left']::before {bottom: calc(100% + 10px);right: 0;- transform: none;+ transform: scale(0.95); /* Initial zoom state to match Radix zoom-in-95 */}.tooltip-trigger[data-tooltip-position='top-left']::after {bottom: calc(100%);right: 10px;transform: none;- border-top-color: #333;+ border-top-color: #111827; /* bg-gray-900 to match Radix Tooltip */}/* Top-right position */@@ -1292,20 +1374,20 @@ html {bottom: calc(100%);left: 10px;transform: none;- border-top-color: #333;+ border-top-color: #111827; /* bg-gray-900 to match Radix Tooltip */}/* Bottom position */.tooltip-trigger[data-tooltip-position='bottom']::before {top: calc(100% + 10px);left: 50%;- transform: translateX(-50%);+ transform: translateX(-50%) scale(0.95); /* Initial zoom state to match Radix zoom-in-95 */}.tooltip-trigger[data-tooltip-position='bottom']::after {top: calc(100%);left: 50%;transform: translateX(-50%);- border-bottom-color: #333;+ border-bottom-color: #111827; /* bg-gray-900 to match Radix Tooltip */}/* Bottom-left position */@@ -1318,7 +1400,7 @@ html {top: calc(100%);right: 10px;transform: none;- border-bottom-color: #333;+ border-bottom-color: #111827; /* bg-gray-900 to match Radix Tooltip */}/* Bottom-right position */@@ -1331,85 +1413,85 @@ html {top: calc(100%);left: 10px;transform: none;- border-bottom-color: #333;+ border-bottom-color: #111827; /* bg-gray-900 to match Radix Tooltip */}/* Left position */.tooltip-trigger[data-tooltip-position='left']::before {right: calc(100% + 10px);top: 50%;- transform: translateY(-50%);+ transform: translateY(-50%) scale(0.95); /* Initial zoom state to match Radix zoom-in-95 */}.tooltip-trigger[data-tooltip-position='left']::after {right: calc(100%);top: 50%;transform: translateY(-50%);- border-left-color: #333;+ border-left-color: #111827; /* bg-gray-900 to match Radix Tooltip */}/* Left-top position */.tooltip-trigger[data-tooltip-position='left-top']::before {right: calc(100% + 10px);top: 0;- transform: none;+ transform: scale(0.95); /* Initial zoom state to match Radix zoom-in-95 */}.tooltip-trigger[data-tooltip-position='left-top']::after {right: calc(100%);top: 10px;transform: none;- border-left-color: #333;+ border-left-color: #111827; /* bg-gray-900 to match Radix Tooltip */}/* Left-bottom position */.tooltip-trigger[data-tooltip-position='left-bottom']::before {right: calc(100% + 10px);bottom: 0;- transform: none;+ transform: scale(0.95); /* Initial zoom state to match Radix zoom-in-95 */}.tooltip-trigger[data-tooltip-position='left-bottom']::after {right: calc(100%);bottom: 10px;transform: none;- border-left-color: #333;+ border-left-color: #111827; /* bg-gray-900 to match Radix Tooltip */}/* Right position */.tooltip-trigger[data-tooltip-position='right']::before {left: calc(100% + 10px);top: 50%;- transform: translateY(-50%);+ transform: translateY(-50%) scale(0.95); /* Initial zoom state to match Radix zoom-in-95 */}.tooltip-trigger[data-tooltip-position='right']::after {left: calc(100%);top: 50%;transform: translateY(-50%);- border-right-color: #333;+ border-right-color: #111827; /* bg-gray-900 to match Radix Tooltip */}/* Right-top position */.tooltip-trigger[data-tooltip-position='right-top']::before {left: calc(100% + 10px);top: 0;- transform: none;+ transform: scale(0.95); /* Initial zoom state to match Radix zoom-in-95 */}.tooltip-trigger[data-tooltip-position='right-top']::after {left: calc(100%);top: 10px;transform: none;- border-right-color: #333;+ border-right-color: #111827; /* bg-gray-900 to match Radix Tooltip */}/* Right-bottom position */.tooltip-trigger[data-tooltip-position='right-bottom']::before {left: calc(100% + 10px);bottom: 0;- transform: none;+ transform: scale(0.95); /* Initial zoom state to match Radix zoom-in-95 */}.tooltip-trigger[data-tooltip-position='right-bottom']::after {left: calc(100%);bottom: 10px;transform: none;- border-right-color: #333;+ border-right-color: #111827; /* bg-gray-900 to match Radix Tooltip */}/* Top-right position */@@ -1422,7 +1504,7 @@ html {bottom: calc(100%);left: 10px;transform: none;- border-top-color: #333;+ border-top-color: #111827; /* bg-gray-900 to match Radix Tooltip */}/* Bottom-left position */@@ -1435,7 +1517,7 @@ html {top: calc(100%);right: 10px;transform: none;- border-bottom-color: #333;+ border-bottom-color: #111827; /* bg-gray-900 to match Radix Tooltip */}/* Bottom-right position */@@ -1448,7 +1530,7 @@ html {top: calc(100%);left: 10px;transform: none;- border-bottom-color: #333;+ border-bottom-color: #111827; /* bg-gray-900 to match Radix Tooltip */}@media (max-width: 768px) {