@@ -12,6 +12,7 @@ interface PanelLayoutControlsProps {
1212 rightPanelAvailable : boolean ;
1313 rightPanelOpen : boolean ;
1414 rightPanelShortcutLabel : string | null ;
15+ rightPanelUnavailableLabel ?: string ;
1516 /** Running + waiting subagents in this thread; badges the right panel toggle. */
1617 liveAgentCount : number ;
1718 onToggleTerminal : ( ) => void ;
@@ -26,6 +27,7 @@ export const PanelLayoutControls = memo(function PanelLayoutControls({
2627 rightPanelAvailable,
2728 rightPanelOpen,
2829 rightPanelShortcutLabel,
30+ rightPanelUnavailableLabel = "Right panel is unavailable" ,
2931 liveAgentCount,
3032 onToggleTerminal,
3133 onToggleRightPanel,
@@ -60,41 +62,39 @@ export const PanelLayoutControls = memo(function PanelLayoutControls({
6062 </ Tooltip >
6163 ) : null }
6264 < Tooltip >
63- < TooltipTrigger
64- render = {
65- < Toggle
66- className = "shrink-0 [-webkit-app-region:no-drag]"
67- pressed = { rightPanelOpen }
68- onPressedChange = { onToggleRightPanel }
69- aria-label = {
70- liveAgentCount > 0
71- ? `Toggle right panel, ${ liveAgentCount } ${ liveAgentCount === 1 ? "agent" : "agents" } working`
72- : "Toggle right panel"
73- }
74- variant = "ghost"
75- size = "sm"
76- disabled = { ! rightPanelAvailable }
77- >
78- < PanelRightIcon className = "size-4" />
79- { liveAgentCount > 0 ? (
80- < span
81- aria-hidden
82- className = "absolute -top-1 -right-1 flex h-3.5 min-w-3.5 items-center justify-center rounded-full bg-info px-1 text-[9px] font-semibold tabular-nums text-white"
83- >
84- { liveAgentCount }
85- </ span >
86- ) : null }
87- </ Toggle >
88- }
89- />
65+ < TooltipTrigger render = { < span className = "flex shrink-0" /> } >
66+ < Toggle
67+ className = "shrink-0 [-webkit-app-region:no-drag]"
68+ pressed = { rightPanelOpen }
69+ onPressedChange = { onToggleRightPanel }
70+ aria-label = {
71+ liveAgentCount > 0
72+ ? `Toggle right panel, ${ liveAgentCount } ${ liveAgentCount === 1 ? "agent" : "agents" } working`
73+ : "Toggle right panel"
74+ }
75+ variant = "ghost"
76+ size = "sm"
77+ disabled = { ! rightPanelAvailable }
78+ >
79+ < PanelRightIcon className = "size-4" />
80+ { liveAgentCount > 0 ? (
81+ < span
82+ aria-hidden
83+ className = "absolute -top-1 -right-1 flex h-3.5 min-w-3.5 items-center justify-center rounded-full bg-info px-1 text-[9px] font-semibold tabular-nums text-white"
84+ >
85+ { liveAgentCount }
86+ </ span >
87+ ) : null }
88+ </ Toggle >
89+ </ TooltipTrigger >
9090 < TooltipPopup side = "bottom" >
9191 { rightPanelAvailable
9292 ? `Toggle right panel${ rightPanelShortcutLabel ? ` (${ rightPanelShortcutLabel } )` : "" } ${
9393 liveAgentCount > 0
9494 ? ` · ${ liveAgentCount } ${ liveAgentCount === 1 ? "agent" : "agents" } working`
9595 : ""
9696 } `
97- : "Right panel is unavailable" }
97+ : rightPanelUnavailableLabel }
9898 </ TooltipPopup >
9999 </ Tooltip >
100100 </ div >
0 commit comments