Skip to content

[Bug]: Cmd+F does nothing in the Files panel #34345

Closed

Description

@armanarutiunov

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/web

Steps to reproduce

The bug shows on two paths.

Path 1: focus in the tree

  1. Open a thread. In the right panel, click + and pick Files.
  2. Click any row in the file tree, for example a folder.
  3. Press Cmd+F (Ctrl+F on Windows and Linux).

Path 2: keyboard only

  1. Open a thread with the right panel open.
  2. Press Cmd+T, then F, to open a Files tab.
  3. Press Cmd+F.

Expected behavior

Cmd+F moves focus to the panel's Search files box, the same way Cmd+F in the chat opens thread find and Cmd+F in a source file opens that file's find.

Actual behavior

  • Path 1: nothing happens. Focus stays on the tree row. Neither the file search nor thread find opens.
  • Path 2: focus often stays on the + button after step 2, so typing does not reach the search box and Cmd+F does nothing. It depends on focus history: once + has been focused while the Files tab was active, every later open of that tab restores focus to +. The 0.1.8 recording below shows this path.

A custom keybinding cannot fix this, because no command focuses the file tree search.

Diagnosis from the source (main @ a74ee4c):

  • Any focus inside the right panel counts as previewFocus: isPreviewFocused (apps/web/src/lib/previewFocus.ts) checks for an ancestor with [data-preview-panel-mode], and the whole panel shell has it.
  • So mod+f resolves to preview.find (packages/shared/src/keybindings.ts). Only the browser preview handles preview.find, so in the Files panel the key does nothing.
  • Path 2: workspace focus (apps/web/src/lib/workspaceFocus.ts) remembers the last focused control per panel tab and restores it when the tab opens. + counts as a control of the tab, so the restore can land on it. The + menu also returns focus to + after a pick, and picking the tab that is already active makes no focus request at all, so focus falls to the composer.
  • The search box (FileSearchField in apps/web/src/components/files/FileBrowserPanel.tsx) has no shortcut that focuses it. Other surfaces handle mod+f themselves: the PDF viewer, diff find and the source view's find.

Impact

Minor bug or occasional failure

Version or commit

T3 Code (Beta) 0.1.8 desktop. Reproduced on main @ 2718827 in the dev web app.

Environment

macOS 27.2, desktop app 0.1.8. Also reproduced in the web app from vp run dev.

Screenshots, recordings, or supporting files

Before, desktop app 0.1.8 (pick Files, press Cmd+F, nothing happens):

files-find-before-0.1.8.mov

Before, main @ 2718827 in the dev web app (click the apps/ row, press Cmd+F, focus stays on the row):

files-find-before-main.mp4

Workaround

  • Click the Search files box.
  • Press F6 to move focus into the right panel. In the Files tab, focus lands on the search box.

Fix: #34346

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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