Skip to content

Fix side panel hotkeys breaking when opening records from table#19849

Open
abdulrahmancodes wants to merge 1 commit intomainfrom
fix/side-panel-hotkeys-broken-after-record-navigation
Open

Fix side panel hotkeys breaking when opening records from table#19849
abdulrahmancodes wants to merge 1 commit intomainfrom
fix/side-panel-hotkeys-broken-after-record-navigation

Conversation

@abdulrahmancodes
Copy link
Copy Markdown
Contributor

@abdulrahmancodes abdulrahmancodes commented Apr 19, 2026

Summary

  • Fix side panel hotkeys (Ctrl+K, Escape, etc.) breaking when opening records from the record index table
  • Ensure side-panel-focus is always restored in the focus stack when navigating within an already-open side panel
  • Remove stale globalHotkeysConfig on record-index focus item that persisted after the side panel closed

Problem

When clicking records in the table to open them in the side panel, useLeaveTableFocus called resetFocusStackToRecordIndex which wiped the entire focus stack, including the side-panel-focus entry. Since openSidePanel early-returned when the panel was already open, side-panel-focus was never restored. Additionally, resetFocusStackToRecordIndex set enableGlobalHotkeysWithModifiers: false on the remaining record-index item when the side panel was open, and this stale config persisted after the panel closed, permanently blocking all hotkeys.

Fix

  • useNavigateSidePanel.ts: Move pushFocusItemToFocusStack before the isSidePanelOpened early-return so the side panel's focus entry is always present in the stack
  • useResetFocusStackToRecordIndex.ts: Always set enableGlobalHotkeysWithModifiers: true on the record-index item. Hotkey scoping when the side panel is open is handled by side-panel-focus sitting on top of the focus stack
Screen.Recording.2026-04-19.at.7.54.28.AM.mov

… side panel navigation

- Removed unnecessary store dependencies and side panel state checks from `useResetFocusStackToRecordIndex` hook, enabling global hotkeys by default.
- Streamlined the `useNavigateSidePanel` hook by consolidating side panel open checks, improving readability and maintainability.
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 2 files

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