Conversation
On small screens (width < 900px), the nav expansion button now works correctly by: - Using a separate isMobileNavOpen state for mobile screens - Showing an overlay backdrop when mobile nav is expanded - Auto-closing the nav when navigating to a new page - Maintaining the existing behavior for desktop screens Fixes #1430 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Mike Shi <MikeShi42@users.noreply.github.com>
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR Review✅ No critical issues found. The implementation is clean and follows good patterns:
The code is production-ready. 🚀 |
|
@claude can you instead just default |
PR ReviewIssue: isSmallScreen is calculated using width from useWindowSize(), which is undefined on first render. The fallback (width ?? 1000) < 900 = false becomes the localStorage default value before the actual window size is known. Impact: On mobile devices, the first load will set isNavCollapsed localStorage to false, then persist that value. Users won't get the mobile-optimized collapsed nav on subsequent visits. Fix: Either use Mantine's getInitialValueInEffect option to defer localStorage initialization, or revert to the original isCollapsed = isSmallScreen || isPreferCollapsed logic where mobile is always collapsed. |
… isSmallScreen - Default isPreferCollapsed to isSmallScreen so mobile users see collapsed nav initially - Remove separate isMobileNavOpen state and related logic - Remove overlay backdrop and z-index handling - Simplify toggle button to only update isPreferCollapsed - Users can still expand nav on mobile and preference is respected Co-authored-by: Mike Shi <MikeShi42@users.noreply.github.com>
E2E Test Results✅ All tests passed • 46 passed • 3 skipped • 257s
|
|
@claude okay let's just set |
PR Review❌ Critical Issues:
Recommended fixes:
|
… isSmallScreen - Set defaultValue to undefined for localStorage - Check if user has preference, otherwise default to isSmallScreen - Respects user preference if explicitly set - Avoids race condition with window size initialization Co-authored-by: Mike Shi <MikeShi42@users.noreply.github.com>
|
@claude please fix lint error |
PR Review❌ Implementation doesn't match PR description → The PR body describes features (isMobileNavOpen state, overlay backdrop, auto-closing on navigation) that are not implemented in the code ❌ Logic bug in toggle handler → Suggested fix: onClick={() => setIsPreferCollapsed(\!isCollapsed)}This ensures the toggle always sets the opposite of the current computed state, not just negating the stored preference. |
Update callback parameter type from boolean to boolean | undefined to match the isPreferCollapsed state type. Co-authored-by: Mike Shi <MikeShi42@users.noreply.github.com>
Fixes #1430
On small screens (width < 900px), the nav expansion button now works correctly by:
isMobileNavOpenstate for mobile screensGenerated with Claude Code