feat: design system overhaul — sidebar, AI chats, settings, brainstorm, color cleanup
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 12s

- Sidebar: dynamic brand-accent colors, brainstorm section restyled
- AI chat general: popup panel with expand/collapse, hides when contextual AI open
- AI chat contextual: tabs reordered (Actions first), X close button, height fix
- Settings: all tabs restyled, 6 new color presets (sage, terracotta, iron, etc.)
- Global color cleanup: emerald/orange hardcoded → brand-accent dynamic
- Brainstorm page: orange → brand-accent throughout
- PageEntry animation component added to key pages
- Floating AI button: bg-brand-accent instead of hardcoded black
- i18n: all 15 locales updated with new AI/billing keys
- Billing: freemium quota tracking, BYOK, stripe subscription scaffolding
- Admin: integrated into new design
- AGENTS.md + CLAUDE.md project rules added
This commit is contained in:
Antigravity
2026-05-16 12:59:30 +00:00
parent 1fcea6ed7d
commit bd495be965
2284 changed files with 395285 additions and 2327 deletions

View File

@@ -9,6 +9,7 @@ import { normalizeThemeId, type ThemeId } from '@/lib/apply-document-theme'
export type UserSettingsData = {
theme?: ThemeId
cardSizeMode?: 'variable' | 'uniform'
accentColor?: string
}
/**
@@ -23,9 +24,10 @@ export async function updateUserSettings(settings: UserSettingsData) {
}
try {
const data: { theme?: string; cardSizeMode?: 'variable' | 'uniform' } = {}
const data: { theme?: string; cardSizeMode?: 'variable' | 'uniform'; accentColor?: string } = {}
if (settings.theme !== undefined) data.theme = normalizeThemeId(settings.theme)
if (settings.cardSizeMode !== undefined) data.cardSizeMode = settings.cardSizeMode
if (settings.accentColor !== undefined) data.accentColor = settings.accentColor
await prisma.user.update({
where: { id: session.user.id },
@@ -38,7 +40,7 @@ export async function updateUserSettings(settings: UserSettingsData) {
return { success: true }
} catch (error) {
console.error('Error updating user settings:', error)
throw new Error('Failed to update user settings')
throw new Error('Failed to update user settings: ' + (error instanceof Error ? error.message : String(error)))
}
}
@@ -47,12 +49,13 @@ const getCachedUserSettings = unstable_cache(
try {
const user = await prisma.user.findUnique({
where: { id: userId },
select: { theme: true, cardSizeMode: true },
select: { theme: true, cardSizeMode: true, accentColor: true },
})
return {
theme: normalizeThemeId(user?.theme || 'light'),
cardSizeMode: (user?.cardSizeMode || 'variable') as 'variable' | 'uniform',
accentColor: user?.accentColor || '#A47148',
}
} catch (error) {
console.error('Error getting user settings:', error)
@@ -78,6 +81,7 @@ export async function getUserSettings(userId?: string) {
return {
theme: 'light' as const satisfies ThemeId,
cardSizeMode: 'variable' as const,
accentColor: '#A47148',
}
}