Redesign Shell sidebar collapse, refactor Composer, and add Portal primitive#265
Merged
ankit-thesys merged 22 commits intothesysdev:mainfrom Mar 20, 2026
Conversation
…imitive - Sidebar collapse: reduce width to 52px, remove background/full border, add smooth logo transition (36px to 28px), new toggle icons - NewChatButton: render as IconButton when sidebar is collapsed - SidebarHeader: accept children prop for flexible layout - Composer: extract into components/ for Shell, CopilotShell, and BottomTray; add attachment prop, action-bar layout, scrollbar styling, isLoadingMessages guard - DesktopWelcomeComposer: same attachment support and layout improvements - ThreadHeader: new component for desktop-only header actions - Portal: new component wrapping @radix-ui/react-portal - Update all Storybook stories with new patterns Made-with: Cursor
|
@ankit-thesys is attempting to deploy a commit to the thesys-devs Team on Vercel. A member of the Team first needs to authorize it. |
…to feature/shell-sidebar-composer-redesign
…to feature/shell-sidebar-composer-redesign
…hub.com/ankit-thesys/openui-comp into feature/shell-sidebar-composer-redesign
…to feature/shell-sidebar-composer-redesign
- Add `threadHeader` (desktop) and `mobileHeaderActions` props to FullScreen - Add `headerActions` prop to Copilot and BottomTray layouts - Fix composer textarea collapsing to 0px height in all layouts (use height: 0px instead of auto for scrollHeight measurement) - Add Storybook stories demonstrating header customization - Update MDX docs with header customization section and props tables Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
abhithesys
approved these changes
Mar 20, 2026
| @@ -0,0 +1,8 @@ | |||
| import { Portal as RadixPortal } from "@radix-ui/react-portal"; | |||
Contributor
Author
There was a problem hiding this comment.
removed the portal component
…to feature/shell-sidebar-composer-redesign
…hub.com/ankit-thesys/openui-comp into feature/shell-sidebar-composer-redesign
…to feature/shell-sidebar-composer-redesign
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR implements a comprehensive redesign of the Shell component's sidebar collapse behavior, refactors the Composer into a shared component across all shell variants, and introduces a new Portal primitive.
Sidebar Collapse Redesign
SidebarHeadernow acceptschildrenprop, allowingNewChatButtonto be placed inside the header for persistent visibilityNewChatButtonrenders as a compactIconButton(SquarePen) when sidebar is collapsedComposer Refactor
ComposerfromThread.tsxinto dedicatedcomponents/Composer.tsxfor Shell, CopilotShell, and BottomTrayisLoadingMessagesguard to prevent submission while messages are loadingComposer textarea height fix
useLayoutEffectsetheight: "auto"which collapsed the textarea inside flex containers withoverflow: clip, causingscrollHeightto read 0height: "0px"instead of"auto"andMath.max(scrollHeight, 24)for a minimum one-line heightDesktopWelcomeComposer Updates
aria-labelfor accessibilityNew Components
@radix-ui/react-portalfor rendering content outside the DOM hierarchyHeader Customization Props
threadHeader(desktop-only header content) andmobileHeaderActions(mobile header right-side content) propsheaderActionsprop for custom content in the header right sideheaderActionsprop for custom content in the header (before built-in thread list/new chat/minimize buttons)ReactNodetype for maximum flexibilitywithChatProviderHOC via the existing generic parameter patternStorybook and Documentation
NewChatButtoninSidebarHeader,ThreadHeaderwith Share button,MobileHeaderwithrightChildrenStandaloneWithThreadHeaderstory demonstrating model selector + action buttonsWithThreadHeaderstory in Shell storiesCopilotWithHeaderActionsandBottomTrayWithHeaderActionsstoriesOpenUIChat.mdxwith new "Header Customization" section and props tables for all layoutsShell.mdxwithThreadHeaderandMobileHeader.rightChildrendocumentationTest plan
NewChatButtonrenders as icon when collapsed, full button when expandedthreadHeaderprop renders custom content in FullScreen desktop headermobileHeaderActionsrenders in FullScreen mobile headerheaderActionsrenders in Copilot and BottomTray headerspnpm buildinpackages/react-ui(verified passing)pnpm lint:checkinpackages/react-ui(verified: 0 errors, only pre-existing warnings)