fix: revert: convert settings to popup dialog (#477) - #498
Conversation
This reverts commit 42aa0ff.
Greptile SummaryThis PR reverts the settings popup dialog (#477) and restores settings to a dedicated full-page experience with its own sidebar layout ( Key changes:
Confidence Score: 3/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["User clicks Settings in main sidebar"] --> B["NavLink to /settings/ai"]
B --> C["SettingsSidebarLayout"]
C --> D["SettingsSidebar"]
C --> E["Outlet - content area"]
D --> F["AISettingsPage"]
D --> G["LlmHubPage"]
D --> H["SearchProviderPage"]
D --> I["MCPSettingsPage"]
D --> J["CustomizationPage"]
D --> K["WorkflowsPageWrapper"]
DELETED_Dialog -.->|"was dialog overlay"| DELETED_Hook
DELETED_Dialog["DELETED: SettingsDialog"]
DELETED_Hook["DELETED: useOpenSettings"]
Prompt To Fix All With AIThis is a comment left during a code review.
Path: packages/browseros-agent/apps/agent/entrypoints/app/layout/SidebarLayout.tsx
Line: 28-30
Comment:
**Wrong analytics event tracked for non-settings pages**
`SETTINGS_PAGE_VIEWED_EVENT` is being tracked on every navigation within `SidebarLayout`, which is the **main app layout** serving routes like `/home`, `/scheduled`, `/skills`, etc. This will flood analytics with false settings page-view events for all regular page navigations.
The `SettingsSidebarLayout` already correctly tracks this event for settings pages. This tracking in `SidebarLayout` should be removed entirely — it appears to be a copy-paste error from `SettingsSidebarLayout`.
```suggestion
useEffect(() => {
setMobileOpen(false)
}, [])
```
How can I resolve this? If you propose a fix, please make it concise.
---
This is a comment left during a code review.
Path: packages/browseros-agent/apps/agent/entrypoints/app/layout/SettingsSidebarLayout.tsx
Line: 22-24
Comment:
**Mobile sidebar doesn't close on settings navigation**
The `useEffect` here runs only once on mount (empty dependency array), so the mobile `Sheet` sidebar will remain open after the user taps a settings nav link. The dependency should include `location.pathname` so it closes whenever the route changes — matching the expected UX of a slide-out nav sheet.
```suggestion
useEffect(() => {
setMobileOpen(false)
}, [location.pathname])
```
How can I resolve this? If you propose a fix, please make it concise.
---
This is a comment left during a code review.
Path: packages/browseros-agent/apps/agent/components/sidebar/SidebarNavigation.tsx
Line: 79-82
Comment:
**Hardcoded path string for active-state detection**
The active-state logic special-cases the literal string `'/settings/ai'` to match any `/settings/*` route. This is fragile — if the Settings nav item's `to` value ever changes (e.g. to `/settings/chat`), the highlight would break silently. Consider comparing against a prefix or using a dedicated `activePrefix` field on the `NavItem` type instead.
```suggestion
const isActive = item.to.startsWith('/settings')
? location.pathname.startsWith('/settings')
: location.pathname === item.to
```
How can I resolve this? If you propose a fix, please make it concise.Last reviewed commit: "Revert "feat: conver..." |
Review Feedback ResponsesSettingsSidebarLayout.tsx:22-24 — Mobile sidebar doesn't close on navigation SidebarNavigation.tsx:79-82 — Hardcoded path string for active-state detection |
- 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>
This reverts commit 42aa0ff.