mirror of
https://github.com/rennf93/roboco.git
synced 2026-08-03 07:23:24 +02:00
fix(panel,video): dead dialog triggers behind tooltips; dotted composition ids render
HelpTip nested inside a Dialog/AlertDialog trigger puts the trigger's click handler on the Tooltip root, which renders no DOM — the agents Spawn item and the KB Reindex-All / Delete-index confirms were dead. Tooltips now wrap the triggers. The video renderer accepts interior single dots in composition ids (release-0.25.0) with '..' still unrepresentable, and propose_video refuses an unrenderable id at authoring time.
This commit is contained in:
@@ -70,18 +70,28 @@ export function SpawnAgentDialog({
|
||||
setInitialPrompt("");
|
||||
};
|
||||
|
||||
// The tooltip must wrap the DialogTrigger, never sit inside it: with
|
||||
// HelpTip as DialogTrigger's asChild child, the dialog's click handler is
|
||||
// cloned onto the Tooltip root (not a DOM element) and silently dropped.
|
||||
const defaultTrigger = (
|
||||
<HelpTip label="Start this agent's container, optionally pre-claiming a task" side="left">
|
||||
<DropdownMenuItem onSelect={(e) => e.preventDefault()}>
|
||||
<Play className="h-4 w-4 mr-2" />
|
||||
Spawn
|
||||
</DropdownMenuItem>
|
||||
</HelpTip>
|
||||
<DropdownMenuItem onSelect={(e) => e.preventDefault()}>
|
||||
<Play className="h-4 w-4 mr-2" />
|
||||
Spawn
|
||||
</DropdownMenuItem>
|
||||
);
|
||||
|
||||
return (
|
||||
<Dialog open={open} onOpenChange={setOpen}>
|
||||
<DialogTrigger asChild>{trigger || defaultTrigger}</DialogTrigger>
|
||||
{trigger ? (
|
||||
<DialogTrigger asChild>{trigger}</DialogTrigger>
|
||||
) : (
|
||||
<HelpTip
|
||||
label="Start this agent's container, optionally pre-claiming a task"
|
||||
side="left"
|
||||
>
|
||||
<DialogTrigger asChild>{defaultTrigger}</DialogTrigger>
|
||||
</HelpTip>
|
||||
)}
|
||||
<DialogContent>
|
||||
<DialogHeader>
|
||||
<DialogTitle>Spawn {agentName}</DialogTitle>
|
||||
|
||||
Reference in New Issue
Block a user