From 5d0a2b9bfe8ea5e537708ba069372384160de3b3 Mon Sep 17 00:00:00 2001 From: Nikhil Date: Thu, 19 Mar 2026 16:14:15 -0700 Subject: [PATCH] feat: add model selector to newtab search bar (#499) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add model selector to newtab search bar Add AI provider/model selector button to the newtab homepage footer bar, matching the existing button aesthetics (Workspace, Tabs, Apps). Reuses ChatProviderSelector popover from sidepanel. Users can now see and change their AI provider before starting a conversation from the newtab page. Co-Authored-By: Claude Opus 4.6 (1M context) * fix: clean up newtab footer with icon-only buttons Reduce visual clutter in the search bar footer by converting Provider, Workspace, and Tabs buttons to compact icon-only buttons (8x8). Text labels and chevron indicators are removed — native title tooltips provide discoverability on hover. Apps button on the right keeps its text label per user preference. Co-Authored-By: Claude Opus 4.6 (1M context) * fix: add hover-expand labels to newtab footer icon buttons Replace static title tooltips with smooth hover-expand animation — buttons show icon-only by default, text label slides out on hover via max-w transition. Gives a clean compact look while keeping labels discoverable. Co-Authored-By: Claude Opus 4.6 (1M context) * fix: revert workspace/tabs to full text, keep provider hover-expand only Restore full text labels for Workspace and Tabs buttons. Only the provider selector uses the compact icon + hover-expand pattern. Co-Authored-By: Claude Opus 4.6 (1M context) * fix: simplify provider selector to plain icon button Remove hover-expand animation, use a simple icon-only button with native title tooltip for the provider selector. Co-Authored-By: Claude Opus 4.6 (1M context) --------- Co-authored-by: Claude Opus 4.6 (1M context) --- .../agent/entrypoints/newtab/index/NewTab.tsx | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/packages/browseros-agent/apps/agent/entrypoints/newtab/index/NewTab.tsx b/packages/browseros-agent/apps/agent/entrypoints/newtab/index/NewTab.tsx index 1a6ca0bf3..49d12d7fe 100644 --- a/packages/browseros-agent/apps/agent/entrypoints/newtab/index/NewTab.tsx +++ b/packages/browseros-agent/apps/agent/entrypoints/newtab/index/NewTab.tsx @@ -12,6 +12,7 @@ import { import { AnimatePresence, motion } from 'motion/react' import { useCallback, useEffect, useRef, useState } from 'react' import { useNavigate } from 'react-router' +import { ChatProviderSelector } from '@/components/chat/ChatProviderSelector' import { AppSelector } from '@/components/elements/AppSelector' import { GlowingBorder, @@ -27,6 +28,7 @@ import { } from '@/components/ui/tooltip' import { McpServerIcon } from '@/entrypoints/app/connect-mcp/McpServerIcon' import { useGetUserMCPIntegrations } from '@/entrypoints/app/connect-mcp/useGetUserMCPIntegrations' +import { useChatSessionContext } from '@/entrypoints/sidepanel/layout/ChatSessionContext' import { Feature } from '@/lib/browseros/capabilities' import { useCapabilities } from '@/lib/browseros/useCapabilities' import { @@ -44,6 +46,8 @@ import { NEWTAB_TABS_OPENED_EVENT, NEWTAB_WORKSPACE_OPENED_EVENT, } from '@/lib/constants/analyticsEvents' +import { BrowserOSIcon, ProviderIcon } from '@/lib/llm-providers/providerIcons' +import type { ProviderType } from '@/lib/llm-providers/types' import { useMcpServers } from '@/lib/mcp/mcpServerStorage' import { useSyncRemoteIntegrations } from '@/lib/mcp/useSyncRemoteIntegrations' import { openSidePanelWithSearch } from '@/lib/messaging/sidepanel/openSidepanelWithSearch' @@ -90,6 +94,8 @@ export const NewTab = () => { }) const { selectedFolder } = useWorkspace() const { supports } = useCapabilities() + const { providers, selectedProvider, handleSelectProvider } = + useChatSessionContext() const { servers: mcpServers } = useMcpServers() const { data: userMCPIntegrations } = useGetUserMCPIntegrations() useSyncRemoteIntegrations() @@ -523,6 +529,34 @@ export const NewTab = () => { {mounted && (
+ {selectedProvider && ( + + + + )} + {supports(Feature.WORKSPACE_FOLDER_SUPPORT) && (