Skip to content

Feat/search in chats#366

Open
Rish-it wants to merge 4 commits intogetnao:mainfrom
Rish-it:feat/search-in-chats
Open

Feat/search in chats#366
Rish-it wants to merge 4 commits intogetnao:mainfrom
Rish-it:feat/search-in-chats

Conversation

@Rish-it
Copy link

@Rish-it Rish-it commented Feb 26, 2026

feat(ui): restructure command palette and sidebar

Summary

Overhauls the command palette and sidebar to be cleaner and more functional.
Closes #302

Command Palette

  • Separated commands into "Jump to" and "Actions" groups instead of flat filtering
  • Added "Recent" section showing the 3 most recent chats with relative timestamps
  • Search results now highlight matched text in titles and snippets
  • Replaced plain "Searching..." text with TextShimmer animation
  • Added openCommandMenu() helper for triggering from the sidebar Search button
  • Widened dialog (sm:max-w-2xl) and increased list height (max-h-[500px])
  • Updated command.tsx CSS selectors to use **:[[attr]] syntax

Sidebar

  • New Chat and Search use flat icon+text style instead of outlined buttons
  • Keyboard shortcuts only appear on hover
  • Added "Recents" label above the chat list
  • User profile dropdown with settings sub-pages (General, Memory, Project, Usage & costs) and Log Out

Visuals

Screen.Recording.2026-02-26.at.1.20.38.PM.mov

Pros

  • Cleaner, more minimal sidebar with less visual clutter
  • Command palette is now more useful with recent chats, search highlighting, and distinct action groups
  • User dropdown provides quick access to all settings pages without navigating away
  • Hover-only shortcuts reduce visual noise while remaining discoverable
  • No new dependencies — uses existing components (DropdownMenu, TextShimmer, Separator)

Cons

  • Changes are based on current UX only.
  • Command palette & sidebar layout changes may need further iteration once chat ui/ux is finalized

Test Plan

  • Command palette opens with ⌘K
  • "Jump to" section always shows New Chat
  • Recent chats appear when not searching, with relative timestamps
  • Search highlights matched text in titles and snippets
  • "Actions" section shows settings/theme commands when not searching
  • Sidebar New Chat and Search show shortcuts only on hover
  • User dropdown opens with settings links and Log Out
  • All navigation links work correctly
  • Collapsed sidebar shows only icons, dropdown still works
  • npm run lint and Prettier pass

Copilot AI review requested due to automatic review settings February 26, 2026 08:02
Copy link
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.

2 issues found across 6 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/frontend/src/components/command-menu.tsx">

<violation number="1" location="apps/frontend/src/components/command-menu.tsx:154">
P1: Bug: "No results found" empty state can never be displayed. `visibleActions` always has at least 3 items (General Settings, Project Settings, Switch Mode), so `visibleActions.length === 0` is always false. The condition should likely just check for the absence of search results without gating on action commands, e.g. `!hasSearchResults && !isPendingSearch && isSearchMode`.</violation>
</file>

<file name="apps/frontend/src/components/sidebar-user-menu.tsx">

<violation number="1" location="apps/frontend/src/components/sidebar-user-menu.tsx:86">
P2: Unhandled promise rejection: `signOut()` returns a promise that is neither awaited nor caught. If the sign-out request fails (e.g., network error), the user gets no feedback and an unhandled rejection is logged. Consider handling the error to show a toast or retry.</violation>
</file>

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

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Restructures the frontend command palette and sidebar UI to improve navigation and chat search usability, adding recents, grouped commands, and new sidebar actions.

Changes:

  • Command palette: split into “Jump to” vs “Actions”, add “Recent” chats, add search-result highlighting, and replace “Searching…” with TextShimmer.
  • Sidebar: replace outlined buttons with flat “New Chat” and “Search” items, add a “Recents” label, and add a user dropdown menu with settings sub-pages and logout.
  • Lockfiles updated (package-lock.json, cli/uv.lock), including new Python/CLI extras (e.g., Trino) and npm lockfile metadata changes.

Reviewed changes

Copilot reviewed 4 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
package-lock.json Lockfile metadata churn (e.g., devdevOptional, removed peer flags).
cli/uv.lock Adds ibis-framework trino extra and new resolved packages (trino, orjson, zstandard, etc.).
apps/frontend/src/components/ui/command.tsx Widens command dialog and increases list height; updates selector syntax.
apps/frontend/src/components/sidebar.tsx Adds flat sidebar items for New Chat/Search and adds a “Recents” label above chat list.
apps/frontend/src/components/sidebar-user-menu.tsx Replaces settings link with dropdown menu for settings sub-pages + logout.
apps/frontend/src/components/command-menu.tsx Adds open helper, recent chats section, search highlighting, shimmer loading state, and regrouped commands.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Bl3f
Copy link
Contributor

Bl3f commented Feb 26, 2026

Hello @Rish-it thank you for your contribution. The best will be to wait for the menu reorganisation I'm introducing in #364. Also as this PR is related to Search I'll not change the user dropdown in the bottom left (as it has been also touched in the #365).

@Rish-it
Copy link
Author

Rish-it commented Feb 26, 2026

@Bl3f Surething! happy to wait for the menu reorganisation. Let me know if there's anything I can pick up in the meantime!

@Bl3f Bl3f closed this Mar 2, 2026
@Bl3f
Copy link
Contributor

Bl3f commented Mar 2, 2026

Hello @Rish-it would it be possible for you to rebase with main and adapt the code so we keep the only the changes that you've done in the command menu and not what you did in the sidebar. Also I'd not put the recent chats by default in the command menu, because it makes it a bit to high.

@Bl3f Bl3f reopened this Mar 2, 2026
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.

Add search chats button

3 participants