fix(dashboard): fix sidebar nav hover highlight snap-back#3092
Merged
Conversation
… leave Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…detection Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.
Tip: disable this comment in your organization's Code Review settings.
🦋 Changeset detectedLatest commit: 499efec The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…ctive route when moving between items.
simplesagar
approved these changes
May 28, 2026
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
This fixes some slight bugs with how the hover slider was behaving. Main one was it would snap back to the the last place if you hovered too long and then went to the next item. The other minor one was if you moved too fast it wouldn't register and the slider would never move
setHoveredItem(null)from individual itemonMouseLeaveto the container div'sonMouseLeave— highlight now stays on the last-hovered item while moving between items, and only returns to the active route when the mouse leaves the sidebar entirelyCENTER_ZONEwas blocking the settle trigger even when the mouse was fully stopped at the edge of an item — now bypassed whendy === 0Root cause
Each nav item's
onMouseLeavecalledsetHoveredItem(null)immediately, snapping the sliding highlight back to the active route before the next item could settle. Because the settle interval takes up to 100ms to fire, this created a visible snap-to-active → slide-to-new-item sequence on every transition. Separately, theCENTER_ZONEedge exclusion had no escape hatch for a stopped mouse, causing the highlight to never trigger when the mouse landed precisely at the top or bottom of an item.Test plan
Summary by cubic
Fixes sidebar nav hover highlight snap-back and makes hover intent more responsive. The highlight now stays on the last hovered item and only resets when the cursor leaves the sidebar; settling is faster and reliable at item edges.
hoveredItemto the containeronMouseLeave.dy === 0) to prevent edge deadlocks.Written for commit 73745be. Summary will update on new commits.
Review in cubic