Skip to content

fix(hotkeys): shift-modified split navigation to avoid collapse/expand conflict#2653

Merged
gbirman merged 33 commits into
mainfrom
capital-l-h-split-hotkeys
Apr 17, 2026
Merged

fix(hotkeys): shift-modified split navigation to avoid collapse/expand conflict#2653
gbirman merged 33 commits into
mainfrom
capital-l-h-split-hotkeys

Conversation

@gbirman
Copy link
Copy Markdown
Contributor

@gbirman gbirman commented Apr 17, 2026

Summary

  • Split navigation: h/l collided with list collapse/expand, so split focus moved to shift+H/shift+L and shift+←/shift+→.
  • Close split hotkey: temporarily swapped from cmd+esc → opt+esc to work around your Karabiner-level interception.
  • Preview panel enter/exit: removed. Bare h/l/arrows are now purely collapse/expand, and the unused previewPanelRef plumbing was deleted.
  • Spotlight fix: shift+esc now actually fires — globalSplitManager() was being captured eagerly (as undefined) at panel-render time; moved the call into the
    condition closure.
  • AI chat "Background" hint: only highlights when that specific chat input has focus, so cmd-anything elsewhere no longer flashes the hint. Listeners are
    properly cleaned up.
  • Sidebar "New Split" label: shows \ instead of ⌘.
  • Shortcuts settings panel rework: sections trimmed to Core / Unified List / Splits (dropped stale Filtering + Miscellaneous), defunct entries removed (filter
    hotkeys, escape-closes-split, cmd+/), descriptions corrected (enter = open in current split, added shift+enter, click/shift-click, cmd+j renamed to "Focus AI
    chat"), inline g → i Kbd example added, spacing tightened.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 17, 2026

Warning

Rate limit exceeded

@gbirman has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 18 minutes and 6 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 18 minutes and 6 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 3965d6db-19b2-43a7-818a-f117a227e59a

📥 Commits

Reviewing files that changed from the base of the PR and between 198158f and a095708.

📒 Files selected for processing (6)
  • js/app/packages/app/component/SoupChatInput.tsx
  • js/app/packages/app/component/next-soup/soup-view/soup-view.tsx
  • js/app/packages/app/component/next-soup/soup-view/use-soup-view-hotkeys.ts
  • js/app/packages/app/component/settings/Shortcuts.tsx
  • js/app/packages/app/component/split-layout/components/SplitPanel.tsx
  • js/app/packages/app/component/split-layout/registerSplitHotkeys.ts
📝 Walkthrough

Walkthrough

Changes modify hotkey registrations, focus tracking, and navigation behavior across the application. The "create new split" hotkey token is reassigned, chat input focus tracking is added, preview panel references are removed from soup view navigation, split focus shortcuts are updated, and shortcut settings descriptions are reorganized.

Changes

Cohort / File(s) Summary
Hotkey Registration
js/app/packages/app/component/GlobalHotkeys.tsx, js/app/packages/app/component/split-layout/registerSplitHotkeys.ts
Reassigned TOKENS.global.createNewSplit from cmd+\\ to \\ hotkey variant. Updated split navigation shortcuts: split-right and split-left now require shift+ modifier (shift+l/shift+arrowright and shift+h/shift+arrowleft). Deferred globalSplitManager() evaluation to condition callback instead of top-level invocation.
Focus Tracking
js/app/packages/app/component/SoupChatInput.tsx
Added chatHasFocus signal to track container focus state via focusin/focusout listeners. Made metaHeld dependent on both chatHasFocus() and cmd key press. Updated cmd+j hotkey description from "Focus chat input" to "Focus AI chat".
Preview Panel Refactoring
js/app/packages/app/component/next-soup/soup-view/soup-view.tsx, js/app/packages/app/component/next-soup/soup-view/use-soup-navigation-hotkeys.ts
Removed previewPanelRef signal and prop wiring from SoupViewList. Removed preview panel hook dependency and previewPanelRef option from useSoupNavigationHotkeys. Navigation hotkeys (h/l/arrow keys) now return false on state mismatch instead of interacting with preview panel. Updated descriptions to "Collapse item" and "Expand item".
Settings UI
js/app/packages/app/component/settings/Shortcuts.tsx
Changed ShortcutItem.description type from string to JSX.Element. Restructured shortcut sections from "Unified List Navigation", "Filtering", "Splits & Navigation" to consolidated "Core", "Unified List", "Splits" sections. Updated layout spacing classes and description markup to include <Kbd> components.

Possibly related PRs

  • feat[soup]: mobile action drawer #2388: Removes preview panel reference wiring in soup-view component and updates preview-related hotkey interactions, directly aligning with preview panel refactoring changes.
  • feat(ai): konsole mcp #2357: Modifies hotkey registrations in GlobalHotkeys.tsx and registerHotkey calls, matching the hotkey token reassignment scope.
  • fix: remove console log #2202: Modifies SoupChatInput.tsx focus handling by removing global document listeners, complementary to the new containerRef-scoped focus tracking approach.
🚥 Pre-merge checks | ✅ 1 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title exceeds the 72-character limit at 79 characters and uses conventional commit format correctly, but violates the length requirement. Shorten the title to 72 characters or fewer, for example: 'fix(hotkeys): shift-modify split nav to avoid collapse/expand conflict'
✅ Passed checks (1 passed)
Check name Status Explanation
Description check ✅ Passed The pull request description comprehensively explains all major changes in the changeset, including hotkey remapping, removal of preview panel functionality, focus tracking improvements, and settings panel reorganization.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 17, 2026

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@js/app/packages/app/component/settings/Shortcuts.tsx`:
- Line 59: The shortcut description for the `${cmdOrCtrl}+escape` entry in
Shortcuts.tsx incorrectly only says "Close the split" while the handler in
registerSplitHotkeys.ts uses getSplitCount() to fall back to "Go home" when only
one split exists; update the description for the keys: [`${cmdOrCtrl}+escape`]
entry in Shortcuts.tsx to reflect both behaviors (e.g. "Close split (or Go home
if only one split)") or make it dynamic by importing/using getSplitCount() so
the panel shows the correct text at runtime; target the keys/description object
in Shortcuts.tsx and reference registerSplitHotkeys.ts / getSplitCount() for the
intended behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: e50a656f-41c7-4bba-b315-527df8165eeb

📥 Commits

Reviewing files that changed from the base of the PR and between 555c827 and 198158f.

📒 Files selected for processing (6)
  • js/app/packages/app/component/GlobalHotkeys.tsx
  • js/app/packages/app/component/SoupChatInput.tsx
  • js/app/packages/app/component/next-soup/soup-view/soup-view.tsx
  • js/app/packages/app/component/next-soup/soup-view/use-soup-navigation-hotkeys.ts
  • js/app/packages/app/component/settings/Shortcuts.tsx
  • js/app/packages/app/component/split-layout/registerSplitHotkeys.ts
💤 Files with no reviewable changes (1)
  • js/app/packages/app/component/next-soup/soup-view/soup-view.tsx

Comment thread js/app/packages/app/component/settings/Shortcuts.tsx Outdated
@gbirman gbirman merged commit 61e618f into main Apr 17, 2026
23 checks passed
@gbirman gbirman deleted the capital-l-h-split-hotkeys branch April 17, 2026 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant