Skip to content

Commit 427a5b6

Browse files
committed
Bind the task panel toggle to Alt+T
The palette was the toggle's only entry point, so removing it would have taken the panel's visibility control with it. Alt+T sits alongside the other panel and mode chords, and the keymap row is exercised by the shortcut suite, so a binding that stops working fails rather than being read by an operator who then finds it does nothing.
1 parent a31bee9 commit 427a5b6

2 files changed

Lines changed: 12 additions & 20 deletions

File tree

src/tui-opentui/keybindings.test.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import { createHarness, withTestRenderer, type Harness } from "./harness.js"
2222
import { mountRunnerHost } from "./runner-host.js"
2323
import { openCommandSurface } from "./command-surfaces.js"
2424
import { focusOwner } from "./focus/focus-state.js"
25+
import { setChromeZones } from "./shell.js"
2526
import {
2627
appendStreamRow,
2728
createAppShell,
@@ -297,6 +298,17 @@ const PROBES: Readonly<Record<string, { readonly group: Group; readonly probe: P
297298
shell.mouseCapture = null
298299
},
299300
},
301+
"Alt+T": {
302+
group: "surfaces",
303+
probe: ({ h, shell, chords }) => {
304+
setChromeZones(shell, { task: [{ label: "a", status: "todo" }] })
305+
expect(shell.taskBox.visible).toBe(true)
306+
press(h, chords[0])
307+
expect(shell.taskBox.visible).toBe(false)
308+
press(h, chords[0])
309+
expect(shell.taskBox.visible).toBe(true)
310+
},
311+
},
300312
"Alt+E": {
301313
group: "surfaces",
302314
probe: ({ h, shell, chords }) => {

src/tui-opentui/wave6.test.ts

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import {
1919
openInsetOverlay,
2020
openPalette,
2121
replaceStreamRowAt,
22-
runPaletteAction,
2322
setChromeZones,
2423
streamRowAt,
2524
streamRowCount,
@@ -593,25 +592,6 @@ describe("CL-5731: task list panel", () => {
593592
)
594593
})
595594

596-
test("the palette 'toggle_task' action drives the same toggle", async () => {
597-
await withTestRenderer(
598-
async (h) => {
599-
const shell = createAppShell(h.renderer, {
600-
terminal: { columns: 80, rows: 24 },
601-
wireKeys: false,
602-
})
603-
try {
604-
setChromeZones(shell, { task: [{ label: "a", status: "todo" }] })
605-
expect(shell.taskBox.visible).toBe(true)
606-
runPaletteAction(shell, "toggle_task")
607-
expect(shell.taskBox.visible).toBe(false)
608-
} finally {
609-
shell.dispose()
610-
}
611-
},
612-
{ width: 80, height: 24 },
613-
)
614-
})
615595
})
616596

617597
describe("Wave 6: keyboard copy path", () => {

0 commit comments

Comments
 (0)