mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-06-12 08:51:53 +00:00
fix(desktop): carve sidebar nav rows out of the titlebar drag region (#44453)
A WSL2 user reported the top two left-sidebar items being unclickable while the rest of the UI works. That symptom shape matches an -webkit-app-region:drag hit-test band eating clicks, not GPU/compositing: the shell's titlebar drag strips (app-shell.tsx) span the top 34px and the nav group clears them by only 6px, and drag regions win hit-testing over DOM regardless of pointer-events. Linux WCO (Electron >=32) is the newest implementation and has known region quirks (electron#43030). Apply the same no-drag carve-out the codebase already uses for sticky user bubbles (USER_BUBBLE_BASE_CLASS in thread.tsx) to the sidebar nav buttons. Harmless on every platform: the rows were never meant to be draggable surface.
This commit is contained in:
parent
114e265737
commit
484f484c25
1 changed files with 8 additions and 1 deletions
|
|
@ -797,7 +797,14 @@ export function ChatSidebar({
|
|||
<SidebarMenuButton
|
||||
aria-disabled={!isInteractive}
|
||||
className={cn(
|
||||
'flex h-7 w-full justify-start gap-2 rounded-md border border-transparent px-2 text-left text-[0.8125rem] font-medium text-(--ui-text-secondary) transition-colors duration-100 ease-out hover:bg-(--ui-control-hover-background) hover:text-foreground hover:transition-none',
|
||||
// no-drag: these rows sit directly under the titlebar's
|
||||
// [-webkit-app-region:drag] strips (app-shell.tsx), with only
|
||||
// 6px of clearance. Drag regions win hit-testing over DOM
|
||||
// (pointer-events can't override), and on Linux/WSLg the
|
||||
// resolved region has been observed to swallow clicks on the
|
||||
// top rows. Same carve-out as USER_BUBBLE_BASE_CLASS in
|
||||
// thread.tsx.
|
||||
'flex h-7 w-full justify-start gap-2 rounded-md border border-transparent px-2 text-left text-[0.8125rem] font-medium text-(--ui-text-secondary) transition-colors duration-100 ease-out [-webkit-app-region:no-drag] hover:bg-(--ui-control-hover-background) hover:text-foreground hover:transition-none',
|
||||
active &&
|
||||
'border-(--ui-stroke-tertiary) bg-(--ui-control-active-background) text-foreground shadow-none hover:border-(--ui-stroke-tertiary)!',
|
||||
!isInteractive &&
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue