litellm - ✅(Solved) Fix [Bug]: Logs view keyboard navigation J/K is inverted vs UI buttons [2 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
BerriAI/litellm#24279Fetched 2026-04-08 01:08:54
View on GitHub
Comments
0
Participants
1
Timeline
13
Reactions
0
Author
Participants
Timeline (top)
referenced ×7cross-referenced ×4labeled ×2

Fix Action

Fixed

PR fix notes

PR #24285: fix(ui): swap J/K keyboard navigation in log details drawer (#24279)

Description (problem / solution / changelog)

Fixes #24279

Problem

In the Logs view side panel, keyboard J/K navigation was inverted compared to the UI buttons and vim conventions:

  • J was calling selectPreviousLog() (up)
  • K was calling selectNextLog() (down)

Fix

Swap the function calls:

  • J → selectNextLog() (down, matching vim j)
  • K → selectPreviousLog() (up, matching vim k)

Also updated the JSDoc comment to match.

  • Sign the Contributor License Agreement (CLA)
  • Keep scope isolated

Changed files

  • litellm/litellm_core_utils/get_llm_provider_logic.py (modified, +8/-5)
  • tests/local_testing/test_get_llm_provider.py (modified, +16/-0)
  • ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/useKeyboardNavigation.ts (modified, +4/-4)

PR #24286: fix(ui): swap J/K keyboard navigation in log details drawer (#24279)

Description (problem / solution / changelog)

Fixes #24279

J should navigate down (next) and K should navigate up (previous), matching vim/standard conventions. They were inverted.

Only 1 file changed: useKeyboardNavigation.ts (4 lines swapped).

  • Sign the Contributor License Agreement (CLA)
  • Keep scope isolated

Changed files

  • ui/litellm-dashboard/src/components/view_logs/LogDetailsDrawer/useKeyboardNavigation.ts (modified, +4/-4)
RAW_BUFFERClick to expand / collapse

Check for existing issues

  • I have searched the existing issues and checked that my issue is not a duplicate.

What happened?

In the Logs view side panel, keyboard navigation (J/K) is inverted compared to the UI buttons.

Steps to Reproduce

  1. Open the Logs page (logs are ordered from newest to oldest by default). Click a log entry to open the side panel.
  2. Using UI buttons:
    • Clicking the K button moves the selection up (newer).
    • Clicking the J button moves the selection down (older).
  3. Using the keyboard:
    • Pressing K moves the selection down (older).
    • Pressing J moves the selection up (newer).

Relevant log output

What part of LiteLLM is this about?

UI Dashboard

What LiteLLM version are you on ?

v1.82.3

Twitter / LinkedIn details

No response

extent analysis

Fix Plan

To fix the inverted keyboard navigation in the Logs view side panel, we need to update the key bindings.

Step-by-Step Solution

  • Identify the JavaScript file responsible for handling keyboard events in the Logs view side panel.
  • Locate the key binding functions for J and K keys.
  • Swap the logic for J and K keys to match the UI button behavior.

Example Code

// Before
document.addEventListener('keydown', (e) => {
  if (e.key === 'j') {
    // Move selection down (older)
    selectNextLogEntry();
  } else if (e.key === 'k') {
    // Move selection up (newer)
    selectPreviousLogEntry();
  }
});

// After
document.addEventListener('keydown', (e) => {
  if (e.key === 'j') {
    // Move selection up (newer)
    selectPreviousLogEntry();
  } else if (e.key === 'k') {
    // Move selection down (older)
    selectNextLogEntry();
  }
});

Verification

  • Open the Logs page and click a log entry to open the side panel.
  • Press J and verify that the selection moves up (newer).
  • Press K and verify that the selection moves down (older).

Extra Tips

  • Make sure to test the fix in different browsers and environments to ensure consistency.
  • Consider adding a comment to the code to explain the purpose of the key bindings and the fix.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING