Skip to content

fix(chat): prevent right sidebar overflow in narrow windows#156

Merged
Zhang-Henry merged 1 commit intomainfrom
fix/sidebar-narrow-window-overflow
Apr 11, 2026
Merged

fix(chat): prevent right sidebar overflow in narrow windows#156
Zhang-Henry merged 1 commit intomainfrom
fix/sidebar-narrow-window-overflow

Conversation

@MarkSiqiZhang
Copy link
Copy Markdown
Collaborator

Summary

  • Remove flex-shrink-0 from expanded sidebar so it shrinks naturally within the flex container instead of overflowing the viewport
  • Add horizontal scroll to tab bar when sidebar is too narrow to show all tabs
  • Ensure the collapse button always stays visible with flex-shrink-0
  • Cap drag-resize width to available space so sidebar can't be dragged wider than the window allows

Test plan

  • Shrink browser window horizontally — sidebar should shrink with it, no overflow
  • Collapse button remains visible and functional at all widths
  • Tab bar scrolls horizontally when too narrow for all tabs
  • Drag-resize sidebar in a narrow window — should cap at available space
  • Expand window back — sidebar returns to its configured width
  • Mobile layout unaffected

@bbsngg
Copy link
Copy Markdown
Contributor

bbsngg commented Apr 10, 2026

I reviewed the sidebar overflow fix and don't see any blocking issues in the implementation.

The change makes sense end-to-end: the expanded sidebar can now shrink within the flex layout, the tab strip falls back to horizontal scrolling instead of compressing the buttons, the collapse control is protected from shrinking away, and drag-resize is capped by the actual available container width rather than only the global max width.

The main remaining risk is UI regression coverage rather than code correctness. I'd recommend manually verifying a few edge cases before merge:

  • very narrow desktop widths, especially around the sidebar minimum width
  • dragging the sidebar to its max in a narrow window, then expanding the window again
  • tab bar behavior with longer localized labels to confirm horizontal scrolling still feels usable

From the code side, this looks good to me.

@Zhang-Henry Zhang-Henry merged commit 57cf7d4 into main Apr 11, 2026
3 checks passed
@Zhang-Henry Zhang-Henry deleted the fix/sidebar-narrow-window-overflow branch April 11, 2026 04:56
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