Open tasks with Right from the agents overview (#44344)

## What changed

Allow `Right` to open the selected task from the task list or an empty, focused composer. Preserve editor keybindings and guard against pending input, active popups, and offline state. Keep metadata editing unaffected and show the shortcut in navigation hints.

## Testing

Add regression tests for opening the current or highlighted task, preserving cursor movement and renaming, and preventing navigation while offline. Update snapshots to cover the new hints.

GitOrigin-RevId: 9fc01b62ad0829b964509ae6286a041fc4936b9d
This commit is contained in:
Eric Traut authored and copyberry committed 2026-09-10 00:07:20 +00:00
1 parent 1bff94edb6
commit 3ef3cecd20
13 files changed
+151 -9

No files matched your search

@@ -2,10 +2,26 @@
//!
//! Only local-daemon sessions enable this shortcut. Draft contents, transient input surfaces,
//! and explicit editor remaps take precedence over navigation.
//! The dashboard can also leave an empty editor with Right under the same input guards.
use super::*;
impl ChatComposer {
pub(crate) fn can_leave_empty_prompt_with_right(&self) -> bool {
let move_right = if self.draft.textarea.is_vim_normal_mode() {
&self.vim_normal_keymap.move_right
} else {
&self.editor_keymap.move_right
};
move_right.is_pressed(KeyCode::Right.into())
&& self.has_focus
&& self.draft.input_enabled
&& self.is_empty()
&& !self.is_in_paste_burst()
&& !self.popup_active()
&& !self.draft.textarea.is_vim_operator_pending()
}
pub(crate) fn set_agents_navigation_enabled(&mut self, enabled: bool) {
self.agents_navigation_enabled = enabled;
}