fix: [Bug]: Logs view keyboard navigation J/K is inverted vs UI buttons#24324
fix: [Bug]: Logs view keyboard navigation J/K is inverted vs UI buttons#24324RoyVivat wants to merge 1 commit intoBerriAI:mainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
|
Greptile SummaryThis PR fixes a keyboard navigation inversion bug (#24279) in the log details drawer: previously Changes:
Confidence Score: 5/5
|
| Filename | Overview |
|---|---|
| ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/useKeyboardNavigation.ts | Swaps selectNextLog/selectPreviousLog between J and K key cases, and corrects the JSDoc comments accordingly — a clean, minimal inversion fix. |
| ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/useKeyboardNavigation.test.ts | New test file covering J/K navigation (both cases), boundary conditions, Escape, and closed-drawer behavior — all assertions align with the corrected logic. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[keydown event fired] --> B{isUserTyping?}
B -- Yes --> Z[Ignore]
B -- No --> C{isOpen?}
C -- No --> Z
C -- Yes --> D{e.key}
D -- Escape --> E[onClose]
D -- j / J --> F[selectNextLog\ncurrentIndex + 1]
D -- k / K --> G[selectPreviousLog\ncurrentIndex - 1]
F --> H{at last item?}
H -- Yes --> Z
H -- No --> I[onSelectLog allLogs currentIndex+1]
G --> J{at first item?}
J -- Yes --> Z
J -- No --> K[onSelectLog allLogs currentIndex-1]
Last reviewed commit: "fix: address issue #..."
fix: address issue #24279
Relevant issues
Fixes #24279
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
tests/test_litellm/directory, Adding at least 1 test is a hard requirementmake test-unit@greptileaiand received a Confidence Score of at least 4/5Delays in PR merge?
If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review).
CI (LiteLLM team)
Type