Skip to content

Conversation

@ammar-agent
Copy link
Collaborator

Fixes the strange rectangle that appeared at the bottom of the screen on mobile viewports when the right sidebar was collapsed.

Problem

On mobile (max-width: 768px), the collapsed right sidebar used position: absolute; bottom: 0; width: 0 which created a visible rectangular artifact at the bottom of the viewport.

This bug was introduced in commit 4d7ba60 (Oct 21, 2025) during the initial mobile responsive implementation and has been present since then.

Solution

Removed the mobile-specific override that forced collapsed sidebar to width: 0 with absolute positioning at the bottom. Now mobile behavior matches desktop:

Before:

  • Collapsed: width: 0; position: absolute; bottom: 0 → Strange visible rectangle
  • Expanded: Full width, 50vh max height

After:

  • Collapsed: 20px vertical token meter bar (same as desktop)
  • Expanded: Full width, 50vh max height

The vertical token meter provides useful context about token usage and this approach matches user expectations from the desktop experience.

Testing

Verify at various viewport widths:

  • Desktop (>768px): Vertical meter shows when collapsed ✓
  • Tablet/Mobile (≤768px): Vertical meter shows when collapsed (no more weird rectangle) ✓
  • Mobile expanded: Full width panel at bottom with proper max-height ✓

Generated with cmux

@ammar-agent
Copy link
Collaborator Author

All relevant checks passed

The integration test failure in runtimeExecuteBash.test.ts is unrelated to this UI change:

  • This PR only modifies CSS classes in RightSidebar.tsx
  • The failing test is about bash tool execution in the runtime layer
  • Test is known to be flaky (hangs locally when run individually)

Passing checks:

  • ✅ Static Checks (lint + typecheck + fmt)
  • ✅ Unit Tests
  • ✅ End-to-End Tests
  • ✅ Storybook Interaction Tests
  • ✅ Visual Regression Testing
  • ✅ Build Linux
  • ✅ UI Tests (Chromatic)
  • ✅ Code coverage

The UI fix removes position: absolute; bottom: 0 from mobile collapsed sidebar, allowing the 20px vertical token meter to show properly instead of creating a strange rectangle.

Removed the problematic `position: absolute; bottom: 0` styling for
collapsed mobile sidebar that caused a strange rectangle to appear at
the bottom of the screen on small viewports.

## Problem

On mobile (max-width: 768px), when the right sidebar was collapsed,
it used `position: absolute; bottom: 0; width: 0` which created a
visible rectangular artifact at the bottom of the viewport.

This was introduced in commit 4d7ba60 (Oct 21, 2025) during the
initial mobile responsive implementation.

## Solution

Let mobile collapsed state behave like desktop - show the 20px vertical
token meter bar. Removed the mobile-specific override that was forcing
`width: 0` and `position: absolute; bottom: 0`.

Now on mobile:
- Collapsed: Shows 20px vertical token meter (same as desktop)
- Expanded: Full width at bottom with 50vh max height

The vertical token meter is always useful context, and this approach
matches user expectations from the desktop experience.

_Generated with `cmux`_
@ammario ammario merged commit 9dc863d into main Nov 7, 2025
13 checks passed
@ammario ammario deleted the fix-costbar branch November 7, 2025 16:56
ibetitsmike pushed a commit that referenced this pull request Nov 7, 2025
Fixes the strange rectangle that appeared at the bottom of the screen on
mobile viewports when the right sidebar was collapsed.

## Problem

On mobile (max-width: 768px), the collapsed right sidebar used
`position: absolute; bottom: 0; width: 0` which created a visible
rectangular artifact at the bottom of the viewport.

This bug was introduced in commit 4d7ba60 (Oct 21, 2025) during the
initial mobile responsive implementation and has been present since
then.

## Solution

Removed the mobile-specific override that forced collapsed sidebar to
`width: 0` with absolute positioning at the bottom. Now mobile behavior
matches desktop:

**Before:**
- Collapsed: `width: 0; position: absolute; bottom: 0` → Strange visible
rectangle
- Expanded: Full width, 50vh max height

**After:**
- Collapsed: 20px vertical token meter bar (same as desktop)
- Expanded: Full width, 50vh max height

The vertical token meter provides useful context about token usage and
this approach matches user expectations from the desktop experience.

## Testing

Verify at various viewport widths:
- Desktop (>768px): Vertical meter shows when collapsed ✓
- Tablet/Mobile (≤768px): Vertical meter shows when collapsed (no more
weird rectangle) ✓
- Mobile expanded: Full width panel at bottom with proper max-height ✓

_Generated with `cmux`_
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.

2 participants