Skip to content

feat(sidebar): replace search field + header with Search/New chat pills#135

Open
constkolesnyak wants to merge 1 commit into
ClickHouse:mainfrom
constkolesnyak:upstream/sidebar-pills
Open

feat(sidebar): replace search field + header with Search/New chat pills#135
constkolesnyak wants to merge 1 commit into
ClickHouse:mainfrom
constkolesnyak:upstream/sidebar-pills

Conversation

@constkolesnyak

Copy link
Copy Markdown
Contributor

Summary

Replaces the static "Conversations" header + always-visible search input with two rounded pills: Search sessions (left) and New chat (right). The search input mounts on hover/focus, fades in over 200ms, and unmounts again when nothing is interacting with it. Reclaims sidebar vertical space without losing functionality.

Behaviour

  • Search pill is the hover-zone trigger. On hover (or when a query is non-empty), the input mounts and fades in; on leave + empty query, it fades out and unmounts. Never lingers in the DOM when unused.
  • New chat pill sits on the right. While the search input is open, the input overlays the pill (z-20) so the create button is hidden behind the field — no visual clutter.
  • Both controls share rounded-full + subtle border styling so they read clearly as buttons.

Why pills, not a static field

The previous design committed a full row of vertical space to a permanently-visible search field even though searching is intermittent. The pill stays compact when idle and only grows when you actually reach for it. The 200ms fade is short enough not to feel laggy on a deliberate hover; the unmount-on-leave keeps the DOM small.

Subjective UI — happy to drop the redesign or rework if it doesn't fit upstream taste.

Tests

npm run build clean (✓ built in 8.45s). Web-only change, no backend touch, no new tests.

Verified by hand: hover → input appears → focus retained while typing → blur + leave → input unmounts.

Files

  • web/src/components/Chat/SessionSidebar.tsx — pills + mount/fade state (searchHovered / searchFocused / searchMounted / searchVisible) (+90 / -31)

Note

The original commit (7fa6505) was followed by three sequels (c4617fc, e058d11, 3cd0e1f) that wired the pill into the global Cmd+K shortcut and added a requestSearchFocus() store action. Those are intertwined with the keyboard-shortcuts work and are not part of this PR — they belong in #133 (or a follow-up after both this PR and #133 land).

Generated with Claude Code

- Remove 'Conversations' header label
- Convert search field into a pill button labeled 'Search sessions';
  the input mounts on hover (or focus / when a query exists) with a
  200ms fade and unmounts on leave so it never lingers in the DOM
- Add a 'New chat' pill on the right; the search input overlays it
  while open so the create button is hidden behind the field
- Both controls now share rounded-full styling with a subtle border
  to read clearly as buttons
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.

1 participant