feat: consolidate to single Architectural Grid view and remove all notesViewMode logic
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m6s

This commit is contained in:
Antigravity
2026-05-10 14:05:12 +00:00
parent b31efac8ba
commit f6880bd0e1
12 changed files with 14 additions and 1801 deletions

View File

@@ -8,19 +8,11 @@ export default async function HomePage() {
getAISettings(),
])
const notesViewMode =
settings?.notesViewMode === 'masonry'
? ('masonry' as const)
: settings?.notesViewMode === 'tabs'
? ('tabs' as const)
: ('masonry' as const)
return (
<HomeClient
initialNotes={allNotes}
initialSettings={{
showRecentNotes: settings?.showRecentNotes !== false,
notesViewMode,
noteHistory: settings?.noteHistory === true,
noteHistoryMode: (settings?.noteHistoryMode ?? 'manual') as 'manual' | 'auto',
aiAssistantEnabled: settings?.paragraphRefactor !== false,

View File

@@ -14,7 +14,6 @@ export type UserAISettingsData = {
preferredLanguage?: 'auto' | 'en' | 'fr' | 'es' | 'de' | 'fa' | 'it' | 'pt' | 'ru' | 'zh' | 'ja' | 'ko' | 'ar' | 'hi' | 'nl' | 'pl'
demoMode?: boolean
showRecentNotes?: boolean
notesViewMode?: 'masonry' | 'tabs'
emailNotifications?: boolean
desktopNotifications?: boolean
anonymousAnalytics?: boolean
@@ -39,7 +38,6 @@ const USER_AI_SETTINGS_PRISMA_KEYS = [
'fontSize',
'demoMode',
'showRecentNotes',
'notesViewMode',
'emailNotifications',
'desktopNotifications',
'anonymousAnalytics',
@@ -61,13 +59,6 @@ function pickUserAISettingsForDb(input: UserAISettingsData): Partial<Record<User
out[key] = v
}
}
if (
out.notesViewMode != null &&
out.notesViewMode !== 'masonry' &&
out.notesViewMode !== 'tabs'
) {
delete out.notesViewMode
}
return out
}
@@ -148,7 +139,6 @@ const getCachedAISettings = unstable_cache(
preferredLanguage: 'auto' as const,
demoMode: false,
showRecentNotes: false,
notesViewMode: 'masonry' as const,
emailNotifications: false,
desktopNotifications: false,
anonymousAnalytics: false,
@@ -163,13 +153,6 @@ const getCachedAISettings = unstable_cache(
}
}
const raw = settings.notesViewMode
const viewMode =
raw === 'masonry'
? ('masonry' as const)
: raw === 'tabs'
? ('tabs' as const)
: ('masonry' as const)
return {
titleSuggestions: settings.titleSuggestions,
@@ -181,7 +164,6 @@ const getCachedAISettings = unstable_cache(
preferredLanguage: (settings.preferredLanguage || 'auto') as 'auto' | 'en' | 'fr' | 'es' | 'de' | 'fa' | 'it' | 'pt' | 'ru' | 'zh' | 'ja' | 'ko' | 'ar' | 'hi' | 'nl' | 'pl',
demoMode: settings.demoMode,
showRecentNotes: settings.showRecentNotes,
notesViewMode: viewMode,
emailNotifications: settings.emailNotifications,
desktopNotifications: settings.desktopNotifications,
anonymousAnalytics: settings.anonymousAnalytics,
@@ -207,7 +189,6 @@ const getCachedAISettings = unstable_cache(
preferredLanguage: 'auto' as const,
demoMode: false,
showRecentNotes: false,
notesViewMode: 'masonry' as const,
emailNotifications: false,
desktopNotifications: false,
anonymousAnalytics: false,
@@ -246,7 +227,6 @@ export async function getAISettings(userId?: string) {
preferredLanguage: 'auto' as const,
demoMode: false,
showRecentNotes: false,
notesViewMode: 'masonry' as const,
emailNotifications: false,
desktopNotifications: false,
anonymousAnalytics: false,