feat: standardize UI theme, fix dark mode consistency, and implement editorial tags
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 1m24s

This commit is contained in:
Antigravity
2026-05-10 18:43:13 +00:00
parent f6880bd0e1
commit 330c0c61b6
25 changed files with 640 additions and 503 deletions

View File

@@ -31,12 +31,12 @@ export default async function MainLayout({
return (
<ProvidersWrapper initialLanguage={initialLanguage} initialTranslations={initialTranslations}>
{/* No top-bar header — sidebar-only navigation (architectural-grid design) */}
<div className="flex h-screen overflow-hidden bg-memento-desk">
<div className="flex h-screen overflow-hidden bg-memento-desk dark:bg-background">
<Suspense fallback={<div className="hidden w-80 shrink-0 md:block" />}>
<Sidebar user={session?.user} />
</Suspense>
<main className="flex min-h-0 flex-1 flex-col overflow-y-auto scroll-smooth bg-memento-paper">
<main className="flex min-h-0 flex-1 flex-col overflow-y-auto scroll-smooth bg-memento-paper dark:bg-background">
{children}
</main>

View File

@@ -932,6 +932,11 @@ export async function updateNote(id: string, data: {
}
}
if (data.labels !== undefined) {
const refreshed = await prisma.note.findUnique({ where: { id } })
if (refreshed) return parseNote(refreshed)
}
return parseNote(note)
} catch (error) {
console.error('Error updating note:', error)

View File

@@ -263,13 +263,21 @@ Content: ${noteContext.content || '(empty)'}
Focus ONLY on this note unless asked otherwise.`
}
const systemPrompt = `${prompts.system}\n${copilotContext}\n\n${contextBlock}\n\n## LANGUAGE RULE (MANDATORY)\nYou MUST respond in ${lang === 'en' ? 'English' : lang === 'fr' ? 'French' : lang === 'fa' ? 'Persian (Farsi)' : lang === 'es' ? 'Spanish' : 'English'}.`
// Notebook scope directive — tells the AI to stay within the selected notebook
let notebookScopeDirective = ''
if (notebookId) {
const scopedNotebook = await prisma.notebook.findUnique({ where: { id: notebookId }, select: { name: true } }).catch(() => null)
const notebookName = scopedNotebook?.name || notebookId
notebookScopeDirective = `\n\n## NOTEBOOK SCOPE\nThe user has scoped this conversation to the notebook "${notebookName}". When using the note_search tool, ALWAYS pass notebookId="${notebookId}" to restrict results to this notebook. Only reference notes from this notebook unless the user explicitly asks otherwise.`
}
const systemPrompt = `${prompts.system}\n${copilotContext}${notebookScopeDirective}\n\n${contextBlock}\n\n## LANGUAGE RULE (MANDATORY)\nYou MUST respond in ${lang === 'en' ? 'English' : lang === 'fr' ? 'French' : lang === 'fa' ? 'Persian (Farsi)' : lang === 'es' ? 'Spanish' : 'English'}.`
// 6. Execute stream
const sysConfig = await getSystemConfig()
const chatTools = noteContext
? toolRegistry.buildToolsForChat({ userId, config: sysConfig, webSearch, webOnly: true })
: toolRegistry.buildToolsForChat({ userId, config: sysConfig, webSearch })
: toolRegistry.buildToolsForChat({ userId, config: sysConfig, webSearch, notebookId: notebookId || undefined })
const provider = getChatProvider(sysConfig)
const result = await streamText({

View File

@@ -25,10 +25,10 @@
--color-background-dark: #202020;
/* Design tokens from architectural-grid 10 */
--color-ink: #1C1C1C;
--color-paper: #F2F0E9;
--color-muted-ink: rgba(28, 28, 28, 0.6);
--color-concrete: #8D8D8D;
--color-ink: var(--ink);
--color-paper: var(--paper);
--color-muted-ink: var(--muted-ink);
--color-concrete: var(--concrete);
--color-blueprint: #75B2D6;
--color-ochre: #D4A373;
--color-sage: #A3B18A;
@@ -183,6 +183,7 @@ html:not(.dark) .memento-active-nav {
--ink: var(--foreground);
--paper: var(--background);
--muted-ink: var(--muted-foreground);
--concrete: #8D8D8D;
--ai-accent: #ACB995;
}
@@ -424,6 +425,8 @@ html.dark {
--sidebar-accent-foreground: #1C1C1C;
--sidebar-border: rgba(28, 28, 28, 0.1);
--sidebar-ring: rgba(28, 28, 28, 0.35);
--thumb-lightness-1: 94%;
--thumb-lightness-2: 87%;
}
[data-theme='light'].dark {
@@ -487,6 +490,9 @@ html.dark {
--sidebar-accent-foreground: #ffffff;
--sidebar-border: #3d3d3d;
--sidebar-ring: #a8a29e;
--thumb-lightness-1: 15%;
--thumb-lightness-2: 10%;
--concrete: #A0A0A0;
}
[data-theme='midnight'] {