Skip to content

fix: prevent agents right panel from covering chat on mobile - #22744

Merged
kylecarbs merged 1 commit into
mainfrom
fix-agents-mobile-right-panel
Mar 7, 2026
Merged

kylecarbs merged 1 commit into
mainfrom
fix-agents-mobile-right-panel

Conversation

@kylecarbs

@kylecarbs kylecarbs commented Mar 7, 2026 •

Copy link
Copy Markdown
Member

On mobile, the right panel (git diff / repo changes) auto-opens at 100vw, completely covering the chat with no way to dismiss it.

Mobile flow after this fix

  1. Chat shows normally (full screen, no right panel)
  2. Tap the existing toggle button (top-right of the chat topbar) → right panel takes over the screen
  3. Right panel header has an X button (top-right) → tap to close → back to chat

The left sidebar is already hidden on mobile (existing hidden md:block), so this isn't touched — the back arrow button already takes you home.

Changes

AgentDetail.tsx

  • Skip auto-opening the right panel on mobile (<768px). The auto-open when diff/git status appears is great on desktop but immediately hides the chat on mobile.
  • Hide the chat column entirely on mobile when the panel is open (max-md:hidden), so it's a clean swap instead of the chat getting squished to 0 width.
  • Pass onClose to SidebarTabView.

SidebarTabView.tsx

  • Add onClose prop.
  • On mobile: show an X close button in the panel header (md:hidden). On desktop: keep the existing expand/fullscreen toggle (hidden md:inline-flex). The expand toggle is useless on mobile since both states cover the full viewport.

On mobile, the right panel (git diff/changes) auto-opens and renders at
100vw, completely covering the chat with no way to dismiss it.

Changes:
- AgentDetail: skip auto-opening the right panel on mobile (<768px)
- AgentDetail: hide the chat column on mobile when the panel is open
  (max-md:hidden) so it's a clean swap, not a squished layout
- SidebarTabView: add onClose prop; on mobile show an X close button
  in the panel header (md:hidden) and hide the expand/fullscreen
  toggle (hidden md:inline-flex) since it's useless on small screens
- AgentDetail: pass onClose to SidebarTabView

Mobile flow: chat shows normally → tap the existing toggle button in
the top bar → right panel takes over the screen with an X to close →
tap X → back to chat.
@kylecarbs
kylecarbs force-pushed the fix-agents-mobile-right-panel branch from af529f4 to c3038ff Compare March 7, 2026 00:36
@kylecarbs
kylecarbs merged commit 3608064 into main Mar 7, 2026
27 checks passed
@kylecarbs
kylecarbs deleted the fix-agents-mobile-right-panel branch March 7, 2026 01:08
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 7, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants