diff --git a/docs/assets/tui-answer.png b/docs/assets/tui-answer.png index c34aec14..3a436449 100644 Binary files a/docs/assets/tui-answer.png and b/docs/assets/tui-answer.png differ diff --git a/docs/assets/tui-archived-chats.png b/docs/assets/tui-archived-chats.png index 676066bf..baf4ce24 100644 Binary files a/docs/assets/tui-archived-chats.png and b/docs/assets/tui-archived-chats.png differ diff --git a/docs/assets/tui-archived.png b/docs/assets/tui-archived.png index 65b9c534..9b89b731 100644 Binary files a/docs/assets/tui-archived.png and b/docs/assets/tui-archived.png differ diff --git a/docs/assets/tui-board-lanes.png b/docs/assets/tui-board-lanes.png index b2386dbb..1b92daeb 100644 Binary files a/docs/assets/tui-board-lanes.png and b/docs/assets/tui-board-lanes.png differ diff --git a/docs/assets/tui-board.png b/docs/assets/tui-board.png index 019a06ea..b0afcf92 100644 Binary files a/docs/assets/tui-board.png and b/docs/assets/tui-board.png differ diff --git a/docs/assets/tui-chat-compare.png b/docs/assets/tui-chat-compare.png index e61ec0fe..ccff727d 100644 Binary files a/docs/assets/tui-chat-compare.png and b/docs/assets/tui-chat-compare.png differ diff --git a/docs/assets/tui-chat-copy.png b/docs/assets/tui-chat-copy.png index 60008f72..ee1156b1 100644 Binary files a/docs/assets/tui-chat-copy.png and b/docs/assets/tui-chat-copy.png differ diff --git a/docs/assets/tui-chat-files.png b/docs/assets/tui-chat-files.png index 7dc16689..f9425b15 100644 Binary files a/docs/assets/tui-chat-files.png and b/docs/assets/tui-chat-files.png differ diff --git a/docs/assets/tui-chat-fork.png b/docs/assets/tui-chat-fork.png index 77a79d8e..3dd729da 100644 Binary files a/docs/assets/tui-chat-fork.png and b/docs/assets/tui-chat-fork.png differ diff --git a/docs/assets/tui-chat-handoff.png b/docs/assets/tui-chat-handoff.png index d1c7c6d2..c61d75c0 100644 Binary files a/docs/assets/tui-chat-handoff.png and b/docs/assets/tui-chat-handoff.png differ diff --git a/docs/assets/tui-chat-search.png b/docs/assets/tui-chat-search.png index 0434a2fb..b63550c4 100644 Binary files a/docs/assets/tui-chat-search.png and b/docs/assets/tui-chat-search.png differ diff --git a/docs/assets/tui-chat-skills-inline.png b/docs/assets/tui-chat-skills-inline.png index f50c22d1..42081f75 100644 Binary files a/docs/assets/tui-chat-skills-inline.png and b/docs/assets/tui-chat-skills-inline.png differ diff --git a/docs/assets/tui-chat-skills.png b/docs/assets/tui-chat-skills.png index af424382..df45268b 100644 Binary files a/docs/assets/tui-chat-skills.png and b/docs/assets/tui-chat-skills.png differ diff --git a/docs/assets/tui-chat.png b/docs/assets/tui-chat.png index 3824b801..1c24c4bc 100644 Binary files a/docs/assets/tui-chat.png and b/docs/assets/tui-chat.png differ diff --git a/docs/assets/tui-chats.png b/docs/assets/tui-chats.png index 4f191971..1723d59e 100644 Binary files a/docs/assets/tui-chats.png and b/docs/assets/tui-chats.png differ diff --git a/docs/assets/tui-create-pr.png b/docs/assets/tui-create-pr.png index b594f25c..de1f0d98 100644 Binary files a/docs/assets/tui-create-pr.png and b/docs/assets/tui-create-pr.png differ diff --git a/docs/assets/tui-daemon-adapters.png b/docs/assets/tui-daemon-adapters.png index d407926f..79b9ede9 100644 Binary files a/docs/assets/tui-daemon-adapters.png and b/docs/assets/tui-daemon-adapters.png differ diff --git a/docs/assets/tui-diff.png b/docs/assets/tui-diff.png index e2babaa6..2ec5cbf6 100644 Binary files a/docs/assets/tui-diff.png and b/docs/assets/tui-diff.png differ diff --git a/docs/assets/tui-follow-up.png b/docs/assets/tui-follow-up.png index 26fc3855..dc31f5c3 100644 Binary files a/docs/assets/tui-follow-up.png and b/docs/assets/tui-follow-up.png differ diff --git a/docs/assets/tui-global-pause.png b/docs/assets/tui-global-pause.png index 076c2b71..a3d925df 100644 Binary files a/docs/assets/tui-global-pause.png and b/docs/assets/tui-global-pause.png differ diff --git a/docs/assets/tui-handoff-form.png b/docs/assets/tui-handoff-form.png index e62c8849..287a7ccc 100644 Binary files a/docs/assets/tui-handoff-form.png and b/docs/assets/tui-handoff-form.png differ diff --git a/docs/assets/tui-handoff-task.png b/docs/assets/tui-handoff-task.png index c360185d..43504b70 100644 Binary files a/docs/assets/tui-handoff-task.png and b/docs/assets/tui-handoff-task.png differ diff --git a/docs/assets/tui-issue-form.png b/docs/assets/tui-issue-form.png index dbe81dde..b43d2288 100644 Binary files a/docs/assets/tui-issue-form.png and b/docs/assets/tui-issue-form.png differ diff --git a/docs/assets/tui-issue-handoff.png b/docs/assets/tui-issue-handoff.png index cd3e71f9..6054efe3 100644 Binary files a/docs/assets/tui-issue-handoff.png and b/docs/assets/tui-issue-handoff.png differ diff --git a/docs/assets/tui-issue-jira.png b/docs/assets/tui-issue-jira.png index e2712263..86b196c7 100644 Binary files a/docs/assets/tui-issue-jira.png and b/docs/assets/tui-issue-jira.png differ diff --git a/docs/assets/tui-issue-work.png b/docs/assets/tui-issue-work.png index 73001de5..78367b5d 100644 Binary files a/docs/assets/tui-issue-work.png and b/docs/assets/tui-issue-work.png differ diff --git a/docs/assets/tui-issue.png b/docs/assets/tui-issue.png index 535f83c0..6edb7f45 100644 Binary files a/docs/assets/tui-issue.png and b/docs/assets/tui-issue.png differ diff --git a/docs/assets/tui-issues-preview.png b/docs/assets/tui-issues-preview.png index 08e352d8..71ccdc15 100644 Binary files a/docs/assets/tui-issues-preview.png and b/docs/assets/tui-issues-preview.png differ diff --git a/docs/assets/tui-issues.png b/docs/assets/tui-issues.png index 857d22fc..aa88856c 100644 Binary files a/docs/assets/tui-issues.png and b/docs/assets/tui-issues.png differ diff --git a/docs/assets/tui-lane-diff.png b/docs/assets/tui-lane-diff.png index 8bfd0a6f..1efcf43d 100644 Binary files a/docs/assets/tui-lane-diff.png and b/docs/assets/tui-lane-diff.png differ diff --git a/docs/assets/tui-lane-output.png b/docs/assets/tui-lane-output.png index d43e299e..369bd2e6 100644 Binary files a/docs/assets/tui-lane-output.png and b/docs/assets/tui-lane-output.png differ diff --git a/docs/assets/tui-lanes.png b/docs/assets/tui-lanes.png index 750bf897..2753bc08 100644 Binary files a/docs/assets/tui-lanes.png and b/docs/assets/tui-lanes.png differ diff --git a/docs/assets/tui-loop.png b/docs/assets/tui-loop.png index d7d6e645..a780513a 100644 Binary files a/docs/assets/tui-loop.png and b/docs/assets/tui-loop.png differ diff --git a/docs/assets/tui-multi-select.png b/docs/assets/tui-multi-select.png index 9c761749..8237684d 100644 Binary files a/docs/assets/tui-multi-select.png and b/docs/assets/tui-multi-select.png differ diff --git a/docs/assets/tui-new-chat.png b/docs/assets/tui-new-chat.png index d4e20427..4e90a590 100644 Binary files a/docs/assets/tui-new-chat.png and b/docs/assets/tui-new-chat.png differ diff --git a/docs/assets/tui-new-task-fields.png b/docs/assets/tui-new-task-fields.png index d665544b..172481d5 100644 Binary files a/docs/assets/tui-new-task-fields.png and b/docs/assets/tui-new-task-fields.png differ diff --git a/docs/assets/tui-new-task.png b/docs/assets/tui-new-task.png index aa7a8a00..fe6fbd45 100644 Binary files a/docs/assets/tui-new-task.png and b/docs/assets/tui-new-task.png differ diff --git a/docs/assets/tui-project-overview.png b/docs/assets/tui-project-overview.png index 3ac09fa6..10731ba4 100644 Binary files a/docs/assets/tui-project-overview.png and b/docs/assets/tui-project-overview.png differ diff --git a/docs/assets/tui-project-picker.png b/docs/assets/tui-project-picker.png index 0c96b22e..95ff2275 100644 Binary files a/docs/assets/tui-project-picker.png and b/docs/assets/tui-project-picker.png differ diff --git a/docs/assets/tui-pull-requests.png b/docs/assets/tui-pull-requests.png index cd96edac..0c21b077 100644 Binary files a/docs/assets/tui-pull-requests.png and b/docs/assets/tui-pull-requests.png differ diff --git a/docs/assets/tui-repair.png b/docs/assets/tui-repair.png index 73e2c8b3..361e0232 100644 Binary files a/docs/assets/tui-repair.png and b/docs/assets/tui-repair.png differ diff --git a/docs/assets/tui-settings-branch.png b/docs/assets/tui-settings-branch.png index f897377b..8b19542c 100644 Binary files a/docs/assets/tui-settings-branch.png and b/docs/assets/tui-settings-branch.png differ diff --git a/docs/assets/tui-settings-confirm.png b/docs/assets/tui-settings-confirm.png index 9f6f4368..62fcb762 100644 Binary files a/docs/assets/tui-settings-confirm.png and b/docs/assets/tui-settings-confirm.png differ diff --git a/docs/assets/tui-settings.png b/docs/assets/tui-settings.png index 00e31784..72d96a6b 100644 Binary files a/docs/assets/tui-settings.png and b/docs/assets/tui-settings.png differ diff --git a/docs/assets/tui-skills.png b/docs/assets/tui-skills.png index 3ceb7e48..9ce6a992 100644 Binary files a/docs/assets/tui-skills.png and b/docs/assets/tui-skills.png differ diff --git a/docs/assets/tui-task-details.png b/docs/assets/tui-task-details.png index 65927f91..56aeb4a4 100644 Binary files a/docs/assets/tui-task-details.png and b/docs/assets/tui-task-details.png differ diff --git a/docs/assets/tui-task-issue.png b/docs/assets/tui-task-issue.png index 84cb3e33..c8f30f24 100644 Binary files a/docs/assets/tui-task-issue.png and b/docs/assets/tui-task-issue.png differ diff --git a/docs/assets/tui-task-output.png b/docs/assets/tui-task-output.png index 040de000..ae5ef58d 100644 Binary files a/docs/assets/tui-task-output.png and b/docs/assets/tui-task-output.png differ diff --git a/docs/assets/tui-task-overview-blocked.png b/docs/assets/tui-task-overview-blocked.png index 0b45e80b..7689c5a5 100644 Binary files a/docs/assets/tui-task-overview-blocked.png and b/docs/assets/tui-task-overview-blocked.png differ diff --git a/docs/assets/tui-task-overview-done.png b/docs/assets/tui-task-overview-done.png index f8b81184..46d0e50d 100644 Binary files a/docs/assets/tui-task-overview-done.png and b/docs/assets/tui-task-overview-done.png differ diff --git a/docs/assets/tui-task-overview-running.png b/docs/assets/tui-task-overview-running.png index 15a813b7..ec57232e 100644 Binary files a/docs/assets/tui-task-overview-running.png and b/docs/assets/tui-task-overview-running.png differ diff --git a/docs/assets/tui-task-pull.png b/docs/assets/tui-task-pull.png index 9eb16352..ae918ddd 100644 Binary files a/docs/assets/tui-task-pull.png and b/docs/assets/tui-task-pull.png differ diff --git a/docs/assets/tui-task-step-details.png b/docs/assets/tui-task-step-details.png index 7fa4bc96..9ed577f5 100644 Binary files a/docs/assets/tui-task-step-details.png and b/docs/assets/tui-task-step-details.png differ diff --git a/docs/assets/tui-task-steps-lanes.png b/docs/assets/tui-task-steps-lanes.png index f21e8a78..c0ce373f 100644 Binary files a/docs/assets/tui-task-steps-lanes.png and b/docs/assets/tui-task-steps-lanes.png differ diff --git a/docs/assets/tui-task-steps.png b/docs/assets/tui-task-steps.png index e1d190a3..c2af4de2 100644 Binary files a/docs/assets/tui-task-steps.png and b/docs/assets/tui-task-steps.png differ diff --git a/docs/assets/tui-task-workflow.png b/docs/assets/tui-task-workflow.png index 6280868a..9177b3cc 100644 Binary files a/docs/assets/tui-task-workflow.png and b/docs/assets/tui-task-workflow.png differ diff --git a/docs/assets/tui-task-workspace.png b/docs/assets/tui-task-workspace.png index 5e7aff68..bb7de272 100644 Binary files a/docs/assets/tui-task-workspace.png and b/docs/assets/tui-task-workspace.png differ diff --git a/docs/assets/tui-triggers.png b/docs/assets/tui-triggers.png index 29e85088..4f19f645 100644 Binary files a/docs/assets/tui-triggers.png and b/docs/assets/tui-triggers.png differ diff --git a/docs/assets/tui-workflow-editor.png b/docs/assets/tui-workflow-editor.png index 9334f2ed..e4985f41 100644 Binary files a/docs/assets/tui-workflow-editor.png and b/docs/assets/tui-workflow-editor.png differ diff --git a/docs/assets/tui-workflow-graph.png b/docs/assets/tui-workflow-graph.png index a4d25010..43f6d41d 100644 Binary files a/docs/assets/tui-workflow-graph.png and b/docs/assets/tui-workflow-graph.png differ diff --git a/docs/assets/tui-workflow-step.png b/docs/assets/tui-workflow-step.png index 4eb70cc1..3a97952c 100644 Binary files a/docs/assets/tui-workflow-step.png and b/docs/assets/tui-workflow-step.png differ diff --git a/docs/guides/tui.md b/docs/guides/tui.md index dd24f264..c9413853 100644 --- a/docs/guides/tui.md +++ b/docs/guides/tui.md @@ -3953,7 +3953,11 @@ can run. The status bar names the screen you are on, from 100 columns up, and offers that screen's main keys: at most six, in priority order, fewer on a narrow terminal. -It then tells you what is left: a dim **`+N`** after the action keys counts the +The keys that move work on — open, new, act, leave — rank ahead of the ones that +only read or move the cursor: on the task board that is `enter open`, `n new`, +`/ filter`, `space select` and one `↑↓←→ move`; on an issue, `a new task`, +`T chat`, `W comment` and `X close/reopen` come before the raw, links and copy +keys. With tasks selected, `esc clear (N)` leads the action keys. It then tells you what is left: a dim **`+N`** after the action keys counts the keys this surface has that the line is not showing — the ones past the main six, the ones that did not fit, the ones with no short form, and, on a narrow terminal, the task actions that did not fit. When a task offers more diff --git a/internal/keymap/fixed.go b/internal/keymap/fixed.go index 816b18c3..d4998610 100644 --- a/internal/keymap/fixed.go +++ b/internal/keymap/fixed.go @@ -305,10 +305,12 @@ var fixed = []Fixed{ {"pull requests", "down", "move the selection"}, {"chat search", "enter", "open the chat — on a turn's match, scrolled to that turn"}, {"chat search", "down", "move between results (↑/↓, pgup/pgdown)"}, + {"chat search", "esc", "close the search and go back to the tab you came from"}, {"compare", "tab", "move between the two sides (←/→ too)"}, {"compare", "enter", "open the focused side's chat"}, {"compare", "[", "keep the left side: the right one is archived and its branch deleted (asks first)"}, {"compare", "]", "keep the right side: the left one is archived and its branch deleted (asks first)"}, + {"compare", "esc", "go back to where the comparison was opened from"}, {"issues", "tab", "switch to the next main tab"}, {"issues", "down", "move the selection"}, {"issues", "space", "select this pending hand-off issue for a handoff"}, diff --git a/internal/tui/bindings.go b/internal/tui/bindings.go index 42c5d549..d455ac77 100644 --- a/internal/tui/bindings.go +++ b/internal/tui/bindings.go @@ -328,6 +328,12 @@ type binding struct { // the operation's *default*, and registry() swaps in the effective key // and rewrites the hint to match; a row with no op is fixed. op keymap.Op + // echo marks a panel row that only puts a global key on this surface's + // footer (#1073): `n new` on the task board. It does not claim the key — + // panelOwnsKey skips it, so the global binding still answers — and it is + // kept out of the palette and the help sheet's panel list, where the + // global row already stands. + echo bool // unbound marks a row the effective keymap left without a key (task // 128): an operation whose default a user binding took on a lenient // load, or a fixed key shadowed on its surface. key and hint are empty; @@ -519,15 +525,19 @@ var bindings = []binding{ // because replaying tab from the palette would switch from a screen the // palette already covered, and the screen rows are the palette's way. {key: "tab", label: mainTabLabel, scope: scopePanel, context: ctxTasks, hint: "tab next tab", priority: 0, mainTab: true, noPalette: true}, - {key: "down", label: "move up and down the column (↑/↓)", scope: scopePanel, context: ctxTasks, hint: "↑↓ card", priority: 3}, + // One hint for the four arrows (#1073): moving is what every board + // reader already knows, so it takes one of the six slots, not two, and + // `n new` gets the other. The board's columns are called columns. + {key: "down", label: "move up and down the column (↑/↓)", scope: scopePanel, context: ctxTasks, hint: "↑↓←→ move", priority: 5}, {op: keymap.OpenRow, key: "enter", label: "open the selected task in its full-screen workspace", scope: scopePanel, context: ctxTasks, hint: "enter open", priority: 1, term: termOpenRow}, - {op: keymap.Filter, key: "/", label: "filter by id, title, state or issue", scope: scopePanel, context: ctxTasks, hint: "/ filter", priority: 2, term: termFilter}, - {key: "left", label: "move to the column on the left", scope: scopePanel, context: ctxTasks, hint: "←/→ lane", priority: 4}, - {key: "right", label: "move to the column on the right", scope: scopePanel, context: ctxTasks, priority: 4, aliased: true}, + {op: keymap.New, key: "n", label: "new task — for the project you are looking at", scope: scopePanel, context: ctxTasks, hint: "n new", priority: 2, echo: true, noPalette: true}, + {op: keymap.Filter, key: "/", label: "filter by id, title, state or issue", scope: scopePanel, context: ctxTasks, hint: "/ filter", priority: 3, term: termFilter}, + {key: "left", label: "move to the column on the left", scope: scopePanel, context: ctxTasks, priority: 5, aliased: true}, + {key: "right", label: "move to the column on the right", scope: scopePanel, context: ctxTasks, priority: 5, aliased: true}, {key: "f", label: "fold or open the issue group under the cursor", scope: scopePanel, context: ctxTasks, hint: "f fold", priority: 8}, // Lanes under a fan-out parent's card (boardcardlanes.go, issue #316). {key: "L", label: "show or hide a fan-out's lanes under its card — on a lane, its own lanes, or back to its parent", scope: scopePanel, context: ctxTasks, hint: "L lanes", priority: 8}, - {key: "space", label: "select this task for a bulk action — the action keys then act on every selected task (space again deselects, esc clears)", scope: scopePanel, context: ctxTasks, hint: "space select", priority: 5}, + {key: "space", label: "select this task for a bulk action — the action keys then act on every selected task (space again deselects, esc clears)", scope: scopePanel, context: ctxTasks, hint: "space select", priority: 4}, {op: keymap.AttentionFilter, key: "H", label: "show only the tasks that need a human — awaiting input, awaiting approval, blocked, or a fan-out whose lane is (H again shows every task)", scope: scopePanel, context: ctxTasks, hint: "H needs you", priority: 6, term: termAttention}, {key: "V", label: "select every task the filter is showing, or clear that selection", scope: scopePanel, context: ctxTasks, priority: 6}, // Folding the issue groups (task 150.6). C/O are the diff pane's two @@ -724,6 +734,9 @@ var bindings = []binding{ // Chat search (task 158). {key: "enter", label: "open the chat — on a turn's match, scrolled to that turn", scope: scopePanel, context: ctxChatSearch, hint: "enter open", priority: 1}, {key: "down", label: "move between results (↑/↓, pgup/pgdown)", scope: scopePanel, context: ctxChatSearch, hint: "↑/↓ move", priority: 2}, + // The way back has a row of its own (#1073): nothing else on the line + // says how to leave. + {key: "esc", label: "close the search and go back to the tab you came from", scope: scopePanel, context: ctxChatSearch, hint: "esc back", priority: 3, noPalette: true}, // The compare split view (task 171 decisions 8 and 9). Fixed keys: no // text field has the keyboard, and `[`/`]` read as left and right. @@ -732,6 +745,7 @@ var bindings = []binding{ {key: "[", label: "keep the left side: the right one is archived and its branch deleted (asks first)", scope: scopePanel, context: ctxCompare, hint: "[ keep left", priority: 3}, {key: "]", label: "keep the right side: the left one is archived and its branch deleted (asks first)", scope: scopePanel, context: ctxCompare, hint: "] keep right", priority: 4}, {op: keymap.Refresh, key: "R", label: "read both sides again", scope: scopePanel, context: ctxCompare, hint: "R reload", priority: 5, term: termRefresh}, + {key: "esc", label: "go back to where the comparison was opened from", scope: scopePanel, context: ctxCompare, hint: "esc back", priority: 6, noPalette: true}, {op: keymap.ExportChat, key: "alt+e", label: chatExportLabel, scope: scopePanel, context: ctxChats, priority: 7}, // Task 161 decision 6: the prompt is prefilled with the title, and the // branch keeps the slug it was cut with. @@ -800,7 +814,9 @@ var bindings = []binding{ // is a combination — the composer owns every printable key — and because // the textarea binds ctrl+w, ctrl+d and ctrl+k to editing. {key: chatCloseKey, label: "close this chat — a chat opened on a task, whose worktree and branch stay and which unlocks, or on an issue, whose main worktree is freed for the next main task (asks first)", scope: scopePanel, context: ctxChat, hint: "ctrl+q close", priority: 6}, - {key: "esc", label: "back to where the chat was opened", scope: scopePanel, context: ctxChat, hint: "esc back", priority: 7}, + // Ahead of hand-off and close (#1073): leaving is the one move every + // visit ends with. + {key: "esc", label: "back to where the chat was opened", scope: scopePanel, context: ctxChat, hint: "esc back", priority: 3}, {key: rawToggleKey, label: "show the assistant's original Markdown instead of the rendered view", scope: scopePanel, context: ctxChat, hint: "ctrl+o raw", priority: 8}, {key: copyPickKey, label: "copy an assistant message, its plain text, or one of its code blocks", scope: scopePanel, context: ctxChat, hint: "ctrl+y copy", priority: 9}, {key: linkPickKey, label: "list the links in the assistant's messages — open one in a browser or copy it", scope: scopePanel, context: ctxChat, hint: "ctrl+l links", priority: 10}, @@ -1225,14 +1241,14 @@ var bindings = []binding{ {op: keymap.ChatWith, key: "alt+t", label: issueChatWithLabel, scope: scopePanel, context: ctxIssues, priority: 8}, // The issue detail (§15 view 13). {op: keymap.OpenRow, key: "enter", label: "open the selected row — a task's workspace or a chat, and esc comes back here; on the Issue tab's tasks-and-chats line, switch to the Work tab", scope: scopePanel, context: ctxIssue, hint: "enter open", priority: 1, term: termOpenRow}, - {op: keymap.Browser, key: "o", label: "open an imported issue's page in a browser", scope: scopePanel, context: ctxIssue, hint: "o browser", priority: 2, term: termBrowser}, - {key: rawToggleKey, label: "show the description's and comments' original Markdown instead of the rendered view", scope: scopePanel, context: ctxIssue, hint: "ctrl+o raw", priority: 3}, - {key: linkPickKey, label: "list the links in the description and comments, and the source page — open one in a browser or copy it", scope: scopePanel, context: ctxIssue, hint: "ctrl+l links", priority: 4}, - {key: copyPickKey, label: "copy the title, the description, a comment or the source URL", scope: scopePanel, context: ctxIssue, hint: "ctrl+y copy", priority: 4}, - {op: keymap.Refresh, key: "R", label: "re-read the issue — never a sync with a remote tracker", scope: scopePanel, context: ctxIssue, hint: "R refresh", priority: 5, term: termRefresh}, + {op: keymap.Browser, key: "o", label: "open an imported issue's page in a browser", scope: scopePanel, context: ctxIssue, hint: "o browser", priority: 10, term: termBrowser}, + {key: rawToggleKey, label: "show the description's and comments' original Markdown instead of the rendered view", scope: scopePanel, context: ctxIssue, hint: "ctrl+o raw", priority: 11}, + {key: linkPickKey, label: "list the links in the description and comments, and the source page — open one in a browser or copy it", scope: scopePanel, context: ctxIssue, hint: "ctrl+l links", priority: 11}, + {key: copyPickKey, label: "copy the title, the description, a comment or the source URL", scope: scopePanel, context: ctxIssue, hint: "ctrl+y copy", priority: 11}, + {op: keymap.Refresh, key: "R", label: "re-read the issue — never a sync with a remote tracker", scope: scopePanel, context: ctxIssue, hint: "R refresh", priority: 9, term: termRefresh}, // The page is scroll-first (#792): the arrows scroll it, moving the // selection only among the Main worktree and task rows on screen. - {key: "down", label: "scroll a line; on screen, move the selection between the Main worktree section and the linked tasks first (↑/↓)", scope: scopePanel, context: ctxIssue, hint: "↑↓ scroll", priority: 6}, + {key: "down", label: "scroll a line; on screen, move the selection between the Main worktree section and the linked tasks first (↑/↓)", scope: scopePanel, context: ctxIssue, hint: "↑↓ scroll", priority: 9}, {key: "pgdown", label: "scroll a page (pgup/pgdown, space)", scope: scopePanel, context: ctxIssue, priority: 7}, {key: "ctrl+d", label: "scroll half a page (ctrl+u/ctrl+d)", scope: scopePanel, context: ctxIssue, priority: 7}, {key: "end", label: "jump to the end of the page (home/end, g/G)", scope: scopePanel, context: ctxIssue, priority: 7}, @@ -1241,18 +1257,18 @@ var bindings = []binding{ {key: "tab", label: "move between the Issue and Work tabs (shift+tab goes back)", scope: scopePanel, context: ctxIssue, hint: "tab work", priority: 6}, {key: "]", label: "move to the next tab ([ goes back)", scope: scopePanel, context: ctxIssue, priority: 7}, {op: keymap.New, key: "n", label: "file a new issue in this issue's project", scope: scopePanel, context: ctxIssue, hint: "n new", priority: 8}, - {op: keymap.Add, key: "a", label: "create a task from this issue — the form is prefilled from it and editable first, and offers a separate worktree once the issue has a main branch", scope: scopePanel, context: ctxIssue, hint: "a new task", priority: 8, term: termAdd}, - {key: issueEditKey, label: "edit the issue in a form", scope: scopePanel, context: ctxIssue, hint: "i edit", priority: 9}, - {key: issueStateKey, label: "close or reopen the issue — only what the daemon offers", scope: scopePanel, context: ctxIssue, hint: "X close/reopen", priority: 10}, - {key: issueMoveKey, label: issueMoveLabel, scope: scopePanel, context: ctxIssue, hint: "m move", priority: 10}, + {op: keymap.Add, key: "a", label: "create a task from this issue — the form is prefilled from it and editable first, and offers a separate worktree once the issue has a main branch", scope: scopePanel, context: ctxIssue, hint: "a new task", priority: 2, term: termAdd}, + {key: issueEditKey, label: "edit the issue in a form", scope: scopePanel, context: ctxIssue, hint: "i edit", priority: 7}, + {key: issueStateKey, label: "close or reopen the issue — only what the daemon offers", scope: scopePanel, context: ctxIssue, hint: "X close/reopen", priority: 5}, + {key: issueMoveKey, label: issueMoveLabel, scope: scopePanel, context: ctxIssue, hint: "m move", priority: 7}, // The thread (task 130 decision 24, 130.16): a local comment, written in // $EDITOR. Withheld on an issue whose remote is live, which takes // no comment here — nothing is ever posted to its remote. - {op: keymap.Comment, key: "W", label: "write a comment in $EDITOR — saved empty, nothing is posted; never on an issue mirrored from a remote tracker", scope: scopePanel, context: ctxIssue, hint: "W comment", priority: 10, term: termComment}, + {op: keymap.Comment, key: "W", label: "write a comment in $EDITOR — saved empty, nothing is posted; never on an issue mirrored from a remote tracker", scope: scopePanel, context: ctxIssue, hint: "W comment", priority: 4, term: termComment}, {op: keymap.Delete, key: "D", label: "delete the issue permanently (asks first; never deletes at the issue's source)", scope: scopePanel, context: ctxIssue, priority: 11, term: termDelete}, - {op: keymap.Ready, key: ".", label: "mark an idle in-progress issue ready, or a pending hand-off issue not ready", scope: scopePanel, context: ctxIssue, hint: ". ready", priority: 8, term: termReady}, - {op: keymap.Return, key: ",", label: "return a claimed or waiting issue from its handoff (asks first)", scope: scopePanel, context: ctxIssue, hint: ", return", priority: 8, term: termReturn}, - {op: keymap.Chat, key: "T", label: issueChatLabel, scope: scopePanel, context: ctxIssue, hint: "T chat", priority: 8}, + {op: keymap.Ready, key: ".", label: "mark an idle in-progress issue ready, or a pending hand-off issue not ready", scope: scopePanel, context: ctxIssue, hint: ". ready", priority: 7, term: termReady}, + {op: keymap.Return, key: ",", label: "return a claimed or waiting issue from its handoff (asks first)", scope: scopePanel, context: ctxIssue, hint: ", return", priority: 7, term: termReturn}, + {op: keymap.Chat, key: "T", label: issueChatLabel, scope: scopePanel, context: ctxIssue, hint: "T chat", priority: 3}, {op: keymap.ChatWith, key: "alt+t", label: issueChatWithLabel, scope: scopePanel, context: ctxIssue, priority: 8}, // The issue form and prompt own the keyboard and print their own key diff --git a/internal/tui/bindings_test.go b/internal/tui/bindings_test.go index b58ec991..6e5f591a 100644 --- a/internal/tui/bindings_test.go +++ b/internal/tui/bindings_test.go @@ -13,6 +13,7 @@ import ( uv "github.com/charmbracelet/ultraviolet" "github.com/lezli01/vincent/internal/apiclient" + "github.com/lezli01/vincent/internal/keymap" "github.com/lezli01/vincent/internal/nerdfont" "github.com/lezli01/vincent/internal/taskstate" "github.com/lezli01/vincent/internal/tui/workflowgraph" @@ -491,6 +492,19 @@ func declaredFieldRow(t *testing.T, n *newTask, name string) int { // the scrolling itself to the follow and mouse-wheel tests. var panelKeyProbes = map[bindingContext]map[string]func(*testing.T){ ctxTasks: { + // An echo row (#1073): the board shows `n new`, and the root's own + // binding answers it — the board must not claim the key. + "n": func(t *testing.T) { + m := connectedRoot(t) + m.Update(selectViewMsg{id: viewHome}) + if m.panelOwnsKey("n") { + t.Fatal("the board claims n, so the root would yield it") + } + m.Update(keyPress(opKey(keymap.New))) + if m.active != viewNewTask { + t.Fatalf("n on the board opened %v, want the new-task form", m.active) + } + }, "H": func(t *testing.T) { s, _ := newShellFixture(t, task(1, stateRunning), task(2, stateBlocked)) s.focus = panelTasks @@ -914,6 +928,13 @@ var panelKeyProbes = map[bindingContext]map[string]func(*testing.T){ }, }, ctxCompare: { + "esc": func(t *testing.T) { + v := compareFixture() + _, cmd := v.updateKey(registryKey(t, "esc")) + if msg, ok := drain(cmd).(selectViewMsg); !ok || msg.id == viewCompare { + t.Fatalf("esc produced %#v, want a way back", drain(cmd)) + } + }, "tab": func(t *testing.T) { v := compareFixture() v.updateKey(registryKey(t, "tab")) @@ -952,6 +973,13 @@ var panelKeyProbes = map[bindingContext]map[string]func(*testing.T){ }, }, ctxChatSearch: { + "esc": func(t *testing.T) { + v := chatSearchFixture() + _, cmd := v.updateKey(registryKey(t, "esc")) + if _, ok := drain(cmd).(backToTabMsg); !ok { + t.Fatalf("esc produced %#v, want back to the tab", drain(cmd)) + } + }, "enter": func(t *testing.T) { v := chatSearchFixture() _, cmd := v.updateKey(registryKey(t, "enter")) diff --git a/internal/tui/footer.go b/internal/tui/footer.go index e16cfa78..79244891 100644 --- a/internal/tui/footer.go +++ b/internal/tui/footer.go @@ -433,7 +433,7 @@ func footerMoreSeg(n int) footerSeg { func footerCountable(rows []binding) int { n := 0 for _, b := range rows { - if !b.noPalette && !b.aliased { + if (!b.noPalette || b.echo) && !b.aliased { n++ } } @@ -561,6 +561,13 @@ func footerAdmitActions(rest []footerSeg, countable, avail int) []footerSeg { // status. func footerRestSegs(bar *actionBar, target taskActions, attention attentionTally, retry bool) []footerSeg { segs := make([]footerSeg, 0, 8) + if target.bulk() { + // The way out of a selection leads it (#1073): esc clears it, and + // nothing else on the line says the selection is there to clear. + segs = append(segs, footerSeg{ + text: styleKey.Render("esc") + " " + fmt.Sprintf("clear (%d)", len(target.marked)), key: "esc", + }) + } if bar != nil && (target.id != 0 || target.bulk()) { for _, o := range footerActionOps { if !target.has(o.action) || (o.label != "" && target.bulk()) { @@ -648,7 +655,9 @@ func footerHintSegs(rows []binding) []footerSeg { // A hinted row the palette does not list — the popup surfaces — is // shown but never counted: `+N` points at a palette that would list // none of these keys. - seg := footerSeg{key: r.key, counts: !r.noPalette} + // An echo row is a global key the palette lists under its own global + // row, so it counts as one of the surface's main keys (#1073). + seg := footerSeg{key: r.key, counts: !r.noPalette || r.echo} key, rest, ok := strings.Cut(r.hint, " ") if !ok { seg.text = styleKey.Render(r.hint) diff --git a/internal/tui/footer_test.go b/internal/tui/footer_test.go index 5784c22a..f86983ea 100644 --- a/internal/tui/footer_test.go +++ b/internal/tui/footer_test.go @@ -83,7 +83,7 @@ func footerMore(line string) int { func footerHiddenRows(line string, rows []binding) int { n := 0 for _, b := range rows { - if b.noPalette || b.aliased { + if (b.noPalette && !b.echo) || b.aliased { continue } if b.hint != "" && strings.Contains(line, b.hint) { diff --git a/internal/tui/root.go b/internal/tui/root.go index deb8757b..85e32e27 100644 --- a/internal/tui/root.go +++ b/internal/tui/root.go @@ -1107,7 +1107,7 @@ type footerBinder interface { // the collision rather than a list of view special cases in updateKey. func (m *root) panelOwnsKey(key string) bool { for _, b := range bindingsFor(m.activeContext()) { - if b.key == key { + if b.key == key && !b.echo { return true } } @@ -1119,7 +1119,7 @@ func (m *root) panelOwnsKey(key string) bool { // rows that only describe the root's switch do not count as the surface's. func (m *root) panelOwnsLocalKey(key string) bool { for _, b := range bindingsFor(m.activeContext()) { - if b.key == key && !b.mainTab { + if b.key == key && !b.mainTab && !b.echo { return true } }