Spec 0094 gives Tab / S-Tab list nesting that "operate on every list line the selection spans, or just the cursor's line when there is no selection". The multi-line half is unreachable: a selection also shows the selection action menu, and that menu claims Tab first, to focus itself.
if !menu_focused {
if matches!(key.code, KeyCode::Tab) && !ctrl && !alt && !super_mod {
let menu = popup.selection_menu.get_or_insert_with(Default::default);
menu.focused = true;
return true;
}
return false;
}
(crates/cli/src/app/editor.rs ~lines 1100–1110 @ ad47152 — handle_playbook_selection_menu_key runs before the editor's own key match, so KeyCode::Tab => self.shift_playbook_indent(false) at ~line 811 never sees it.)
S-Tab is not intercepted, so it still outdents the selection. The pair is asymmetric: you can un-nest a multi-line selection but not nest it.
Repro
Document - one\n- two\n- three\n.
- Put the caret at the start, press
S-Down twice (selection (2, 14), menu appears).
- Press
Tab.
Observed: document unchanged; the selection menu takes focus.
after Tab with selection: '- one\n- two\n- three\n'
after S-Tab with selection: '- one\n- two\n - three\n' ← outdent applied
Without a selection, Tab indents the caret's line correctly (- three → - three), so the binding works — it is only shadowed while a selection exists, which is exactly when multi-line nesting is wanted.
Expected
Indenting a selected block of list items should work from the keyboard. Options:
Whichever is chosen, Tab and S-Tab should be symmetric.
Acceptance criteria
Found during a hands-on UX audit of the Playbook in the TUI and web UI.
Spec
0094givesTab/S-Tablist nesting that "operate on every list line the selection spans, or just the cursor's line when there is no selection". The multi-line half is unreachable: a selection also shows the selection action menu, and that menu claimsTabfirst, to focus itself.(
crates/cli/src/app/editor.rs~lines 1100–1110 @ ad47152 —handle_playbook_selection_menu_keyruns before the editor's own key match, soKeyCode::Tab => self.shift_playbook_indent(false)at ~line 811 never sees it.)S-Tabis not intercepted, so it still outdents the selection. The pair is asymmetric: you can un-nest a multi-line selection but not nest it.Repro
Document
- one\n- two\n- three\n.S-Downtwice (selection(2, 14), menu appears).Tab.Observed: document unchanged; the selection menu takes focus.
Without a selection,
Tabindents the caret's line correctly (- three→- three), so the binding works — it is only shadowed while a selection exists, which is exactly when multi-line nesting is wanted.Expected
Indenting a selected block of list items should work from the keyboard. Options:
Tabtoday, and that is itself undiscoverable — see tui: playbook selection menu is shown but unfocused — Enter replaces the selection instead of running it #1092),Tabindent while the menu is merely shown, and reserve menu navigation for when it is focused.Whichever is chosen,
TabandS-Tabshould be symmetric.Acceptance criteria
Tabwith a multi-line selection indents every list line the selection spans, per spec0094.S-Tabkeeps outdenting the same lines.Found during a hands-on UX audit of the Playbook in the TUI and web UI.