Skip to content

Commit 30666a6

Browse files
jeremyederclaude
andcommitted
fix: improve frontend mobile responsiveness
Add viewport meta tag, cap popover/dropdown widths to viewport, fix session settings modal layout on small screens, and collapse chat toolbar labels on mobile. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 005806f commit 30666a6

File tree

7 files changed

+14
-9
lines changed

7 files changed

+14
-9
lines changed

components/frontend/src/app/layout.tsx

100644100755
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ export const metadata: Metadata = {
1717
"ACP is an AI-native agentic-powered enterprise software development platform",
1818
};
1919

20+
export const viewport = {
21+
width: "device-width",
22+
initialScale: 1,
23+
};
24+
2025
// Force rebuild timestamp: 2025-11-20T16:38:00
2126

2227
export default function RootLayout({

components/frontend/src/app/projects/[name]/sessions/[sessionName]/components/session-settings-modal.tsx

100644100755
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,17 +89,17 @@ export function SessionSettingsModal({
8989
<DialogTitle>Settings</DialogTitle>
9090
</DialogHeader>
9191

92-
<div className="flex h-[540px]">
92+
<div className="flex flex-col md:flex-row h-auto md:h-[540px] max-h-[70vh]">
9393
{/* Sidebar nav */}
94-
<nav className="w-48 border-r p-2 space-y-1 flex-shrink-0">
94+
<nav className="flex md:flex-col md:w-48 border-b md:border-b-0 md:border-r p-2 gap-1 flex-shrink-0 overflow-x-auto">
9595
{tabs.map((tab) => {
9696
const Icon = tab.icon;
9797
return (
9898
<Button
9999
key={tab.id}
100100
variant="ghost"
101101
className={cn(
102-
"w-full justify-start gap-2 font-normal",
102+
"w-auto md:w-full justify-center md:justify-start gap-2 font-normal",
103103
activeTab === tab.id && "bg-accent font-medium"
104104
)}
105105
onClick={() => setActiveTab(tab.id)}

components/frontend/src/components/chat/ChatInputBox.tsx

100644100755
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,7 @@ export const ChatInputBox: React.FC<ChatInputBoxProps> = ({
619619
<PopoverTrigger asChild>
620620
<Button variant="outline" size="sm" className="h-7 gap-1.5" disabled={agents.length === 0}>
621621
<Users className="h-3.5 w-3.5" />
622-
Agents
622+
<span className="hidden sm:inline">Agents</span>
623623
{agents.length > 0 && (
624624
<Badge variant="secondary" className="ml-0.5 h-4 px-1.5 text-[10px] font-medium">
625625
{agents.length}
@@ -645,7 +645,7 @@ export const ChatInputBox: React.FC<ChatInputBoxProps> = ({
645645
<PopoverTrigger asChild>
646646
<Button variant="outline" size="sm" className="h-7 gap-1.5" disabled={commands.length === 0}>
647647
<Terminal className="h-3.5 w-3.5" />
648-
Commands
648+
<span className="hidden sm:inline">Commands</span>
649649
{commands.length > 0 && (
650650
<Badge variant="secondary" className="ml-0.5 h-4 px-1.5 text-[10px] font-medium">
651651
{commands.length}

components/frontend/src/components/create-session-dialog.tsx

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ export function CreateSessionDialog({
265265
<>
266266
<div onClick={handleTriggerClick}>{trigger}</div>
267267
<Dialog open={open} onOpenChange={handleOpenChange}>
268-
<DialogContent className="w-full max-w-3xl min-w-[650px] max-h-[85vh] overflow-y-auto">
268+
<DialogContent className="w-full max-w-3xl sm:min-w-[650px] max-h-[85vh] overflow-y-auto">
269269
<DialogHeader>
270270
<DialogTitle>Create Session</DialogTitle>
271271
</DialogHeader>

components/frontend/src/components/editable-session-name.tsx

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export function EditableSessionName({
100100
}}
101101
placeholder="New session..."
102102
disabled={isSaving}
103-
className={cn('h-auto py-1 px-2 w-auto min-w-[300px] flex-1 !text-[1em] !font-[inherit] !leading-[inherit]', className)}
103+
className={cn('h-auto py-1 px-2 w-auto min-w-[200px] sm:min-w-[300px] flex-1 !text-[1em] !font-[inherit] !leading-[inherit]', className)}
104104
/>
105105
<Button
106106
onClick={handleSave}

components/frontend/src/components/ui/dropdown-menu.tsx

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ const DropdownMenuContent = React.forwardRef<
6565
ref={ref}
6666
sideOffset={sideOffset}
6767
className={cn(
68-
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
68+
"z-50 min-w-[8rem] max-w-[calc(100vw-2rem)] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
6969
className
7070
)}
7171
{...props}

components/frontend/src/components/ui/popover.tsx

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ function PopoverContent({
3636
align={align}
3737
sideOffset={sideOffset}
3838
className={cn(
39-
"z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
39+
"z-50 w-72 max-w-[calc(100vw-2rem)] origin-(--radix-popover-content-transform-origin) rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
4040
className
4141
)}
4242
{...props}

0 commit comments

Comments
 (0)