Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): keep highlighted command menu items clear of the scroll fade #7132

MergedPollyGlot(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/7132/headmerged by maria-rcks View on GitHub

Summary

Keyboard-navigating the composer command menu (slash commands, skills, @-paths) scrolls the active item flush against the viewport edge, where the 24px scroll fade dims it and the 20px container radius clips its corners. The scroll-py-2 on the list never worked: the scroll container is the ScrollArea viewport, not the list element, so scrollIntoView({ block: "nearest" }) had no scroll padding to respect.

The fix is two class changes:

  • ScrollArea viewports with scrollFade now carry scroll-p-[var(--fade-size)], so anything scrolled into view programmatically stays clear of the fade on all four edges. This benefits every faded scroll area, not just the composer menu.
  • The composer command list gets not-empty:py-3 so the first/last item (where the fade turns off but the scroll can't go further) clears the 20px rounded corner instead of getting clipped by it.

Before / after

Active item scrolled mid-list (before: dimmed by the fade and flush against the edge; after: fully readable above the fade):

BeforeAfter
before midafter mid

Very last item highlighted (before: flush against the rounded corner; after: breathing room, corners intact):

BeforeAfter
before lastafter last

(Screenshots hosted on a throwaway assets/skills-list-clipping branch of my fork.)

Test plan

  • Reproduced and verified in a real dev environment (Playwright against vp run dev, keyboard navigation through an overflowing list, both directions and both wrap extremes)
  • vp test run on composerSlashCommandSearch.test.ts and composerMenuHighlight.test.ts
  • Targeted lint and tsgo --noEmit on apps/web

Built with Claude Fable 5 on Claude Code.


Note

Low Risk CSS-only scroll-padding and list spacing with no auth, data, or API changes.

Overview Keyboard navigation in the composer command menu (scrollIntoView on the active item) was scrolling highlights flush against the ScrollArea viewport edge, so the scroll fade dimmed them and the rounded dropdown clipped corners. List-level scroll-py did not apply because scrolling happens on the viewport, not the list.

ScrollArea viewports with scrollFade now include scroll-p-[var(--fade-size)], so programmatic scroll-into-view keeps content inset from the fade on all sides (affects every faded scroll area, not only the composer menu).

The composer CommandList adds not-empty:py-3 so first/last items get vertical breathing room when the scroll position cannot move further, avoiding clipping against the 20px rounded container.

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

Note

Keep highlighted command menu items clear of the scroll fade overlay

  • Adds not-empty:py-3 to the CommandList in ComposerCommandMenu.tsx, so vertical padding is applied only when the list has items.
  • Adds scroll-p-[var(--fade-size)] to the ScrollArea viewport in scroll-area.tsx when scrollFade is enabled, so scroll snap targets align with the visible area rather than being obscured by the fade gradient.
Macroscope summarized fbb3401.
    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: b61da6ed-991b-4df9-b987-46094fc52fd9

      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:unvouched

    3. Approvability

      Verdict: Approved fbb3401

      This is a purely visual CSS fix that adds scroll-padding to keep highlighted items clear of the scroll fade effect. The changes are minimal, self-contained, and have no runtime behavior implications beyond presentation.

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

    5. maria-rcks closed this

Sign in to join this conversation.