Skip to content

Conversation

@adelin-b
Copy link

@adelin-b adelin-b commented Jan 10, 2026

Reason

I am using tailscale from my phone/tablet and in both it was impossible to switch projects.

Summary

  • Sidebar now uses overlay pattern on mobile (fixed position when open)
  • Added backdrop overlay that dismisses sidebar on tap
  • Made collapse toggle button visible on all screen sizes
  • Made project options menu visible on all screen sizes

Problem

Previously the sidebar was forced to collapsed width (w-16) on mobile even when sidebarOpen was true, and the toggle/options buttons were hidden with hidden lg:flex. This made it impossible to:

  • Expand the sidebar on mobile devices
  • Switch between projects on mobile

Solution

  • Changed sidebar to use fixed inset-y-0 left-0 w-72 on mobile when open (overlay pattern)
  • Added a backdrop div that closes sidebar when tapped (mobile only via lg:hidden)
  • Removed hidden lg: prefix from collapse toggle button
  • Removed hidden lg: prefix from project options menu button

Test plan

  • Open app on mobile viewport (< 1024px)
  • Tap collapse toggle button - sidebar should expand as overlay
  • Tap backdrop - sidebar should close
  • When sidebar is open, project selector and options menu should be visible and usable

Summary by CodeRabbit

  • UI/UX Improvements
    • Added mobile backdrop overlay to the sidebar for improved visual separation on smaller screens
    • Made sidebar controls (collapse button, project selector, project options) consistently visible across all screen sizes instead of hidden on mobile
    • Enhanced responsive layout with improved fixed overlay behavior for mobile devices
    • Reorganized sidebar component structure for better user interaction

✏️ Tip: You can customize this high-level summary in your review settings.

- Sidebar now uses overlay pattern on mobile (fixed position when open)
- Added backdrop overlay that dismisses sidebar on tap
- Made collapse toggle button visible on all screen sizes
- Made project options menu visible on all screen sizes

Previously the sidebar was forced to collapsed width (w-16) on mobile
even when sidebarOpen was true, and the toggle/options buttons were
hidden with `hidden lg:flex`.
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @adelin-b, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the user experience on mobile devices by addressing critical usability issues related to the sidebar. Previously, mobile users were unable to expand the sidebar or switch between projects due to hidden controls and a fixed collapsed width. The changes introduce a responsive overlay design for the sidebar, complete with a dismissable backdrop, and ensure that essential navigation and project management controls are accessible regardless of screen size. This makes the application fully functional and intuitive for users on smaller viewports.

Highlights

  • Mobile Sidebar Overlay: The sidebar now utilizes an overlay pattern on mobile devices, appearing as a fixed, full-width panel when open.
  • Backdrop Dismissal: A new backdrop overlay has been introduced for mobile, allowing users to dismiss the open sidebar by tapping outside of it.
  • Universal Visibility of Controls: The sidebar collapse toggle button and the project options menu button are now visible across all screen sizes, removing previous mobile restrictions.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request successfully implements an overlay pattern for the sidebar on mobile devices, allowing it to be expanded and enabling project switching. The changes to make the collapse and project options buttons visible on all screen sizes are also correct. However, I've identified a significant accessibility issue with the new overlay implementation: focus is not trapped within the open sidebar on mobile, and it cannot be dismissed with the Escape key. Addressing this will greatly improve the user experience for keyboard-only users.

Comment on lines +258 to 266
<>
{/* Mobile backdrop overlay */}
{sidebarOpen && (
<div
className="fixed inset-0 bg-black/50 z-20 lg:hidden"
onClick={toggleSidebar}
data-testid="sidebar-backdrop"
/>
)}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

While the new overlay pattern for mobile works visually, it introduces some accessibility issues that should be addressed:

  1. Focus is not trapped: When the sidebar is open on mobile, users can still use the Tab key to navigate to and interact with elements behind the overlay. This can be confusing for keyboard users as the focused elements are not visible.
  2. No Escape key dismissal: The sidebar overlay cannot be closed by pressing the Escape key, which is a standard and expected behavior for modals and overlays.

To improve accessibility, I recommend implementing focus trapping to keep focus within the sidebar when it's open as an overlay, and adding a keyboard event listener to close it when the Escape key is pressed. You could use a library like focus-trap-react or implement this logic within a useEffect hook that runs when the sidebar is open on mobile.

@coderabbitai
Copy link

coderabbitai bot commented Jan 10, 2026

📝 Walkthrough

Walkthrough

This PR restructures the sidebar component to support mobile responsive design by introducing a mobile backdrop overlay and reorganizing nested dialogs/modals. UI elements previously hidden on mobile (collapse toggle, project selector buttons) are now visible across all screen sizes, with responsive positioning handled through layout classes rather than visibility toggles.

Changes

Cohort / File(s) Summary
Sidebar Structural Refactor
apps/ui/src/components/layout/sidebar.tsx
Major restructuring replacing a single <aside> block with a fragment containing conditional mobile backdrop and reorganized component tree. Sidebar dialogs/modals (CreateSpecDialog, OnboardingDialog, DeleteProjectDialog, TrashDialog, NewProjectModal, SidebarFooter) moved into the main sidebar return block. CollapseToggleButton props updated; responsive overlay styling added for mobile states.
Mobile Visibility Updates
apps/ui/src/components/layout/sidebar/components/collapse-toggle-button.tsx, apps/ui/src/components/layout/sidebar/components/project-selector-with-options.tsx
Responsive class changes removing hidden lg:flex in favor of flex on two buttons (collapse toggle and project selector trigger), making UI elements visible on all screen sizes instead of desktop-only.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

Suggested labels

Ready-To-Merge

Poem

🐰 Hop along, the sidebar's been rearranged,
Mobile magic and dialogs exchanged,
Buttons now visible, no more hiding away,
The UI responds better by night and by day!

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: enabling sidebar expand and project switching functionality on mobile devices by fixing responsive visibility.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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 and usage tips.

@gsxdsm
Copy link

gsxdsm commented Jan 11, 2026

Please get this in!

@webdevcody
Copy link
Collaborator

I think this has been fixed, let me know if not

@webdevcody webdevcody closed this Jan 13, 2026
@adelin-b adelin-b deleted the fix/mobile-sidebar-expand branch January 20, 2026 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants