From 4589fa2cf5afd15fb19aca96c15b5fbf885d11cf Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Fri, 3 Apr 2026 21:50:55 -0700 Subject: [PATCH] app: default app home view to new chat instead of launch (#15312) --- app/store/database.go | 4 ++-- app/store/store.go | 2 +- app/ui/app/src/hooks/useSettings.ts | 2 +- app/ui/app/src/routes/index.tsx | 3 ++- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/store/database.go b/app/store/database.go index ff5613ac..8747e959 100644 --- a/app/store/database.go +++ b/app/store/database.go @@ -82,7 +82,7 @@ func (db *database) init() error { websearch_enabled BOOLEAN NOT NULL DEFAULT 0, selected_model TEXT NOT NULL DEFAULT '', sidebar_open BOOLEAN NOT NULL DEFAULT 0, - last_home_view TEXT NOT NULL DEFAULT 'launch', + last_home_view TEXT NOT NULL DEFAULT 'chat', think_enabled BOOLEAN NOT NULL DEFAULT 0, think_level TEXT NOT NULL DEFAULT '', cloud_setting_migrated BOOLEAN NOT NULL DEFAULT 0, @@ -527,7 +527,7 @@ func (db *database) migrateV14ToV15() error { // migrateV15ToV16 adds the last_home_view column to the settings table func (db *database) migrateV15ToV16() error { - _, err := db.conn.Exec(`ALTER TABLE settings ADD COLUMN last_home_view TEXT NOT NULL DEFAULT 'launch'`) + _, err := db.conn.Exec(`ALTER TABLE settings ADD COLUMN last_home_view TEXT NOT NULL DEFAULT 'chat'`) if err != nil && !duplicateColumnError(err) { return fmt.Errorf("add last_home_view column: %w", err) } diff --git a/app/store/store.go b/app/store/store.go index 369c1db2..2fd5ce49 100644 --- a/app/store/store.go +++ b/app/store/store.go @@ -393,7 +393,7 @@ func (s *Store) Settings() (Settings, error) { } if settings.LastHomeView == "" { - settings.LastHomeView = "launch" + settings.LastHomeView = "chat" } return settings, nil diff --git a/app/ui/app/src/hooks/useSettings.ts b/app/ui/app/src/hooks/useSettings.ts index 1eebcf53..03044764 100644 --- a/app/ui/app/src/hooks/useSettings.ts +++ b/app/ui/app/src/hooks/useSettings.ts @@ -52,7 +52,7 @@ export function useSettings() { thinkLevel: settingsData?.settings?.ThinkLevel ?? "none", selectedModel: settingsData?.settings?.SelectedModel ?? "", sidebarOpen: settingsData?.settings?.SidebarOpen ?? false, - lastHomeView: settingsData?.settings?.LastHomeView ?? "launch", + lastHomeView: settingsData?.settings?.LastHomeView ?? "chat", }), [settingsData?.settings], ); diff --git a/app/ui/app/src/routes/index.tsx b/app/ui/app/src/routes/index.tsx index a4c39386..65ba4ed6 100644 --- a/app/ui/app/src/routes/index.tsx +++ b/app/ui/app/src/routes/index.tsx @@ -7,7 +7,8 @@ export const Route = createFileRoute("/")({ queryKey: ["settings"], queryFn: getSettings, }); - const chatId = settingsData?.settings?.LastHomeView === "chat" ? "new" : "launch"; + const lastHomeView = settingsData?.settings?.LastHomeView ?? "chat"; + const chatId = lastHomeView === "chat" ? "new" : "launch"; throw redirect({ to: "/c/$chatId",