Skip to content

feat: Refreshed user settings page#7455

Merged
raunakab merged 80 commits intomainfrom
user-settings-2
Jan 21, 2026
Merged

feat: Refreshed user settings page#7455
raunakab merged 80 commits intomainfrom
user-settings-2

Conversation

@raunakab
Copy link
Copy Markdown
Contributor

@raunakab raunakab commented Jan 16, 2026

Description

Addresses: https://linear.app/onyx-app/project/user-settings-1646662d4e19.

Screenshots

General:

image

Chat Preferences:

image

Accounts & Access:

image

Connectors:

image

Summary by cubic

Refreshed and consolidated user settings into a dedicated page with a cleaner UI and simpler navigation. Settings now live at /chat/settings (linked from the avatar popover), with fixed notification counts, personalization save/toggle, improved logout errors, duplicate protection for prompt shortcuts, and correct message submission when shortcuts are disabled.

  • New Features

    • Added a Settings page and route split into General, Chat Preferences, Connectors, and Accounts & Access (with gated access).
    • Enforced unique prompt shortcuts (DB + UI) and integrated ChatInputBar shortcut management with keyboard navigation and “create new”; removed the input-prompts page; public prompts stay admin-only unless auth is disabled.
    • Added a default model preference that saves in user settings and applies to new chats.
  • Refactors

    • Removed legacy sidebar Settings and UserSettings; updated AppSidebar and AdminSidebar to use UserAvatarPopover.
    • Deleted PATManagement (legacy); renamed NotificationsPopover path and updated imports.

Written for commit cad138d. Summary will update on new commits.

@raunakab raunakab requested a review from a team as a code owner January 16, 2026 04:56
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Jan 16, 2026

Greptile Summary

Refactors user settings from a modal-based approach to a dedicated full-page experience at /chat/settings.

  • Replaced the Settings modal component with a new UserAvatarPopover that navigates to a dedicated settings page
  • Created comprehensive SettingsPage.tsx with four tabs: General, Chat Preferences, Accounts & Access, and Connectors
  • Consolidated PAT management, personalization, theme settings, and connector management into the new page
  • Moved NotificationsPopover.tsx up from Settings/ subdirectory
  • Deleted Settings.tsx, UserSettings.tsx, and PATManagement.tsx as their functionality is now in the new page

Confidence Score: 3/5

  • Generally safe refactor but contains a behavioral regression in notification badge logic that should be fixed.
  • Score reflects a functional bug where the notification badge now shows for all notifications instead of just undismissed ones. The rest of the refactor is clean.
  • UserAvatarPopover.tsx requires attention - notification filtering logic changed from undismissed-only to all notifications.

Important Files Changed

Filename Overview
web/src/app/chat/settings/page.tsx New page component that serves as the entry point for the new user settings page at /chat/settings.
web/src/refresh-pages/SettingsPage.tsx New comprehensive settings page with tabs for General, Chat Preferences, Accounts & Access, and Connectors. Consolidates functionality from deleted Settings.tsx and UserSettings.tsx.
web/src/sections/sidebar/AdminSidebar.tsx Replaced Settings component with UserAvatarPopover, reflecting the new navigation approach.
web/src/sections/sidebar/AppSidebar.tsx Replaced Settings component with UserAvatarPopover, reflecting the new navigation approach.
web/src/sections/sidebar/UserAvatarPopover.tsx New popover component replacing Settings.tsx. Contains a behavioral change: notification badge now shows for ALL notifications instead of just undismissed ones.

Sequence Diagram

sequenceDiagram
    participant User
    participant Sidebar
    participant UserAvatarPopover
    participant SettingsPage
    participant API

    User->>Sidebar: Click user avatar
    Sidebar->>UserAvatarPopover: Open popover
    UserAvatarPopover->>API: Fetch notifications
    API-->>UserAvatarPopover: Return notifications
    UserAvatarPopover-->>User: Show popover menu
    
    User->>UserAvatarPopover: Click "User Settings"
    UserAvatarPopover->>SettingsPage: Navigate to /chat/settings
    SettingsPage->>API: Fetch user data, PATs, connectors
    API-->>SettingsPage: Return data
    SettingsPage-->>User: Display settings tabs
    
    User->>SettingsPage: Modify settings
    SettingsPage->>API: Save changes
    API-->>SettingsPage: Confirm save
    SettingsPage-->>User: Show success message
Loading

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

10 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3 issues found across 10 files

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="web/src/refresh-pages/SettingsPage.tsx">

<violation number="1" location="web/src/refresh-pages/SettingsPage.tsx:686">
P1: Direct mutation of state object. Instead of mutating `personalizationValues.memories` directly, the parent should expose a function to update memories (like `setMemories`) or the hook should accept the new memories as a parameter to `handleSavePersonalization`.</violation>

<violation number="2" location="web/src/refresh-pages/SettingsPage.tsx:924">
P1: Toggle state is not persisted. `toggleUseMemories` only updates local state but doesn't call `handleSavePersonalization`. The user's preference change will be lost on page refresh. Consider calling `handleSavePersonalization()` after toggling, similar to how other preference switches persist their changes.</violation>
</file>

<file name="web/src/sections/sidebar/UserAvatarPopover.tsx">

<violation number="1" location="web/src/sections/sidebar/UserAvatarPopover.tsx:63">
P2: Add error handling for promise rejection. The `logout()` call only has `.then()` but no `.catch()` to handle network errors or other failures, which could result in unhandled promise rejections.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@raunakab raunakab enabled auto-merge January 16, 2026 05:05
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 8 files (changes from recent commits).

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="web/src/refresh-pages/SettingsPage.tsx">

<violation number="1" location="web/src/refresh-pages/SettingsPage.tsx:1249">
P2: `isSubmitting` is never set to true in the manual submit handler, so the button never enters a loading/disabled state and users can trigger multiple password-change requests while one is in flight. Set `setSubmitting(true)` before awaiting the request (and reset it in a finally block) to keep the button disabled during submission.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 1 file (changes from recent commits).

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="web/tests/e2e/auth/pat_management.spec.ts">

<violation number="1" location="web/tests/e2e/auth/pat_management.spec.ts:35">
P2: This wait is no longer tied to the PAT page content; it can pass immediately because the Access Tokens tab text is already visible. Use a selector scoped to the page heading or a unique element on the PAT page so the test actually waits for navigation to finish.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

The tab is rendered as a link, not a button.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@Subash-Mohan Subash-Mohan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can’t understand much, but it looks very clean and good. One small nit: it would be better if we split the settings page into two. But I’m going to leave it to you. I’m approving the PR.

raunakab and others added 6 commits January 21, 2026 03:04
Ensures button is re-enabled even if the request fails.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The index is already constrained to >= 0 by all state setters.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@raunakab
Copy link
Copy Markdown
Contributor Author

@cubic-dev-ai, please re-review this.

@cubic-dev-ai
Copy link
Copy Markdown
Contributor

cubic-dev-ai bot commented Jan 21, 2026

@cubic-dev-ai, please re-review this.

@raunakab I have started the AI code review. It will take a few minutes to complete.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4 issues found across 26 files

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="web/src/refresh-pages/SettingsPage.tsx">

<violation number="1" location="web/src/refresh-pages/SettingsPage.tsx:229">
P2: Keep the delete confirmation modal open when deletion fails; only close it on success so users can see the error and retry without reopening.

(Based on your team's feedback about keeping modals open on error to allow popups to render.) [FEEDBACK_USED]</violation>

<violation number="2" location="web/src/refresh-pages/SettingsPage.tsx:1105">
P2: Only close the revoke-token modal on successful deletion; keep it open on error so the popup can render and the user can retry.

(Based on your team's feedback about keeping modals open on error to allow popups to render.) [FEEDBACK_USED]</violation>
</file>

<file name="web/src/app/chat/components/input/ChatInputBar.tsx">

<violation number="1" location="web/src/app/chat/components/input/ChatInputBar.tsx:386">
P2: handleKeyDown should also check the user shortcut preference; otherwise users who disabled shortcuts can no longer submit messages that start with "/" because Enter is prevented.</violation>

<violation number="2" location="web/src/app/chat/components/input/ChatInputBar.tsx:390">
P2: Use sortedFilteredPrompts for keyboard selection so the Enter action matches the highlighted prompt order shown in the UI.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

raunakab and others added 5 commits January 21, 2026 03:43
handleKeyDown was intercepting Enter key when showPrompts was true,
even if shortcuts were disabled. This prevented users with disabled
shortcuts from submitting messages starting with '/'.

Now checks shortcut_enabled preference to match Popover open condition.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add navigation to Chat Preferences tab where auto-scroll setting lives
- Fix selector to find Switch by label text instead of aria-label
- The Switch component doesn't have aria-label, so we locate the
  parent label with "Chat Auto-scroll" text and find the switch within

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Settings is no longer a modal, so Escape doesn't close it.
Click "New Session" button to navigate back to chat.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The UI renders prompts using sortedFilteredPrompts (sorted by id), but
the keyboard handler was using filteredPrompts (unsorted). This caused
a mismatch where pressing Enter would select a different prompt than
the one visually highlighted.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@raunakab raunakab added this pull request to the merge queue Jan 21, 2026
Merged via the queue into main with commit 2860136 Jan 21, 2026
77 checks passed
@raunakab raunakab deleted the user-settings-2 branch January 21, 2026 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants