@@ -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,
@@ -37,21 +39,19 @@ export const PanelLayoutControls = memo(function PanelLayoutControls({
3739 >
3840 { showTerminalControl ? (
3941 < Tooltip >
40- < TooltipTrigger
41- render = {
42- < Toggle
43- className = "shrink-0 [-webkit-app-region:no-drag]"
44- pressed = { terminalOpen }
45- onPressedChange = { onToggleTerminal }
46- aria-label = "Toggle terminal drawer"
47- variant = "ghost"
48- size = "sm"
49- disabled = { ! terminalAvailable }
50- >
51- < PanelBottomIcon className = "size-4" />
52- </ Toggle >
53- }
54- />
42+ < TooltipTrigger render = { < span className = "flex shrink-0" /> } >
43+ < Toggle
44+ className = "shrink-0 [-webkit-app-region:no-drag]"
45+ pressed = { terminalOpen }
46+ onPressedChange = { onToggleTerminal }
47+ aria-label = "Toggle terminal drawer"
48+ variant = "ghost"
49+ size = "sm"
50+ disabled = { ! terminalAvailable }
51+ >
52+ < PanelBottomIcon className = "size-4" />
53+ </ Toggle >
54+ </ TooltipTrigger >
5555 < TooltipPopup side = "bottom" >
5656 { terminalAvailable
5757 ? `Toggle terminal drawer${ terminalShortcutLabel ? ` (${ terminalShortcutLabel } )` : "" } `
@@ -60,41 +60,39 @@ export const PanelLayoutControls = memo(function PanelLayoutControls({
6060 </ Tooltip >
6161 ) : null }
6262 < 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- />
63+ < TooltipTrigger render = { < span className = "flex shrink-0" /> } >
64+ < Toggle
65+ className = "shrink-0 [-webkit-app-region:no-drag]"
66+ pressed = { rightPanelOpen }
67+ onPressedChange = { onToggleRightPanel }
68+ aria-label = {
69+ liveAgentCount > 0
70+ ? `Toggle right panel, ${ liveAgentCount } ${ liveAgentCount === 1 ? "agent" : "agents" } working`
71+ : "Toggle right panel"
72+ }
73+ variant = "ghost"
74+ size = "sm"
75+ disabled = { ! rightPanelAvailable }
76+ >
77+ < PanelRightIcon className = "size-4" />
78+ { liveAgentCount > 0 ? (
79+ < span
80+ aria-hidden
81+ 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"
82+ >
83+ { liveAgentCount }
84+ </ span >
85+ ) : null }
86+ </ Toggle >
87+ </ TooltipTrigger >
9088 < TooltipPopup side = "bottom" >
9189 { rightPanelAvailable
9290 ? `Toggle right panel${ rightPanelShortcutLabel ? ` (${ rightPanelShortcutLabel } )` : "" } ${
9391 liveAgentCount > 0
9492 ? ` · ${ liveAgentCount } ${ liveAgentCount === 1 ? "agent" : "agents" } working`
9593 : ""
9694 } `
97- : "Right panel is unavailable" }
95+ : rightPanelUnavailableLabel }
9896 </ TooltipPopup >
9997 </ Tooltip >
10098 </ div >
0 commit comments