Self-improving AI Employees for everyone
Python ai-agentsai-employeeai-employeesassistantautonomous-agentsco-employeescompanygrok-botinstinctloop-agentsmuseown-your-datapersonalself-hosted
fix(ui): correct radix data-state variant + auto-skill key mismatch
trohitg3e484c0ec248
diff --git a/client/src/components/parameterPanel/MasterSkillEditor.tsx b/client/src/components/parameterPanel/MasterSkillEditor.tsxindex 6c94b4af..6e1b5aa2 100644--- a/client/src/components/parameterPanel/MasterSkillEditor.tsx+++ b/client/src/components/parameterPanel/MasterSkillEditor.tsx@@ -482,7 +482,7 @@ const MasterSkillEditor: React.FC<MasterSkillEditorProps> = ({if (nodeId) {await sendRequest('save_node_parameters', {node_id: nodeId,- parameters: { skillsConfig: newConfig, skillFolder: skillFolder || 'assistant' }+ parameters: { skills_config: newConfig, skillFolder: skillFolder || 'assistant' }});}diff --git a/client/src/components/ui/Modal.tsx b/client/src/components/ui/Modal.tsxindex 094f5fe6..e68cb3d4 100644--- a/client/src/components/ui/Modal.tsx+++ b/client/src/components/ui/Modal.tsx@@ -70,7 +70,7 @@ const Modal: React.FC<ModalProps> = ({data-slot="dialog-content"className={cn('fixed top-1/2 left-1/2 z-50 flex -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-lg border border-border bg-background shadow-2xl outline-none',- 'data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 duration-100',+ 'data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 duration-100',className)}style={{diff --git a/client/src/components/ui/accordion.tsx b/client/src/components/ui/accordion.tsxindex fcfee5ca..209394d6 100644--- a/client/src/components/ui/accordion.tsx+++ b/client/src/components/ui/accordion.tsx@@ -61,12 +61,12 @@ function AccordionContent({return (<AccordionPrimitive.Contentdata-slot="accordion-content"- className="overflow-hidden text-sm data-open:animate-accordion-down data-closed:animate-accordion-up"+ className="overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down"{...props}><divclassName={cn(- "h-(--radix-accordion-content-height) pt-0 pb-2.5 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",+ "pt-0 pb-2.5 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",className)}>diff --git a/client/src/components/ui/alert-dialog.tsx b/client/src/components/ui/alert-dialog.tsxindex 186efdb8..38c9e2c6 100644--- a/client/src/components/ui/alert-dialog.tsx+++ b/client/src/components/ui/alert-dialog.tsx@@ -34,7 +34,7 @@ function AlertDialogOverlay({<AlertDialogPrimitive.Overlaydata-slot="alert-dialog-overlay"className={cn(- "fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",+ "fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=closed]:animate-out data-[state=closed]:fade-out-0",className)}{...props}@@ -56,7 +56,7 @@ function AlertDialogContent({data-slot="alert-dialog-content"data-size={size}className={cn(- "group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",+ "group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",className)}{...props}diff --git a/client/src/components/ui/dialog.tsx b/client/src/components/ui/dialog.tsxindex a2c2d0bf..e35c4bf3 100644--- a/client/src/components/ui/dialog.tsx+++ b/client/src/components/ui/dialog.tsx@@ -39,7 +39,7 @@ function DialogOverlay({<DialogPrimitive.Overlaydata-slot="dialog-overlay"className={cn(- "fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",+ "fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=closed]:animate-out data-[state=closed]:fade-out-0",className)}{...props}@@ -61,7 +61,7 @@ function DialogContent({<DialogPrimitive.Contentdata-slot="dialog-content"className={cn(- "fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",+ "fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",className)}{...props}diff --git a/client/src/components/ui/dropdown-menu.tsx b/client/src/components/ui/dropdown-menu.tsxindex c263ad57..1ecb7520 100644--- a/client/src/components/ui/dropdown-menu.tsx+++ b/client/src/components/ui/dropdown-menu.tsx@@ -43,7 +43,7 @@ function DropdownMenuContent({data-slot="dropdown-menu-content"sideOffset={sideOffset}align={align}- className={cn("z-50 max-h-(--radix-dropdown-menu-content-available-height) w-(--radix-dropdown-menu-trigger-width) min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 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 data-[state=closed]:overflow-hidden data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className )}+ className={cn("z-50 max-h-(--radix-dropdown-menu-content-available-height) w-(--radix-dropdown-menu-trigger-width) min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 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 data-[state=closed]:overflow-hidden data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95", className )}{...props}/></DropdownMenuPrimitive.Portal>@@ -226,7 +226,7 @@ function DropdownMenuSubTrigger({data-slot="dropdown-menu-sub-trigger"data-inset={inset}className={cn(- "flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",+ "flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",className)}{...props}@@ -244,7 +244,7 @@ function DropdownMenuSubContent({return (<DropdownMenuPrimitive.SubContentdata-slot="dropdown-menu-sub-content"- className={cn("z-50 min-w-[96px] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className )}+ className={cn("z-50 min-w-[96px] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 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 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95", className )}{...props}/>)diff --git a/client/src/components/ui/popover.tsx b/client/src/components/ui/popover.tsxindex 4e76ad69..824bd746 100644--- a/client/src/components/ui/popover.tsx+++ b/client/src/components/ui/popover.tsx@@ -30,7 +30,7 @@ function PopoverContent({align={align}sideOffset={sideOffset}className={cn(- "z-50 flex w-72 origin-(--radix-popover-content-transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",+ "z-50 flex w-72 origin-(--radix-popover-content-transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 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 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",className)}{...props}diff --git a/client/src/components/ui/select.tsx b/client/src/components/ui/select.tsxindex f09dfb48..45e2e7eb 100644--- a/client/src/components/ui/select.tsx+++ b/client/src/components/ui/select.tsx@@ -69,7 +69,7 @@ function SelectContent({<SelectPrimitive.Contentdata-slot="select-content"data-align-trigger={position === "item-aligned"}- className={cn("relative z-50 max-h-(--radix-select-content-available-height) min-w-36 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none 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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", position ==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", className )}+ className={cn("relative z-50 max-h-(--radix-select-content-available-height) min-w-36 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none 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 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95", position ==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", className )}position={position}align={align}{...props}diff --git a/client/src/components/ui/tooltip.tsx b/client/src/components/ui/tooltip.tsxindex 7413f6e3..e42c5e43 100644--- a/client/src/components/ui/tooltip.tsx+++ b/client/src/components/ui/tooltip.tsx@@ -40,7 +40,7 @@ function TooltipContent({data-slot="tooltip-content"sideOffset={sideOffset}className={cn(- "z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 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 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",+ "z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 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 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",className)}{...props}diff --git a/client/src/hooks/useAutoSkillEdges.ts b/client/src/hooks/useAutoSkillEdges.tsindex 2d4ae9ce..7dd2c357 100644--- a/client/src/hooks/useAutoSkillEdges.ts+++ b/client/src/hooks/useAutoSkillEdges.ts@@ -52,7 +52,7 @@ export function useAutoSkillEdges({setNodes,setEdges,}: UseAutoSkillEdgesProps) {- const { sendRequest, saveNodeParameters } = useWebSocket();+ const { sendRequest, saveNodeParameters, getNodeParameters } = useWebSocket();const settingsQuery = useUserSettingsQuery();const enabled = settingsQuery.data?.auto_add_skill_for_tools ?? true;@@ -72,13 +72,18 @@ export function useAutoSkillEdges({const skillEdge = edges.find(e => e.target === targetId && e.targetHandle === SKILL_HANDLE,);- const masterSkill = skillEdge && nodes.find(+ const masterSkillNode = skillEdge && nodes.find(n => n.id === skillEdge.source && n.type === MASTER_SKILL_TYPE,);- const masterSkillId = masterSkill?.id ?? null;- const masterSkillConfig = masterSkillId- ? ((masterSkill?.data as any)?.skillsConfig ?? null)+ const masterSkillId = masterSkillNode?.id ?? null;+ // node.data only stores the label (see CLAUDE.md "Node Data+ // Architecture") -- params live in the database. Fetch the+ // current skills_config so the backend can toggle the new tool's+ // skill without wiping previously enabled siblings.+ const masterParams = masterSkillId+ ? await getNodeParameters(masterSkillId): null;+ const masterSkillConfig = masterParams?.parameters?.skills_config ?? null;const result = await sendRequest<EvaluateAutoSkillResponse>('evaluate_auto_skill', {action,@@ -100,7 +105,7 @@ export function useAutoSkillEdges({saveNodeParameters,});},- [enabled, nodes, edges, sendRequest, saveNodeParameters, setNodes, setEdges],+ [enabled, nodes, edges, sendRequest, saveNodeParameters, getNodeParameters, setNodes, setEdges],);const onConnect = useCallback(diff --git a/server/services/auto_skill.py b/server/services/auto_skill.pyindex 5c405504..d3d7622e 100644--- a/server/services/auto_skill.py+++ b/server/services/auto_skill.py@@ -58,7 +58,7 @@ def _toggle_skill(skill_name: str,enabled: bool,) -> SkillsConfig:- """Return a new skillsConfig with ``skill_name`` toggled.+ """Return a new skills_config with ``skill_name`` toggled.Preserves any existing ``instructions`` / ``isCustomized`` so auser-customised skill keeps its content when toggled. New entries@@ -117,7 +117,7 @@ def evaluate("operations": [workflow_ops.set_node_parameters(master_skill_id,- {"skillsConfig": new_config},+ {"skills_config": new_config},),],}@@ -134,7 +134,7 @@ def evaluate(workflow_ops.add_node(client_ref,_MASTER_SKILL_TYPE,- {"skillsConfig": new_config},+ {"skills_config": new_config},label=_MASTER_SKILL_LABEL,position=workflow_ops.anchored(target_node_id,diff --git a/server/tests/test_auto_skill.py b/server/tests/test_auto_skill.pyindex dc2a5770..e34023b4 100644--- a/server/tests/test_auto_skill.py+++ b/server/tests/test_auto_skill.py@@ -149,7 +149,7 @@ def test_connect_with_existing_master_skill_returns_set_params():op = result["operations"][0]assert op["type"] == "set_node_parameters"assert op["node_id"] == "ms-1"- skills_config = op["parameters"]["skillsConfig"]+ skills_config = op["parameters"]["skills_config"]assert "http-request-skill" in skills_configassert skills_config["http-request-skill"]["enabled"] is Truefinally:@@ -171,7 +171,7 @@ def test_disconnect_with_existing_master_skill_disables_skill():}},)- skills_config = result["operations"][0]["parameters"]["skillsConfig"]+ skills_config = result["operations"][0]["parameters"]["skills_config"]assert skills_config["http-request-skill"]["enabled"] is Falsefinally:_exit(patches)@@ -193,7 +193,7 @@ def test_existing_skill_customisation_is_preserved_on_toggle():}},)- entry = result["operations"][0]["parameters"]["skillsConfig"]["http-request-skill"]+ entry = result["operations"][0]["parameters"]["skills_config"]["http-request-skill"]assert entry["instructions"] == "Custom user instructions"assert entry["isCustomized"] is Trueassert entry["enabled"] is False # only the enabled flag flipped@@ -216,7 +216,7 @@ def test_other_skills_in_config_are_preserved():}},)- skills_config = result["operations"][0]["parameters"]["skillsConfig"]+ skills_config = result["operations"][0]["parameters"]["skills_config"]assert "calculator-skill" in skills_configassert skills_config["calculator-skill"]["enabled"] is Trueassert skills_config["http-request-skill"]["enabled"] is True@@ -240,8 +240,8 @@ def test_connect_with_no_master_skill_spawns_one():assert add_node["type"] == "add_node"assert add_node["node_type"] == "masterSkill"assert add_node["label"] == "Master Skill"- assert "http-request-skill" in add_node["parameters"]["skillsConfig"]- assert add_node["parameters"]["skillsConfig"]["http-request-skill"]["enabled"] is True+ assert "http-request-skill" in add_node["parameters"]["skills_config"]+ assert add_node["parameters"]["skills_config"]["http-request-skill"]["enabled"] is True# Position is anchored to the agent so the frontend places it nearby.assert add_node["position"]["anchor_node_id"] == "agent-1"