Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
14 changes: 12 additions & 2 deletions apps/web/src/components/ChatView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1884,7 +1884,7 @@ function ChatViewContent(props: ChatViewProps) {
panelAnimationDurationMs,
);
const rightPanelPresent = rightPanelPresence.present;
const rightPanelControlsInPanel = shouldUseRightPanelSheet && rightPanelPresent && rightPanelOpen;
const rightPanelControlsInPanel = rightPanelPresent && rightPanelOpen;
const renderedRightPanelSurface = rightPanelPresence.value?.activeSurface ?? null;
const renderedRightPanelSurfaces = rightPanelPresence.value?.surfaces ?? [];
const previewMiniPlayerVisible = shouldRenderPreviewMiniPlayer(
Expand Down Expand Up @@ -7526,6 +7526,15 @@ function ChatViewContent(props: ChatViewProps) {
<div className="pointer-events-auto flex h-full items-center">{panelToggleControls}</div>
</div>
);
const inlineRightPanelControls = (
<div className="mr-px flex h-full items-center gap-1 [-webkit-app-region:no-drag]">
<RightPanelMaximizeControl
maximized={rightPanelMaximized}
onToggle={toggleRightPanelMaximized}
/>
{panelToggleControls}
</div>
);
const rightPanelContent = activeThreadRef ? (
renderedRightPanelSurface?.kind === "preview" ? (
<Suspense fallback={null}>
Expand Down Expand Up @@ -7672,7 +7681,6 @@ function ChatViewContent(props: ChatViewProps) {

return (
<div className="relative flex min-h-0 min-w-0 flex-1 overflow-hidden bg-background">
{!rightPanelControlsInPanel ? panelLayoutControls : null}
<div
className={cn(
"flex min-h-0 min-w-0 flex-col overflow-x-hidden",
Expand All @@ -7687,6 +7695,7 @@ function ChatViewContent(props: ChatViewProps) {
reserveNativeControls={reserveTitleBarControlInset && !inlineRightPanelOwnsTitleBar}
className="relative bg-background"
>
{!rightPanelControlsInPanel ? panelLayoutControls : null}
<ChatHeader
{...(!supportsPullRequests || activeProjectRepository === null
? {}
Expand Down Expand Up @@ -8117,6 +8126,7 @@ function ChatViewContent(props: ChatViewProps) {
mode="inline"
open={rightPanelOpen}
maximized={rightPanelMaximized}
layoutControls={rightPanelOpen ? inlineRightPanelControls : null}
surfaces={renderedRightPanelSurfaces}
environmentId={activeThreadRef.environmentId}
activeSurfaceId={renderedRightPanelSurface?.id ?? null}
Expand Down
6 changes: 2 additions & 4 deletions apps/web/src/components/RightPanelTabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1002,10 +1002,7 @@ export function RightPanelTabs(props: RightPanelTabsProps) {
ref={tabListRef}
hideScrollbars
scrollFade
className={cn(
"min-w-0 flex-1 rounded-none",
ownsDesktopTitleBar && "[-webkit-app-region:no-drag]",
)}
className="min-w-0 flex-1 rounded-none"
Comment thread
macroscopeapp[bot] marked this conversation as resolved.
data-right-panel-tab-list
>
<div className="flex h-full w-max min-w-full items-center gap-1">
Expand All @@ -1031,6 +1028,7 @@ export function RightPanelTabs(props: RightPanelTabsProps) {
onContextMenu={(event) => void handleTabContextMenu(event, surface)}
className={cn(
"cursor-pointer group/tab flex h-6 max-w-36 shrink-0 items-center gap-0.5 rounded-md pr-2 pl-1.5 text-xs",
ownsDesktopTitleBar && "[-webkit-app-region:no-drag]",
active
? "bg-accent text-foreground"
: "text-muted-foreground hover:bg-accent/60 hover:text-foreground",
Expand Down
Loading