diff --git a/app/layout.tsx b/app/layout.tsx index b9ea46ea..52caca68 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -2,6 +2,7 @@ import type { Metadata, Viewport } from 'next' import { Inter as FontSans, Poppins } from 'next/font/google' import './globals.css' import 'katex/dist/katex.min.css'; +import 'glassmorphic/glassmorphic.css'; import { cn } from '@/lib/utils' import { ThemeProvider } from '@/components/theme-provider' import Header from '@/components/header' diff --git a/components/calendar-notepad.tsx b/components/calendar-notepad.tsx index 41decd98..cab74b0e 100644 --- a/components/calendar-notepad.tsx +++ b/components/calendar-notepad.tsx @@ -92,7 +92,7 @@ export function CalendarNotepad({ chatId }: CalendarNotepadProps) { }; return ( -
+
diff --git a/components/empty-screen.tsx b/components/empty-screen.tsx index 2c0f63e4..716f49e8 100644 --- a/components/empty-screen.tsx +++ b/components/empty-screen.tsx @@ -34,21 +34,21 @@ export function EmptyScreen({ return (
-
+
{exampleMessages.map((item) => { const Icon = item.icon; return ( ); })} diff --git a/components/search-results-image.tsx b/components/search-results-image.tsx index 50229d01..8cd58d63 100644 --- a/components/search-results-image.tsx +++ b/components/search-results-image.tsx @@ -21,7 +21,6 @@ import { import { useEffect, useState } from 'react' import { PlusCircle } from 'lucide-react' import { motion } from 'framer-motion' -import 'glassmorphic/glassmorphic.css' interface SearchResultsImageSectionProps { images: string[] @@ -98,7 +97,9 @@ export const SearchResultsImageSection: React.FC< Search Images - {query} + + {query} +
Search Videos - + {results.searchParameters.q} diff --git a/tests/responsive.spec.ts b/tests/responsive.spec.ts index a53fcd6e..ed97626a 100644 --- a/tests/responsive.spec.ts +++ b/tests/responsive.spec.ts @@ -222,6 +222,43 @@ test.describe('Responsive design - Small Mobile', () => { expect(messageBox.width).toBeLessThanOrEqual(320); } }); + + test('should not overflow with long attached file name', async ({ page }) => { + const attachmentButton = page.locator('[data-testid="mobile-attachment-button"]'); + if (await attachmentButton.isVisible()) { + await page.locator('input[type="file"]').setInputFiles({ + name: 'this-is-a-very-long-filename-that-should-not-overflow-the-container-on-small-screens.pdf', + mimeType: 'application/pdf', + buffer: Buffer.from('test') + }); + + const fileContainer = page.locator('[data-testid="clear-attachment-button"]').locator('..'); + if (await fileContainer.isVisible()) { + const containerBox = await fileContainer.boundingBox(); + expect(containerBox).toBeTruthy(); + if (containerBox) { + expect(containerBox.width).toBeLessThanOrEqual(320); + } + + const bodyWidth = await page.evaluate(() => document.body.scrollWidth); + expect(bodyWidth).toBeLessThanOrEqual(321); + } + } + }); + + test('should not cause horizontal scroll with long query in search dialog', async ({ page }) => { + const dialogDesc = page.locator('[role="dialog"] p.line-clamp-2'); + if (await dialogDesc.isVisible()) { + const descBox = await dialogDesc.boundingBox(); + expect(descBox).toBeTruthy(); + if (descBox) { + expect(descBox.width).toBeLessThanOrEqual(320); + } + + const bodyWidth = await page.evaluate(() => document.body.scrollWidth); + expect(bodyWidth).toBeLessThanOrEqual(321); + } + }); }); test.describe('Responsive design - Large Desktop', () => {