Refine the store assistant UI and gate it behind a flag

- Gate the assistant on NEXT_PUBLIC_ENABLE_AI=1 (UI only; the /api/chat
  route still responds if called directly)
- Chat model is openai/gpt-5.6-luna-pro with reasoning requested and
  sendReasoning enabled, rendered via the Reasoning component
- Suggestion chips and reasoning come from ai-elements; attachments gain
  hover-card previews, left alignment, and render under the user message
- Launcher: plain Button when closed, magicui RainbowButton when open
- Tool results replace the collapsible Tool UI with a shimmer while
  running and a muted icon + summary line after, plus product previews
- Commerce icons in place of the folder icon for collections
- Add a thin announcement bar above the header; footer splits links and
  socials onto separate rows and clears the launcher corner
- Add the shadcn base layer so Tailwind v4's bare `border` picks up the
  theme colour instead of currentColor

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016jWbNNJLksC1QG8z8845FX
This commit is contained in:
Rami Bitar
2026-08-01 14:55:04 -04:00
co-authored by Claude Opus 5
parent 107959a4c3
commit 7c6abb4648
14 changed files with 1389 additions and 148 deletions
+28 -3
View File
@@ -41,6 +41,9 @@ interface HeaderProps {
storeName?: string;
logoUrl?: string;
links?: NavLink[];
/** Thin bar above the nav. Pass null to hide it. */
announcement?: string | null;
announcementUrl?: string;
}
const Header: React.FC<HeaderProps> = ({
@@ -50,11 +53,32 @@ const Header: React.FC<HeaderProps> = ({
{ label: 'Shop', url: '/' },
{ label: 'Collections', url: '/collections' },
],
announcement = 'Free shipping on orders over $100',
announcementUrl,
}) => {
const [menuOpen, setMenuOpen] = useState(false);
return (
<nav className="bg-background/95 backdrop-blur-md sticky top-0 z-50">
<>
{/* Sits above the sticky nav, so it scrolls away on its own. */}
{announcement && (
<div className="bg-foreground text-background">
<div className="max-w-screen-2xl mx-auto flex h-9 items-center justify-center px-8 text-center text-xs">
{announcementUrl ? (
<Link
href={announcementUrl}
className="underline-offset-2 hover:underline"
>
{announcement}
</Link>
) : (
<span>{announcement}</span>
)}
</div>
</div>
)}
<nav className="bg-background/95 backdrop-blur-md sticky top-0 z-50">
<div className="max-w-screen-2xl mx-auto px-8">
<div className="flex justify-between items-center h-14">
{/* Logo */}
@@ -126,8 +150,9 @@ const Header: React.FC<HeaderProps> = ({
</div>
)}
<CartDrawer />
</nav>
<CartDrawer />
</nav>
</>
);
};