Skip to content
Merged
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
14 changes: 10 additions & 4 deletions src/components/messaging/NewConversationModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -155,14 +155,18 @@ export default function NewConversationModal({

return (
<div
className="fixed inset-0 z-modal bg-black/50 flex items-center justify-center p-4"
className="fixed inset-0 z-modal bg-black/50 flex items-center justify-center p-0 md:p-4"
onClick={e => {
if (e.target === e.currentTarget) {
onClose();
}
}}
>
<div className="w-full max-w-md overflow-hidden rounded-md border border-subtle bg-surface-page animate-in fade-in zoom-in-95 duration-200">
{/* Full-screen below md: a centered card left the bottom search rows
sharing screen space with the fixed mobile nav / Ask Cat FAB corner
on short phones — a full-bleed sheet removes that shared corridor
entirely instead of relying on winning a z-index fight every time. */}
<div className="flex h-full w-full flex-col overflow-hidden bg-surface-page animate-in fade-in duration-200 md:h-auto md:w-full md:max-w-md md:zoom-in-95 md:rounded-md md:border md:border-subtle">
{/* Header */}
<div className="p-4 border-b border-subtle flex items-center justify-between">
<h3 className="text-lg font-semibold text-fg-primary">New Message</h3>
Expand Down Expand Up @@ -196,8 +200,10 @@ export default function NewConversationModal({
</div>
)}

{/* Results */}
<div className="max-h-[50vh] overflow-y-auto">
{/* Results — fills the remaining sheet height below md so a long
list scrolls within itself; safe-area padding keeps the last row
clear of a device's home-indicator/gesture-bar inset. */}
<div className="flex-1 overflow-y-auto pb-[env(safe-area-inset-bottom)] md:max-h-[50vh] md:flex-none md:pb-0">
{loading && !creatingId ? (
<div className="flex items-center justify-center py-12">
<Loader2 className="w-6 h-6 animate-spin text-fg-tertiary" />
Expand Down
Loading