fix(mobile): hide Split button + single-pane navigator chrome
v1.6 left the Workspace's Split-button row visible on mobile even when only one pane was open — ~36px of dead chrome above the chat. Wrap the entire Split-row in !isMobile so mobile gets header → chat with no intermediate strip. The existing mobile pane-navigator strip (gated to panes.length > 1) is unchanged and still appears once a second pane is created via the long-press "New chat" menu item (G3). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -125,6 +125,7 @@ export function Workspace({ sessionId, projectId }: Props) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col h-full min-h-0">
|
<div className="flex flex-col h-full min-h-0">
|
||||||
|
{!isMobile && (
|
||||||
<div className="flex items-center gap-2 border-b border-border bg-muted/20 px-3 py-1.5 shrink-0">
|
<div className="flex items-center gap-2 border-b border-border bg-muted/20 px-3 py-1.5 shrink-0">
|
||||||
<DropdownMenu>
|
<DropdownMenu>
|
||||||
<DropdownMenuTrigger asChild>
|
<DropdownMenuTrigger asChild>
|
||||||
@@ -132,7 +133,7 @@ export function Workspace({ sessionId, projectId }: Props) {
|
|||||||
type="button"
|
type="button"
|
||||||
disabled={panes.length >= MAX_PANES}
|
disabled={panes.length >= MAX_PANES}
|
||||||
className={cn(
|
className={cn(
|
||||||
'flex items-center gap-1 text-xs px-2 py-1 rounded hover:bg-muted max-md:min-h-[44px] max-md:px-3',
|
'flex items-center gap-1 text-xs px-2 py-1 rounded hover:bg-muted',
|
||||||
panes.length >= MAX_PANES && 'opacity-40 cursor-not-allowed hover:bg-transparent'
|
panes.length >= MAX_PANES && 'opacity-40 cursor-not-allowed hover:bg-transparent'
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
@@ -153,6 +154,7 @@ export function Workspace({ sessionId, projectId }: Props) {
|
|||||||
</DropdownMenuContent>
|
</DropdownMenuContent>
|
||||||
</DropdownMenu>
|
</DropdownMenu>
|
||||||
</div>
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
{isMobile && panes.length > 1 && (
|
{isMobile && panes.length > 1 && (
|
||||||
<div className="flex items-center gap-1 overflow-x-auto border-b border-border bg-muted/10 px-2 py-1 shrink-0">
|
<div className="flex items-center gap-1 overflow-x-auto border-b border-border bg-muted/10 px-2 py-1 shrink-0">
|
||||||
|
|||||||
Reference in New Issue
Block a user