Allow using h-l and left-right arrow to move between the guild, channel, and messages pane.#97
Closed
an-inconspicuous-semicolon wants to merge 5 commits into
Closed
Conversation
When l or right is pressed over a guild, it will activate the guild and focus the channel pane. When h or left is pressed over a collapsed channel folder, it will unfocus the channel pane and return to the guild pane. When l or right is pressed over a channel, it will activate the channel and focus the message pane. When h or left is pressed when in the message pane, it will unfocus the message pane and return focus to the channel pane. Some tests had to be modified as they were expecting focus to stay on the current pane when activating channels or guilds. Disabled the `mouse_click_outside_composer_blurs_and_selects_clicked_row` test as it seems to be very broken.
… or guild folders
chojs23
reviewed
May 19, 2026
| None | ||
| } | ||
| DashboardAction::ActivateFocused => match focus { | ||
| DashboardAction::ActivateFocused | DashboardAction::OpenTreeNode => match focus { |
Owner
There was a problem hiding this comment.
In message pane, this makes l works like enter
Owner
|
Thanks for the PR! I’m not going to merge this because I’m planning broader changes around keybindings and pane navigation soon. The behavior you’re aiming for here, especially more natural If there are specific behaviors you’d like to see supported, please open a GitHub issue for them so we can discuss the expected behavior separately. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When l or right is pressed on a guild (not folder) it will activate the guild as usual, but it will also now focus the channels pane, ditto for channels but focusing the messages pane.
when h or left is pressed on the messages pane, the focus will be moved back to the channels pane, when done on the channels pane it will first collapse the current category with the next press moving focus back to the guild.
There is also a bugfix for collapsing channel categories and guild folders. The selection will now change to the category or folder header when collapsing, instead of just leaving the selection at the same index.
Why
When I tried the UI for the first time, I went in blindly and tried using j and k for moving up and down the guild selection, this worked as expected, but when I pressed l to try to move into the guild, I found that it felt inconsistent with how I usually work with TUI apps.
I then had to go open up the projects github page, and look for where the keybinds were noted down to find that I had to press 1, 2, 3, and 4 to move between the pages. This felt unnatural, as I would press j and k to move to the guild, l to activate it, but had to press 2 to go to the channels.
How
When a guild or channel is activated by any means, either by pressing l, the right arrow, or enter. The focus will be moved to the next pane after activation.
The
OpenTreeNodeandActivateFocuseddashboard actions were merged, as they now no longer do separate tasks.the
confirm_selected_guildandconfirm_selected_channel_commandwere renamed toconfirm_and_focus_selected_guildandconfirm_and_focus_selected_channel_commandrespectively to make it more clear that the functions now also move the focus.Testing
I wrote 4 tests to verify that the input path for going to and from each panel works, I also did this in the terminal itself to make sure it felt natural to use.
I did however have to disable the
mouse_click_outside_composer_blurs_and_selects_clicked_rowtest, as it seems to be completely borked. AFAIK the test is meant to check that you can click on a channel whilst writing a message, and the channel you clicked will be selected. Trying this manually with my changes shows that it works just fine, but the test believes that the wrong selection is made.A few existing tests had to be modified to adjust for the fact that the focus moves when activating guilds and channels, but nothing more than just adding a
state.focus_panecall after any activation.Tests were done in both kitty and alacritty within hyprland on arch.
cargo fmt --all --checkcargo clippy --all-targets --all-features -- -D warningscargo test --all-featuresChecklist
README.md, if behavior or workflows changed.