Skip to content

fix: reclaim full space when sidebar collapsed on Messages and Map#2368

Merged
Yeraze merged 1 commit intomainfrom
fix/sidebar-collapse-reclaim-space
Mar 22, 2026
Merged

fix: reclaim full space when sidebar collapsed on Messages and Map#2368
Yeraze merged 1 commit intomainfrom
fix/sidebar-collapse-reclaim-space

Conversation

@Yeraze
Copy link
Owner

@Yeraze Yeraze commented Mar 22, 2026

Summary

When collapsing the sidebar on Messages or Map tabs, the sidebar now shrinks to 0 width instead of leaving a 48px dead space column. The expand button floats as a small icon overlay in the top-left corner of the content area.

Changes

  • Messages sidebar: Added collapse CSS (was completely missing — sidebar content hid but container stayed 350px wide)
  • Map sidebar: Changed collapsed width from 48px to 0
  • Both: Collapsed sidebar header positioned as absolute overlay with the expand button floating with a subtle shadow
  • Mobile: Updated responsive collapsed styles to match

Files Changed

File Change
src/styles/nodes.css Collapsed sidebar width 0, floating expand button overlay

Test plan

  • 3052 tests pass, 0 failures
  • Manually verified collapse/expand on Messages tab
  • Manually verified collapse/expand on Map tab
  • Expand button visible and clickable when collapsed

🤖 Generated with Claude Code

Collapsed sidebar now shrinks to width 0 instead of 48px, with the
expand button floating as a small icon overlay in the top-left corner
of the content area. Applies to both Map (nodes-anchored-sidebar) and
Messages (messages-sidebar) tabs, including mobile responsive styles.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
width: 48px !important;
min-width: 48px;
max-width: 48px;
width: 0 !important;

Choose a reason for hiding this comment

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

Excellent change! Reducing collapsed width from 48px to 0 properly reclaims the full space. The overflow: visible is crucial to ensure the floating expand button remains accessible.

transition: width 0.3s ease;
}

.messages-sidebar.collapsed {

Choose a reason for hiding this comment

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

Great addition! The Messages sidebar was missing collapse CSS entirely - this fixes a significant UX gap. Adding the smooth transition maintains consistency with the Map sidebar behavior.

@@ -554,16 +563,20 @@
}

.nodes-sidebar.collapsed .sidebar-header {

Choose a reason for hiding this comment

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

Smart positioning solution! Moving the collapsed header to absolute positioning with proper z-index (1000) creates a clean floating expand button. The box-shadow on line 579 adds nice visual depth.

/* When collapsed on mobile, show as small strip */
/* When collapsed on mobile, reclaim all space */
.nodes-anchored-sidebar.collapsed {
position: static;

Choose a reason for hiding this comment

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

Consistent mobile implementation! Good that you applied the same 0-width approach to mobile collapsed state. This ensures consistent behavior across all device sizes.

@Yeraze Yeraze merged commit 8167b3f into main Mar 22, 2026
13 checks passed
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.

1 participant