Skip to content
Merged
Show file tree
Hide file tree
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
11 changes: 9 additions & 2 deletions src/features/chat/components/SuggestionChips.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,21 @@ interface SuggestionChipsProps {

export function SuggestionChips({ options, onSelect, className }: SuggestionChipsProps) {
return (
<div className={cn('flex flex-wrap gap-2', className)}>
<div
className={cn(
'flex gap-2 overflow-x-auto pb-1 -mb-1 scrollbar-hide',
Copy link

Copilot AI Dec 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The negative margin pattern (pb-1 -mb-1) is used to hide the scrollbar space, but this approach can be fragile and may cause layout issues with parent containers. Consider using overflow-x-auto scrollbar-hide without the padding/margin trick, as the scrollbar-hide class should already handle hiding the scrollbar without requiring layout adjustments.

Suggested change
'flex gap-2 overflow-x-auto pb-1 -mb-1 scrollbar-hide',
'flex gap-2 overflow-x-auto scrollbar-hide',

Copilot uses AI. Check for mistakes.
// Wrap on desktop, scroll on mobile
'sm:flex-wrap',
Copy link

Copilot AI Dec 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The desktop wrapping behavior restores at sm breakpoint (typically 640px), but this may be too early for tablets in portrait mode. Consider using md:flex-wrap (768px) instead to ensure a better experience on tablet devices, which would benefit more from the horizontal scroll pattern.

Suggested change
'sm:flex-wrap',
'md:flex-wrap',

Copilot uses AI. Check for mistakes.
className,
)}
>
{options.map((option) => (
<button
key={option.value}
type="button"
onClick={() => onSelect(option.value, option.label)}
className={cn(
'px-3 py-1.5 text-sm rounded-full border transition-colors',
'px-3 py-1.5 text-sm rounded-full border transition-colors whitespace-nowrap shrink-0',
'bg-background hover:bg-accent/10 hover:border-accent/50',
'focus:outline-none focus:ring-2 focus:ring-accent focus:ring-offset-2',
)}
Expand Down
11 changes: 11 additions & 0 deletions src/styles/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,14 @@
}
}
}

@layer utilities {
/* Hide scrollbar while maintaining scroll functionality */
.scrollbar-hide {
-ms-overflow-style: none;
scrollbar-width: none;
}
.scrollbar-hide::-webkit-scrollbar {
display: none;
}
}
Loading