Skip to content

feat: add a sidebar search control that opens the palette - #136

Merged
TheGreatAxios merged 2 commits into
mainfrom
cl-11569-sidebar-search-and-collapse
Oct 27, 2026
Merged

TheGreatAxios merged 2 commits into
mainfrom
cl-11569-sidebar-search-and-collapse

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Contributor

Summary

Adds SidebarSearch, a rail control labelled Cmd+K. A click, or Cmd+K / Ctrl+K, calls onOpen so the host can open the existing CommandPalette. The row uses SidebarItem styling and collapses to the search icon. Collapse stays a prop on Sidebar. No new context and no new dependency.

The issue says the palette is built on TanStack's key handling. That loses to the recorded decision: the listener stays in command-palette.tsx (useCommandShortcut), and this control calls it. No TanStack hotkeys package.

Import it from @corbits/react-ui/ui/sidebar-search. It is not on the root barrel, because the palette module loads the optional dialog peer.

Verification

  • bun run typecheck passed
  • bun run lint passed
  • bun run format:check passed
  • bun test src: 248 pass, 0 fail
  • bun run dep-guard passed

Release

Not published. Version stays 0.3.1. A version bump here is the release itself, so this pull request does not bump.

The corbits-triage portal pull request is waiting on an owner release of the new exact version. It was not opened.

Refs CL-11569

@linear-code

linear-code Bot commented Oct 27, 2026

Copy link
Copy Markdown

CL-11569

@TheGreatAxios

Copy link
Copy Markdown
Contributor Author

Storybook · before and after

80ea84c shares one Cmd+K listener across the host shortcut and SidebarSearch, and a disabled control no longer subscribes or shows the hint. The story renders the enabled rail, so the shots match byte for byte.

Gist: https://gist.github.com/TheGreatAxios/c5d7218fe0f123a29fce6a1bd22eaf3d

Expanded

Search and Cmd+K. Before and after are the same image.

Before, expanded

After, expanded

Collapsed

The label and the hint drop out. The search icon stays. Before and after are the same image.

Before, collapsed

After, collapsed

@TheGreatAxios
TheGreatAxios marked this pull request as ready for review October 27, 2026 06:34
@TheGreatAxios
TheGreatAxios merged commit cd8ac5e into main Oct 27, 2026
3 checks passed
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