Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): keep model picker shortcuts in sync #5400

Mergedt3dotgg(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/5400/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub

The model picker could keep a model’s positional shortcut from Favorites after switching to a provider-specific menu. The displayed hint then disagreed with the current menu and could duplicate another shortcut.

The virtualized list now redraws rows when either favorite state or the current menu’s shortcut labels change, keeping the visible hints aligned with keyboard selection.

Tests: web typecheck; targeted format and lint; 45 focused model-ordering and keybinding tests.

Made by GPT-5.6 Sol via the Codex harness in T3 Code.


Note

Low Risk Small UI-only change to virtualized list invalidation in the model picker; no auth, data, or API impact.

Overview Fixes stale positional shortcut hints in the model picker when switching between Favorites and a provider-specific sidebar view.

The virtualized LegendList only passed favoritesSet as extraData, so recycled rows did not redraw when menu-specific jump labels (modelJumpLabelByKey) changed. extraData is now a memoized { favoritesSet, modelJumpLabelByKey } object so list rows refresh when either favorites or the current menu’s shortcut mapping updates.

Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 29be19519413512e690b22d0a597a416516e5f8f. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).

Note

Fix model picker shortcuts staying in sync with LegendList renders

The LegendList in ModelPickerContent.tsx previously only received favoritesSet as extraData, so shortcut labels (modelJumpLabelByKey) were not triggering re-renders when updated. Both values are now bundled into a memoized modelListExtraData object passed as extraData, keeping shortcut labels in sync with list item rendering.

Macroscope summarized 29be195.
    1. Important

      Review skipped

      Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

      ⚙️ Run configuration

      Configuration used: Repository UI

      Review profile: CHILL

      Plan: Pro Plus

      Run ID: 49065b71-c81d-4741-b320-de8fb759043c

      You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

      Use the checkbox below for a quick retry:

      • 🔍 Trigger review

      Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

      ❤️ Share
      Comment `@coderabbitai help` to get the list of available commands.
    2. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted

    3. Approvability

      Verdict: Approved 29be195

      Simple bug fix that adds modelJumpLabelByKey to the list's extraData prop so the component properly re-renders when keyboard shortcuts change. Small scope, proper memoization, and clear intent.

      You can customize Macroscope's approvability policy. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).

Sign in to join this conversation.