Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions packages/editor/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3703,6 +3703,13 @@ const App: React.FC = () => {
agentTerminalCapability !== null &&
wideModeType === null &&
(isAgentTerminalOpen || isAgentTerminalRunning);
const canShowCollapsedSidebarTabs =
wideModeType === null &&
!sidebar.isOpen &&
!goalSetupMode;
const collapsedSidebarTabsStyle = isAgentTerminalOpen
? { left: `var(--agent-terminal-w, ${agentTerminalResize.width}px)` }
: undefined;
// Only greet in a normal authoring context — not on a read-only shared session
// (a viewer would also be able to flip the owner's gridEnabled), nor over the
// goal-setup / permission-mode flows. Deferred (not marked seen) until then.
Expand Down Expand Up @@ -3897,7 +3904,7 @@ const App: React.FC = () => {
</div>
)}
{/* Left Sidebar: collapsed tab flags (when sidebar is closed) */}
{wideModeType === null && !sidebar.isOpen && !goalSetupMode && !isAgentTerminalOpen && (
{canShowCollapsedSidebarTabs && (
<SidebarTabs
activeTab={sidebar.activeTab}
onToggleTab={toggleSidebarTab}
Expand All @@ -3912,6 +3919,7 @@ const App: React.FC = () => {
hasMessageAnnotations={activeMessageAnnotationCounts.size > 0}
hasFileAnnotations={hasFileAnnotations}
className="hidden lg:flex absolute left-0 top-0 z-20"
style={collapsedSidebarTabsStyle}
/>
)}

Expand Down Expand Up @@ -3996,7 +4004,7 @@ const App: React.FC = () => {
{/* Document Area */}
<OverlayScrollArea
element="main"
className={`flex-1 min-w-0 ${isHtmlSurface ? 'bg-background' : `${gridEnabled ? "bg-grid " : "bg-card "}${!goalSetupMode && !sidebar.isOpen && !isAgentTerminalOpen && wideModeType === null ? 'lg:pl-[30px]' : ''}`}`}
className={`flex-1 min-w-0 ${isHtmlSurface ? 'bg-background' : `${gridEnabled ? "bg-grid " : "bg-card "}${canShowCollapsedSidebarTabs ? 'lg:pl-[30px]' : ''}`}`}
data-print-region="document"
onViewportReady={handleViewportReady}
>
Expand Down
3 changes: 3 additions & 0 deletions packages/ui/components/sidebar/SidebarTabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ interface SidebarTabsProps {
hasFileAnnotations?: boolean;
hasMessageAnnotations?: boolean;
className?: string;
style?: React.CSSProperties;
}

export const SidebarTabs: React.FC<SidebarTabsProps> = ({
Expand All @@ -40,11 +41,13 @@ export const SidebarTabs: React.FC<SidebarTabsProps> = ({
hasFileAnnotations,
hasMessageAnnotations,
className,
style,
}) => {
return (
<div
data-sidebar-tabs="true"
className={`flex flex-col gap-1 pt-3 pl-0.5 flex-shrink-0 ${className ?? ""}`}
style={style}
>
{showAgentTerminalTab && onToggleAgentTerminal && (
<button
Expand Down