You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My PR's scope is as isolated as possible, it only solves 1 specific problem
CI (LiteLLM team)
CI status guideline:
50-55 passing tests: main is stable with minor issues.
45-49 passing tests: acceptable but needs attention
<= 40 passing tests: unstable; be careful with your merges and assess the risk.
Branch creation CI run
Link:
CI run for the last commit
Link:
Merge / cherry-pick CI run
Links:
Type
🧹 Refactoring
✅ Test
Changes
Extracts community engagement buttons (Join Slack and Star us on GitHub) from the navbar into a separate CommunityEngagementButtons component. The component respects the useDisableShowPrompts hook to conditionally hide the buttons when prompts are disabled. Adds unit tests for the new component and updates navbar tests to mock the extracted component.
Refactored community engagement buttons (Join Slack and Star us on GitHub) from the navbar into a separate CommunityEngagementButtons component. The extracted component respects the existing "Hide All Prompts" user preference (disableShowPrompts hook) to conditionally hide the buttons when the user toggles this setting in their UserDropdown menu.
Key Changes
Created new component at ui/litellm-dashboard/src/components/Navbar/CommunityEngagementButtons/CommunityEngagementButtons.tsx
Added comprehensive unit tests following the project's Vitest and React Testing Library conventions
Updated navbar to use the new component, removing inline button definitions and unused icon imports
Refactored navbar tests to mock the extracted component, eliminating duplicate test coverage
Implementation Details
The refactor maintains identical functionality while improving code organization. The useDisableShowPrompts hook uses useSyncExternalStore to track the disableShowPrompts localStorage setting, ensuring reactive updates when users toggle the preference. All existing buttons maintain their external links, security attributes (target="_blank", rel="noopener noreferrer"), and styling.
Confidence Score: 5/5
This PR is safe to merge with no risk - pure refactoring with comprehensive tests
Clean component extraction with no functional changes, comprehensive test coverage following project conventions, proper mocking patterns, and all existing functionality preserved
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
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.
Relevant issues
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
tests/litellm/directory, Adding at least 1 test is a hard requirement - see detailsmake test-unitCI (LiteLLM team)
Branch creation CI run
Link:
CI run for the last commit
Link:
Merge / cherry-pick CI run
Links:
Type
🧹 Refactoring
✅ Test
Changes
Extracts community engagement buttons (Join Slack and Star us on GitHub) from the navbar into a separate
CommunityEngagementButtonscomponent. The component respects theuseDisableShowPromptshook to conditionally hide the buttons when prompts are disabled. Adds unit tests for the new component and updates navbar tests to mock the extracted component.Screenshots