feat: convert settings to popup dialog - #477
Conversation
Replace the dedicated settings page layout (SettingsSidebarLayout) with a modal dialog (SettingsDialog) that opens on top of the current page. Settings are now accessible via a dialog triggered from the main sidebar, eliminating the confusing dual-sidebar navigation pattern. - Create SettingsDialog with tabbed left panel and content area - Move Workflows into main sidebar navigation (feature-gated) - Remove /settings/* routes (except /settings/survey) - Delete SettingsSidebarLayout and SettingsSidebar components - Update backward compatibility redirects Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Greptile SummaryThis PR replaces the dedicated settings page (with its own sidebar layout) with a modal dialog that overlays the current page, using React Router's background-location pattern. Settings tabs (AI, Chat, Search, Customization, MCP) are reused as-is inside the new Key observations:
Confidence Score: 3/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant Sidebar as SidebarNavigation
participant Hook as useOpenSettings
participant Router as HashRouter / AppRoutes
participant BG as Background Routes (SidebarLayout)
participant Dialog as SettingsDialog (modal overlay)
User->>Sidebar: Click Settings button
Sidebar->>Hook: openSettings('ai')
Hook->>Router: navigate('/settings/ai', state={backgroundLocation: /home})
Router->>Router: backgroundLocation = /home
Router->>BG: <Routes location=/home> → renders SidebarLayout + current page
Router->>Dialog: <Routes> (modal overlay) → renders SettingsDialog
User->>Dialog: Switch tab (e.g. chat)
Dialog->>Router: navigate('/settings/chat', state={backgroundLocation: /home}, replace)
Router->>Dialog: re-renders with activeTab='chat'
User->>Dialog: Click Close (or Esc)
Dialog->>Router: navigate('/home', replace)
Router->>BG: <Routes location=/home> → SidebarLayout + home page
Note over Dialog: Dialog unmounts (no backgroundLocation in state)
Note over Router: Direct deep-link /settings/ai (no backgroundLocation)
Router->>Router: SettingsRedirect → navigate('/settings/ai', state={backgroundLocation: /home})
Router->>Dialog: Dialog rendered with background /home
|
Improvement Plan: Modal Routes for Settings DialogI'm making changes to this PR and will improve the settings dialog to use React Router's modal route pattern. Here's the plan: What stays from this PR
What changes1. Settings URLs become real routes 2. No more prop drilling 3. Back button support 4. Form state preserved on tab switch 5. Fix help item navigation 6. const openSettings = useOpenSettings()
openSettings('mcp') |
This reverts commit 42aa0ff.
* Revert "feat: convert settings to popup dialog (#477)" This reverts commit 42aa0ff. * fix: address review feedback for PR #498 - Remove erroneous SETTINGS_PAGE_VIEWED_EVENT tracking from SidebarLayout (was firing on every non-settings page navigation) - Fix mobile settings sidebar not closing on route change by merging setMobileOpen(false) into the pathname-dependent analytics useEffect Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
Design
Settings are now rendered in a large dialog (
SettingsDialog) with a left-side tab list and a right-side content area. The dialog is triggered from the Settings button in the main sidebar (instead of navigating to/settings/*). TheSettingsSidebarLayoutandSettingsSidebarcomponents are deleted and replaced by the dialog's internal tab navigation. The/settings/surveyroute is preserved as a standalone route. Backward compatibility redirects for old settings URLs now point to/home.Changes
settings-dialog/SettingsDialog.tsx— new tabbed settings dialogSidebarLayout.tsx— manages dialog open/close stateAppSidebar.tsx— passesonOpenSettingscallbackSidebarNavigation.tsx— Settings is now a button; Workflows added to navApp.tsx— removed settings routes, updated redirectsSettingsSidebarLayout.tsx,SettingsSidebar.tsxTest plan
/settings/surveydirectly → still works as standalone page/settings/aiURL → redirects to/home🤖 Generated with Claude Code