Skip to content

[Bug]: Cmd+F search shortcut doesn't work when chat is inside a folder or on mobile #1693

@amanharshx

Description

@amanharshx

Bug Description

The Cmd+F (search conversation content) keyboard shortcut silently stops working when a conversation is inside a folder (which activates tabs) or when the window is narrow enough to trigger mobile layout. The shortcut listener is tied to a component that doesn't render in these cases.

Steps to Reproduce

  1. Open AionUi
  2. Create a folder and move a conversation into it
  3. Open that conversation (tabs appear at the top)
  4. Press Cmd+F (or Ctrl+F on Windows/Linux)
  5. Nothing happens — search panel does not appear

Alternative reproduction:

  1. Open any conversation
  2. Resize the window below 768px width (mobile layout kicks in)
  3. Press Cmd+F
  4. Nothing happens

Root Cause

The Cmd+F shortcut listener lives inside ConversationTitleMinimap, which is rendered inside ChatTitleEditor. In ChatLayout, ChatTitleEditor is gated behind !layout?.isMobile && !hasTabs — so when tabs are active (folder chat) or the window is narrow (mobile), the component unmounts and the shortcut listener is gone.

Affected Files (fixed in #1692)

  • ChatLayout/index.tsx — +2: render hidden minimap when hasTabs || isMobile
  • ConversationTitleMinimap/index.tsx — +36 −27: hideTrigger prop conditionally hides trigger, panel stays active
  • minimapTypes.ts — +2: added hideTrigger prop to type
  • minimapUtils.ts — +5 −2: getPanelWidth adapts to narrow viewports
  • useMinimapPanel.ts — +19 −12: header-centered positioning + vertical clamping
  • minimapPanelWidth.dom.test.ts — +45: new test file, 5 tests

Diff

+109 −41 across 6 files (5 source + 1 new test file)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions