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
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:
@@ -21,6 +21,7 @@ export interface UpdateNotebookInput {
|
||||
name?: string
|
||||
icon?: string
|
||||
color?: string
|
||||
parentId?: string | null
|
||||
}
|
||||
|
||||
export interface CreateLabelInput {
|
||||
@@ -56,6 +57,7 @@ export interface NotebooksContextValue {
|
||||
// Actions: Notebooks
|
||||
createNotebookOptimistic: (data: CreateNotebookInput) => Promise<void>
|
||||
updateNotebook: (notebookId: string, data: UpdateNotebookInput) => Promise<void>
|
||||
moveNotebookToParent: (notebookId: string, parentId: string | null) => Promise<void>
|
||||
deleteNotebook: (notebookId: string) => Promise<void>
|
||||
trashNotebook: (notebookId: string) => Promise<void>
|
||||
restoreNotebook: (notebookId: string) => Promise<void>
|
||||
@@ -204,6 +206,23 @@ export function NotebooksProvider({ children, initialNotebooks = [] }: Notebooks
|
||||
triggerRefresh()
|
||||
}, [queryClient, triggerNotebooksRefresh, triggerRefresh])
|
||||
|
||||
const moveNotebookToParent = useCallback(async (notebookId: string, parentId: string | null) => {
|
||||
const response = await fetch(`/api/notebooks/${notebookId}`, {
|
||||
method: 'PATCH',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ parentId }),
|
||||
})
|
||||
|
||||
if (!response.ok) {
|
||||
const data = await response.json().catch(() => ({}))
|
||||
throw new Error(data.error || 'Failed to move notebook')
|
||||
}
|
||||
|
||||
queryClient.invalidateQueries({ queryKey: queryKeys.notebooks() })
|
||||
triggerNotebooksRefresh()
|
||||
triggerRefresh()
|
||||
}, [queryClient, triggerNotebooksRefresh, triggerRefresh])
|
||||
|
||||
const deleteNotebook = useCallback(async (notebookId: string) => {
|
||||
const response = await fetch(`/api/notebooks/${notebookId}`, {
|
||||
method: 'DELETE',
|
||||
@@ -426,6 +445,7 @@ export function NotebooksProvider({ children, initialNotebooks = [] }: Notebooks
|
||||
getLabelColor,
|
||||
createNotebookOptimistic,
|
||||
updateNotebook,
|
||||
moveNotebookToParent,
|
||||
deleteNotebook,
|
||||
trashNotebook,
|
||||
restoreNotebook,
|
||||
@@ -454,6 +474,7 @@ export function NotebooksProvider({ children, initialNotebooks = [] }: Notebooks
|
||||
getLabelColor,
|
||||
createNotebookOptimistic,
|
||||
updateNotebook,
|
||||
moveNotebookToParent,
|
||||
deleteNotebook,
|
||||
trashNotebook,
|
||||
restoreNotebook,
|
||||
|
||||
Reference in New Issue
Block a user