Merge pull request #11147 from Kilo-Org/catrielmuller/kilo-console-ui-improvements

feat: improve Kilo Console worktree review
This commit is contained in:
Catriel Müller
2026-06-12 10:34:37 -03:00
committed by GitHub
24 changed files with 1230 additions and 531 deletions
@@ -0,0 +1,23 @@
import { describe, expect, test } from "bun:test"
import { Schema } from "effect"
import { Config } from "@/config/config"
describe("Config.Info console UI", () => {
test("accepts console UI preferences", () => {
const config = Schema.decodeUnknownSync(Config.Info)({
console: { context_sidebar_width: 420, diff_style: "split" },
})
expect(config.console?.context_sidebar_width).toBe(420)
expect(config.console?.diff_style).toBe("split")
})
test("rejects invalid console UI preferences", () => {
expect(() => Schema.decodeUnknownSync(Config.Info)({ console: { context_sidebar_width: 249 } })).toThrow()
expect(() => Schema.decodeUnknownSync(Config.Info)({ console: { context_sidebar_width: 801 } })).toThrow()
expect(() => Schema.decodeUnknownSync(Config.Info)({ console: { context_sidebar_width: 420.5 } })).toThrow()
expect(() => Schema.decodeUnknownSync(Config.Info)({ console: { context_sidebar_width: Number.NaN } })).toThrow()
expect(() => Schema.decodeUnknownSync(Config.Info)({ console: { context_sidebar_width: Number.POSITIVE_INFINITY } })).toThrow()
expect(() => Schema.decodeUnknownSync(Config.Info)({ console: { diff_style: "side-by-side" } })).toThrow()
})
})