Skip to content

Conversation

@rwese
Copy link
Contributor

@rwese rwese commented Jan 12, 2026

What does this PR do?

Since I have a friend with a visual disability i find it very important to be able to scale a UI properly, so I tried to find some easy wins to get OC better usable.

Summary

This PR addresses accessibility and responsiveness issues for small screens and zoomed layouts, directly supporting issue #3547 (small screen compatibility).

BEFORE:

Screenshot 2026-01-12 at 12 53 05 trying to scale the ui down: Screenshot 2026-01-12 at 12 53 44

AFTER:

image

Changes Made

1. Sidebar Zoom Accessibility (packages/app/src/pages/layout.tsx)

  • Removed xl:block breakpoint that hid sidebar on zoom (150%+)
  • Added responsive width using min(280px, 25vw) function
  • Sidebar now visible at all zoom levels and screen sizes

2. Sidebar Text Truncation & Overlay (packages/app/src/pages/layout.tsx)

  • Session titles now truncate with ellipsis instead of wrapping
  • Added tooltip showing full title on hover for truncated text
  • Action buttons (archive) now overlay text area on hover
  • Fixed text container with min-w-0 for proper truncation
  • Reduced gap between text and status indicators
  • Project names also truncate with tooltip when expanded
  • Maintains visual hierarchy while improving usability

3. Main Stage Scaling (packages/app/src/pages/home.tsx)

  • Replaced fixed 220px margin with responsive mt-8 md:mt-12
  • Logo now scales properly: w-full at 100% zoom, md:w-xl on larger screens
  • Added max-w-lg container constraint to prevent overflow

4. Sidebar Mark Logo (packages/ui/src/components/logo.css)

  • Made responsive with width: 100% and max-width: 16px
  • Prevents oversized appearance when zoomed

5. Efficient Spacing

  • Reduced project list margin: 80px → 32-48px (40% reduction)
  • Reduced list gap: 16px → 12px (25% reduction)
  • Better space utilization for small viewport heights

6. Sidebar Titles

Removed text truncation from sidebar project and session titles. Long names now wrap properly using instead of being cut off with ellipsis. This improves readability for long project/session names in narrow sidebars.

Issue Connection

This PR directly addresses #3547 (Small screen compatibility):

  • User input visibility: Reduced excessive vertical spacing so input fields remain visible
  • Chat output visibility: More compact layout preserves screen real estate
  • Sidebar title readability: Long project and session names truncate with tooltip
  • Action button usability: Buttons overlay text on hover for better access
  • Graceful collapse: Responsive margins and gaps adapt to limited viewport heights
  • Small height priority: Optimized for scenarios like VSCode terminal (10 lines)

Technical Details

  • WCAG Compliance: Fixed critical accessibility violations where UI elements disappeared on zoom
  • Text Truncation: Session and project titles use truncate with min-w-0 for proper ellipsis
  • Hover Tooltips: Full titles shown on hover for truncated text
  • Overlay Buttons: Archive and action buttons overlay text area on hover for better UX
  • Responsive Design: Replaced fixed pixel/REM values with Tailwind responsive classes
  • Viewport Units: Used min() function and viewport percentage constraints for zoom-friendly layouts
  • Backward Compatible: Maintains mobile sidebar functionality while fixing desktop zoom issues

Testing

  • Build passes: ✅
  • TypeScript checks: ✅
  • Responsive behavior verified at 100%, 125%, 150%, 175%, 200% zoom levels
  • Text truncation verified with long project and session names
  • Hover tooltips confirmed working for truncated text
  • Action button overlay verified on hover

Related

rwese added 6 commits January 12, 2026 12:36
- Remove xl:block breakpoint that hid sidebar on zoom
- Use responsive min() function for sidebar width (25vw max)
- Sidebar now remains visible at all zoom levels
- Maintains mobile sidebar functionality for small screens
- Replace fixed mt-55 (220px) with responsive mt-8 md:mt-12
- Replace fixed md:w-xl (384px) with responsive w-48 md:w-64 (192px→256px)
- Add max-w-md to container to prevent overflow
- Make sidebar Mark logo responsive (100% with max-width 16px)
- Maintains visual hierarchy while allowing proper zoom scaling
- Logo now uses w-full for full width at 100% zoom
- md:w-xl maintains large size (384px) on medium+ screens
- Better visual appearance at default zoom level
- Still scales responsively on zoom
- Reduce mt-20 (80px) to mt-8 md:mt-12 (32px→48px) for better space utilization
- Reduce gap-4 (16px) to gap-3 (12px) for tighter spacing
- More responsive to viewport size and zoom level
- Uses available space more efficiently
- Replace truncate class with break-words for project names
- Replace truncate class with break-words for session titles
- Replace truncate class with break-words for 'New session' link
- Allows long titles to wrap instead of being cut off with ellipsis
- Improves readability in narrow sidebar and small screen scenarios
- Session titles now truncate with ellipsis instead of wrapping
- Added tooltip showing full title on hover for truncated text
- Action buttons (archive) now overlay text area on hover
- Fixed text container with min-w-0 for proper truncation
- Reduced gap between text and status indicators
- Project names also truncate with tooltip when expanded
- Maintains visual hierarchy while improving usability
@rwese rwese requested a review from adamdotdevin as a code owner January 12, 2026 11:54
@github-actions
Copy link
Contributor

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found.

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.

[FEATURE]: Small screen compatibility

1 participant