fix keymap fallback priority and TUI config diagnostics (#27384)

This commit is contained in:
Sebastian
2026-05-13 23:00:48 +02:00
committed by GitHub
parent c197fd92b7
commit 3b7a5e783d
7 changed files with 111 additions and 36 deletions

View File

@@ -439,6 +439,25 @@ it.instance("merges keybind overrides across precedence layers", () =>
),
)
it.instance("ignores unknown keybind names without dropping valid overrides from the same file", () =>
withCleanState(
Effect.gen(function* () {
const fs = yield* AppFileSystem.Service
const test = yield* TestInstance
yield* fs.writeJson(path.join(Global.Path.config, "tui.json"), {
keybinds: {
session_delete: "ctrl+d",
not_a_real_keybind: "ctrl+q",
},
})
const config = yield* getTuiConfig(test.directory)
expect(config.keybinds.get("session.delete")?.[0]?.key).toBe("ctrl+d")
expect(config.keybinds.get("not_a_real_keybind")).toEqual([])
}),
),
)
it.instance("resolves keybind lookup from canonical keybinds", () =>
withCleanState(
Effect.gen(function* () {