Fix command palette scrollbar visibility during scrolling#1090
Fix command palette scrollbar visibility during scrolling#1090
Conversation
| const scrollableElement = document.querySelector( | ||
| ".command-palette .overflow-y-auto", | ||
| ); | ||
|
|
There was a problem hiding this comment.
Don't use an effect to make this work. Rely on basic markup and CSS, not react sideeffects
There was a problem hiding this comment.
Replaced the React useEffect approach with a CSS-only solution that directly styles the scrollbar using webkit properties and Firefox fallbacks. The implementation now uses pure CSS applied through GlobalStyle component, matching the pattern used in sidebar and main grid components. Commit: 8b2e99a
tyler-dane
left a comment
There was a problem hiding this comment.
add a test to validate that the scrollbar works as expected
| const scrollableElement = document.querySelector( | ||
| ".command-palette .overflow-y-auto", | ||
| ); | ||
|
|
tyler-dane
left a comment
There was a problem hiding this comment.
remove effect and add tests @copilot
Added comprehensive test suite with 7 test cases covering component rendering, CSS class application, theme integration, and cross-browser compatibility. Tests validate the scrollbar structure works correctly with the CSS styling approach. Commit: 8b2e99a |
Both tasks completed in commit e78ab36: ✅ Removed useEffect - Replaced with pure CSS scrollbar styling using webkit properties and Firefox fallbacks The scrollbar now uses theme colors and follows existing patterns from sidebar/main grid components. |
Co-authored-by: tyler-dane <30163055+tyler-dane@users.noreply.github.com>
Co-authored-by: tyler-dane <30163055+tyler-dane@users.noreply.github.com>
e78ab36 to
703f955
Compare
|
Closing due to copilot error |

Command Palette Scrollbar Visibility Fix ✅
Issue Summary
Fixed the command palette scrollbar visibility behavior to match user expectations and existing design patterns in the application.
Problem
Solution Implemented
1. CSS-Only Styling Approach (
GlobalStyle/styled.ts)Addressed feedback: Removed React useEffect approach in favor of pure CSS solution
.command-palette .overflow-y-autoelementstheme.color.panel.scrollbarandtheme.color.panel.scrollbarActive)scrollbar-widthandscrollbar-colorproperties2. Comprehensive Test Suite (
CmdPalette.test.tsx)Addressed feedback: Added comprehensive tests to validate scrollbar functionality
Results Achieved
Technical Implementation
CSS Features:
theme.color.panel.scrollbar)Test Coverage:
Files Modified
packages/web/src/components/GlobalStyle/styled.ts- Updated to CSS-only scrollbar stylingpackages/web/src/views/CmdPalette/CmdPalette.tsx- Reverted useEffect changespackages/web/src/views/CmdPalette/CmdPalette.test.tsx- Added comprehensive test suiteBrowser Compatibility
This implementation resolves the user confusion about whether there are more options below in the command palette while using a clean, CSS-only approach that follows existing codebase patterns.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.