Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@fcoury
Copy link
Owner

@fcoury fcoury commented Dec 14, 2025

Summary

Add vim-style directional panel navigation using Ctrl+HJKL as global keybindings in Normal mode.

Navigation is spatially precise based on the 2x2 panel layout:

┌─────────────────┬──────────────────┐
│  Connections    │  Query Editor    │  ← Top row
├─────────────────┼──────────────────┤
│  Schema         │  Results Grid    │  ← Bottom row
└─────────────────┴──────────────────┘

Keybindings

Key Action
Ctrl+H Move left (Query→Connections, Grid→Schema)
Ctrl+J Move down (Query→Grid, Connections→Schema)
Ctrl+K Move up (Grid→Query, Schema→Connections)
Ctrl+L Move right (Connections→Query, Schema→Grid)

Behavior

  • Navigation is a no-op at boundaries (no panel in that direction)
  • Navigation is a no-op when sidebar is hidden (for Ctrl+H/L)
  • Only works in Normal mode (not Insert mode)
  • Pickers continue to capture Ctrl+J/K for their own item navigation

Changes

  • Added PanelDirection enum to state.rs
  • Added handle_panel_navigation() and calculate_focus_for_direction() methods
  • Integrated into global key handling in Normal mode
  • Added 12 comprehensive unit tests

Testing

  • All 331 tests pass
  • Clippy clean
  • Manual testing of all navigation combinations

Add directional panel navigation using Ctrl+HJKL in Normal mode.
Navigation is spatially precise based on the 2x2 panel layout:

  ┌─────────────────┬──────────────────┐
  │  Connections    │  Query Editor    │
  ├─────────────────┼──────────────────┤
  │  Schema         │  Results Grid    │
  └─────────────────┴──────────────────┘

- Ctrl+H: Move left (Query→Connections, Grid→Schema)
- Ctrl+J: Move down (Query→Grid, Connections→Schema)
- Ctrl+K: Move up (Grid→Query, Schema→Connections)
- Ctrl+L: Move right (Connections→Query, Schema→Grid)

Navigation is a no-op when:
- At a boundary (no panel in that direction)
- Sidebar is hidden (for Ctrl+H/L)
- In Insert mode
- Picker is active (pickers capture Ctrl+J/K for their own navigation)
@coderabbitai
Copy link

coderabbitai bot commented Dec 14, 2025

Warning

Rate limit exceeded

@fcoury has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 11 minutes and 48 seconds before requesting another review.

⌛ 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.

📥 Commits

Reviewing files that changed from the base of the PR and between c20a3bc and 100a7e9.

📒 Files selected for processing (4)
  • crates/tsql/src/app/app.rs (4 hunks)
  • crates/tsql/src/app/mod.rs (1 hunks)
  • crates/tsql/src/app/state.rs (1 hunks)
  • plans/feat-ctrl-hjkl-panel-navigation.md (1 hunks)
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/new-pane-movement

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

@fcoury fcoury merged commit f326d2c into master Dec 14, 2025
6 checks passed
@fcoury fcoury deleted the feat/new-pane-movement branch December 14, 2025 20:04
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.

2 participants