UI Stabilization: Global color theme updates (#75B2D6), AI Assistant styling refactor, and navigation fixes

This commit is contained in:
Antigravity
2026-05-09 12:58:16 +00:00
parent 1446463f04
commit 60a3fe5453
47 changed files with 3585 additions and 2149 deletions

View File

@@ -21,6 +21,8 @@ import {
LogOut,
Shield,
GripVertical,
Users,
Bell,
} from 'lucide-react'
import { useLanguage } from '@/lib/i18n'
import { useEffect, useMemo, useRef, useState } from 'react'
@@ -60,7 +62,7 @@ function NoteLink({
animate={{ opacity: 1, x: 0 }}
onClick={onClick}
className={cn(
'w-full flex items-center gap-2 pl-12 pr-4 py-2 text-[12px] transition-colors rounded-lg',
'w-full flex items-center gap-2 pl-12 pr-4 py-2 text-[12px] transition-colors rounded-lg text-left',
isActive ? 'bg-white/50 text-foreground font-medium' : 'text-muted-foreground hover:text-foreground hover:bg-white/30'
)}
>
@@ -68,7 +70,7 @@ function NoteLink({
'w-1.5 h-1.5 rounded-full shrink-0',
isActive ? 'bg-foreground' : 'bg-transparent border border-muted-foreground/30'
)} />
<span className="truncate">{title}</span>
<span className="break-words line-clamp-2 leading-tight">{title}</span>
</motion.button>
)
}
@@ -333,7 +335,7 @@ export function Sidebar({ className, user }: { className?: string; user?: any })
<aside
className={cn(
'hidden h-full min-h-0 w-72 shrink-0 flex-col lg:w-80 md:flex',
'border-e border-border/40 bg-white/30 backdrop-blur-md sidebar-shadow dark:border-white/6 dark:bg-[#252525] dark:backdrop-blur-none',
'border-e border-border/40 bg-[#F6F4F0] backdrop-blur-md sidebar-shadow dark:border-white/6 dark:bg-[#252525] dark:backdrop-blur-none',
className
)}
>
@@ -346,11 +348,11 @@ export function Sidebar({ className, user }: { className?: string; user?: any })
className="shrink-0 rounded-full outline-none ring-offset-background transition-shadow hover:ring-2 hover:ring-primary/30 focus-visible:ring-2 focus-visible:ring-ring"
aria-label={t('sidebar.accountMenu') || 'Menu du compte'}
>
<div className="w-10 h-10 rounded-full bg-muted border border-border flex items-center justify-center text-foreground font-memento-serif text-lg shadow-sm">
<div className="w-10 h-10 rounded-full bg-[#E9ECEF] border border-black/10 flex items-center justify-center text-foreground font-memento-serif text-lg shadow-sm">
{user?.image ? (
<Avatar className="size-10 ring-1 ring-border/60">
<AvatarImage src={user.image} alt="" />
<AvatarFallback className="bg-primary/10 text-sm font-semibold text-primary">{initial}</AvatarFallback>
<AvatarFallback className="bg-[#E9ECEF] text-sm font-semibold text-[#1C1C1C]/60">{initial}</AvatarFallback>
</Avatar>
) : (
<span>{initial}</span>
@@ -485,6 +487,48 @@ export function Sidebar({ className, user }: { className?: string; user?: any })
{t('sidebar.inbox') || 'Inbox'}
</span>
</button>
{/* Partagées avec moi */}
<Link
href="/shared"
className={cn('sidebar-inbox-item', pathname === '/shared' && 'active')}
>
<div className={cn(
'w-8 h-8 rounded-full flex items-center justify-center text-sm font-medium border shrink-0',
pathname === '/shared'
? 'bg-foreground text-background border-foreground'
: 'bg-white/60 text-foreground border-border'
)}>
<Users size={14} />
</div>
<span className={cn(
'text-[13px] font-medium truncate',
pathname === '/shared' ? 'text-foreground' : 'text-muted-foreground'
)}>
{t('sidebar.sharedWithMe') || 'Partagées avec moi'}
</span>
</Link>
{/* Rappels */}
<Link
href="/reminders"
className={cn('sidebar-inbox-item', pathname === '/reminders' && 'active')}
>
<div className={cn(
'w-8 h-8 rounded-full flex items-center justify-center text-sm font-medium border shrink-0',
pathname === '/reminders'
? 'bg-foreground text-background border-foreground'
: 'bg-white/60 text-foreground border-border'
)}>
<Bell size={14} />
</div>
<span className={cn(
'text-[13px] font-medium truncate',
pathname === '/reminders' ? 'text-foreground' : 'text-muted-foreground'
)}>
{t('sidebar.reminders') || 'Rappels'}
</span>
</Link>
{/* Divider */}
<div className="mx-4 my-3 h-px bg-border/40" />
@@ -500,27 +544,37 @@ export function Sidebar({ className, user }: { className?: string; user?: any })
const notes = notebookNotes[notebook.id] || []
const isDragging = draggedId === notebook.id
return (
<div
<motion.div
key={notebook.id}
draggable
onDragStart={(e) => handleDragStart(e, notebook.id)}
onDragOver={(e) => handleDragOver(e, notebook.id)}
onDragEnd={handleDragEnd}
layout
transition={{
type: 'spring',
stiffness: 300,
damping: 30,
mass: 0.8
}}
>
<SidebarCarnetItem
carnet={{
id: notebook.id,
name: notebook.name,
initial: notebook.name.charAt(0).toUpperCase(),
}}
isActive={isActive}
notes={notes}
activeNoteId={currentNoteId}
onCarnetClick={() => handleCarnetClick(notebook.id)}
onNoteClick={handleNoteClick}
isDragging={isDragging}
/>
</div>
<div
draggable
onDragStart={(e) => handleDragStart(e, notebook.id)}
onDragOver={(e) => handleDragOver(e, notebook.id)}
onDragEnd={handleDragEnd}
>
<SidebarCarnetItem
carnet={{
id: notebook.id,
name: notebook.name,
initial: notebook.name.charAt(0).toUpperCase(),
}}
isActive={isActive}
notes={notes}
activeNoteId={currentNoteId}
onCarnetClick={() => handleCarnetClick(notebook.id)}
onNoteClick={handleNoteClick}
isDragging={isDragging}
/>
</div>
</motion.div>
)
})}
@@ -548,7 +602,6 @@ export function Sidebar({ className, user }: { className?: string; user?: any })
{[
{ id: 'agents', href: '/agents', label: t('agents.myAgents') || 'Mes Agents', icon: Bot },
{ id: 'lab', href: '/lab', label: t('nav.lab') || 'Le Lab AI', icon: FlaskConical },
{ id: 'chat', href: '/chat', label: t('nav.chat') || 'Conversations', icon: MessageSquare },
].map(item => {
const isActive = pathname.startsWith(item.href)
return (
@@ -572,17 +625,6 @@ export function Sidebar({ className, user }: { className?: string; user?: any })
</Link>
)
})}
{/* General Chat button (opens floating panel) */}
<button
onClick={() => window.dispatchEvent(new Event('toggle-ai-chat'))}
className="w-full flex items-center gap-3 px-4 py-3 rounded-xl transition-all duration-300 group text-muted-foreground hover:bg-white/40 hover:text-foreground"
>
<div className="w-8 h-8 rounded-full flex items-center justify-center border transition-colors shrink-0 bg-white/60 border-border group-hover:border-foreground/20">
<Sparkles size={16} />
</div>
<span className="text-[13px] font-medium">{t('ai.openAssistant') || 'Assistant IA'}</span>
</button>
</div>
</motion.div>
)}
@@ -593,21 +635,21 @@ export function Sidebar({ className, user }: { className?: string; user?: any })
<div className="pt-4 p-5 border-t border-border space-y-1">
<Link
href="/archive"
className="flex items-center gap-3 px-4 py-2 text-[13px] text-muted-foreground hover:text-foreground transition-colors font-medium rounded-lg hover:bg-white/30"
className="flex items-center gap-3 px-4 py-2 text-[13px] text-[#1C1C1C]/60 hover:text-[#1C1C1C] transition-colors font-medium rounded-lg hover:bg-white/30"
>
<Archive size={16} />
<span>{t('sidebar.archive') || 'Archives'}</span>
</Link>
<Link
href="/trash"
className="flex items-center gap-3 px-4 py-2 text-[13px] text-muted-foreground hover:text-foreground transition-colors font-medium rounded-lg hover:bg-white/30"
className="flex items-center gap-3 px-4 py-2 text-[13px] text-[#1C1C1C]/60 hover:text-[#1C1C1C] transition-colors font-medium rounded-lg hover:bg-white/30"
>
<Trash2 size={16} />
<span>{t('sidebar.trash') || 'Corbeille'}</span>
</Link>
<Link
href="/settings"
className="flex items-center gap-3 px-4 py-2 text-[13px] text-muted-foreground hover:text-foreground transition-colors font-medium rounded-lg hover:bg-white/30"
className="flex items-center gap-3 px-4 py-2 text-[13px] text-[#1C1C1C]/60 hover:text-[#1C1C1C] transition-colors font-medium rounded-lg hover:bg-white/30"
>
<Settings size={16} />
<span>{t('nav.settings') || 'Paramètres'}</span>