Skip to content

Commit e705c90

Browse files
sahrizviclaude
andcommitted
test(tui): production command names in the dialog test; exercise the adapter gate
The dialog actions are named `altimate.skill.list.*` as skill-ops declares them, and the adapter test carries a row-bound action with no `disabled` function, so the adapter's own gate is what stops it with no row (a dropped gate fails the test). (bot review) Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_012Q51zFUmPg1WwtS5CrGJE6
1 parent 995bb3b commit e705c90

1 file changed

Lines changed: 11 additions & 7 deletions

File tree

‎packages/tui/test/ui/dialog-select-actions.test.tsx‎

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,18 +52,22 @@ async function mount(
5252
// `standalone` so they fire with no highlighted row.
5353
const actions = [
5454
{
55-
command: "altimate.skill.actions",
55+
command: "altimate.skill.list.actions",
5656
title: "Actions",
5757
disabled: (o: { value: string } | undefined) => o === undefined || o.value === "__install__",
5858
onTrigger: (o: { value: string } | undefined) => triggered.push(`actions:${o?.value}`),
5959
},
60-
{ command: "altimate.skill.create", title: "New", standalone: true, onTrigger: () => triggered.push("create") },
61-
{ command: "altimate.skill.install", title: "Install", standalone: true, onTrigger: () => triggered.push("install") },
60+
{ command: "altimate.skill.list.create", title: "New", standalone: true, onTrigger: () => triggered.push("create") },
61+
{ command: "altimate.skill.list.install", title: "Install", standalone: true, onTrigger: () => triggered.push("install") },
62+
// Row-bound with NO `disabled` function: the shape the adapter's own gate exists
63+
// for (the core cannot refuse it before `onTrigger`). (bot review)
64+
{ command: "altimate.skill.list.plain", title: "Plain", onTrigger: (o: { value: string } | undefined) => triggered.push(`plain:${o?.value}`) },
6265
]
6366
const bindings = opts.bindings ?? [
64-
{ key: "ctrl+a", cmd: "altimate.skill.actions" },
65-
{ key: "ctrl+e", cmd: "altimate.skill.create" },
66-
{ key: "ctrl+g", cmd: "altimate.skill.install" },
67+
{ key: "ctrl+a", cmd: "altimate.skill.list.actions" },
68+
{ key: "ctrl+e", cmd: "altimate.skill.list.create" },
69+
{ key: "ctrl+g", cmd: "altimate.skill.list.install" },
70+
{ key: "ctrl+p", cmd: "altimate.skill.list.plain" },
6771
]
6872
const options = [
6973
{ title: "alpha", value: "alpha" },
@@ -262,7 +266,7 @@ test("through the plugin API adapter: chords fire, standalone survives the mappi
262266
expect(triggered).toEqual(["actions:alpha"])
263267
for (const ch of "zzz") app.mockInput.pressKey(ch)
264268
await Bun.sleep(50)
265-
app.mockInput.pressKey("a", { ctrl: true })
269+
app.mockInput.pressKey("p", { ctrl: true }) // row-bound, no `disabled`: the adapter gate alone stops it (ctrl+p is only the palette outside a dialog)
266270
await Bun.sleep(100)
267271
expect(triggered).toEqual(["actions:alpha"])
268272
app.mockInput.pressKey("g", { ctrl: true })

0 commit comments

Comments
 (0)