Skip to content

Fix sidebar More menu hover and collapsed border hover - #12216

Merged
shimmyshimmer merged 1 commit into
unslothai:mainfrom
Sneakr:fix/sidebar-ui
Sep 29, 2026
Merged

shimmyshimmer merged 1 commit into
unslothai:mainfrom
Sneakr:fix/sidebar-ui

Conversation

@Sneakr

@Sneakr Sneakr commented Sep 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

Two fixes for the left sidebar.

More menu opens on hover

Hovering the More row opened its menu, and on the collapsed sidebar the More tooltip stayed on top of the open menu. The menu now opens only on click, and its tooltip stays hidden while the menu is open. After a choice from the menu, focus returns to the row without bringing the tooltip back. Hover and keyboard focus still show the label on the collapsed sidebar.

Collapsed sidebar border reacts to hover

On the collapsed sidebar, hovering the border showed a highlight line and the "Click to expand / Drag to resize" tooltip. The resize edge now renders only while the sidebar is expanded, where drag to resize and click to collapse work as before. Clicking or dragging the collapsed border no longer expands the sidebar. The sidebar toggle and Ctrl+B still do. The desktop app's edge strip is unchanged.

Changes

  • app-sidebar.tsx: remove the hover preview state and the pointer capture override on the More trigger. The menu uses its own open state, and the tooltip is controlled so it stays closed while the menu is open and when the menu returns focus to the row.
  • ui/sidebar.tsx: render SidebarResizeHandle only while the sidebar is expanded.
  • Tests: sidebar-more-menu-interaction.test.ts now checks click-only opening, the new sidebar-collapsed-edge.test.ts checks that a collapsed sidebar renders no resize edge, and the More menu exemption in nonmodal-menu-dismiss-guard.test.ts no longer refers to the hover preview.

Open the More menu only on click. Hovering the row no longer opens it, and the pointer override that kept the tooltip from closing is gone, so the tooltip no longer covers the open menu. The tooltip also stays closed when the menu returns focus to the row after a choice, so no label is left next to the collapsed sidebar. Hover and keyboard focus still show the label.

Render the sidebar resize edge only while the sidebar is expanded. A collapsed sidebar no longer shows the border highlight or the expand and resize tooltip on hover. The expanded edge still resizes and collapses as before, and the desktop app's edge strip is unchanged.

Update the More menu tests for click-only opening and add a test that a collapsed sidebar renders no resize edge. The full frontend suite, TypeScript checks and the desktop contract tests pass.
@shimmyshimmer

Copy link
Copy Markdown
Member

@codex review

@shimmyshimmer
shimmyshimmer merged commit 2033855 into unslothai:main Sep 29, 2026
38 of 42 checks passed
shimmyshimmer added a commit that referenced this pull request Sep 30, 2026
* Studio: open the sidebar More menu on hover again

#12216 made the More menu click-only to stop its tooltip covering the
open menu. That came from the old press handler swallowing the event,
not from hover, so hover is restored without it.

Mouse hover previews the menu and a 180ms grace period covers the gap
to it. A press pins or unpins it. Touch and keyboard open it through
the trigger as usual. A hover preview leaves focus where it was, so
passing over More no longer pulls the caret out of the composer.

* Studio: focus the More menu when pinning a hover preview

A press on More while the hover preview is open pinned the menu, but the
content was already mounted, so Radix never moved focus and it stayed in
the composer. Focus the menu content on that press, as a click-open does,
so arrow keys reach the menu and Escape returns focus to the row.
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