fix(mobile): Fix broken mobile navigation menu#16832
Merged
rahulchhabria merged 8 commits intomasterfrom Mar 8, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Autofix Details
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Portal-rendered
<ul>gets unstyled browser defaults- Added Tailwind classes
list-none p-0 m-0to the portal<ul>elements to override browser default margins/padding outside scoped preflight.
- Added Tailwind classes
Or push these changes by commenting:
@cursor push aae80af66d
Preview (aae80af66d)
diff --git a/src/components/mobileMenu/index.tsx b/src/components/mobileMenu/index.tsx
--- a/src/components/mobileMenu/index.tsx
+++ b/src/components/mobileMenu/index.tsx
@@ -37,14 +37,14 @@
<Theme accentColor="iris">
<Popover.Content className={styles.PopoverContent} sideOffset={5} align="end">
<Box display={{xs: 'block', sm: 'none'}}>
- <ul>
+ <ul className="list-none p-0 m-0">
<li className={styles.MenuItem}>
<Search path={pathname} searchPlatforms={searchPlatforms} />
</li>
</ul>
<div className={styles.MenuSeparator} />
</Box>
- <ul>
+ <ul className="list-none p-0 m-0">
<li className={styles.MenuItem}>
<Link href="https://sentry.io/changelog/">Changelog</Link>
</li>
Contributor
Author
- Close sidebar on route change by unchecking the CSS toggle checkbox via a new CloseSidebarOnNavigation client component - Fix sidebar height overflowing past viewport bottom on mobile (was 100vh, should exclude header height) - Fix MobileMenu popover opening off-screen by adding align="end" so it anchors to the right edge of the trigger - Fix invalid HTML: wrap orphan <li> elements in <ul> in MobileMenu - Fix header nav not filling full width (missing w-full), which caused the Menu button to not be pushed to the right edge Co-Authored-By: Claude <noreply@anthropic.com>
…browser defaults outside scoped preflight\n\nCo-Authored-By: Claude <noreply@anthropic.com> Applied via @cursor push command
c32997e to
0f74550
Compare
The /platforms sidebar was missing CloseSidebarOnNavigation, so the mobile sidebar stayed open after navigating to a new page. All other sidebar paths already had it. Co-Authored-By: Claude <noreply@anthropic.com>
…sidebar toggle Setting checkbox.checked = false does not fire a DOM change event, so the Header's sidebarOpen state stayed true after navigation, leaving the X icon visible even though the sidebar was closed. Co-Authored-By: Claude <noreply@anthropic.com>
The base rule used 64px as the --header-height fallback but the desktop media query still had 80px (leftover from the old header). If --header-height were ever undefined, top and height would disagree, causing 16px of overflow past the viewport bottom. Co-Authored-By: Claude <noreply@anthropic.com>
…bile When the sidebar is hidden (display:none on mobile), all child elements have scrollHeight === 0, so findScrollContainer would escalate past .toc and find <body> as the scroll container, causing the page to scroll to the active link on navigation. Guard both the click-handler and scroll-to-active paths against body/ documentElement so the effect is a no-op when the sidebar is not visible. Co-Authored-By: Claude <noreply@anthropic.com>
The More button expands 5 links that fell outside the viewport with no way to scroll to them. sidebar-external-links used flex: 0 0 auto so it never scrolled, and the sidebar clips overflow with hidden. Moving SidebarMoreLinks inside the .toc/.sidebar-main div means expanding More just adds content to the existing scroll container. Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
JPeer264
approved these changes
Mar 8, 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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

The mobile navigation had several bugs that made it difficult to use on small screens.
Sidebar doesn't close after navigation — the sidebar toggle is CSS-only (a hidden checkbox +
:has()selector). When a user tapped a nav link, the page navigated but the checkbox stayed checked, leaving the sidebar open over the new page content. Fixed by adding aCloseSidebarOnNavigationclient component that watchesusePathnameand unchecks the checkbox on route change.Header nav not full width — the
<nav>inside the fixed header was missingw-full, so it only sized to its content width. This meant theml-autoon the Menu button had nothing to push against, leaving it clipped instead of flush to the right edge.Popover opens off-screen — the MobileMenu popover defaulted to
align="center"relative to its trigger in the top-right corner, causing it to render partially off the left edge of the screen on narrow viewports. Changed toalign="end"so it anchors to the right edge of the trigger.Sidebar height overflow on mobile — the base
.sidebarrule usedheight: 100vhbut the sidebar starts attop: var(--header-height), so it overflowed 80px past the bottom of the screen on mobile (the correctedcalc(100vh - var(--header-height))was only applied inside amin-width: 768pxmedia query). Moved the correct value to the base rule.Invalid HTML —
<li>elements inMobileMenuhad no<ul>parent, which is invalid HTML and can cause layout issues in some browsers.Co-Authored-By: Claude noreply@anthropic.com