diff --git a/packages/tui/src/feature-plugins/system/which-key.tsx b/packages/tui/src/feature-plugins/system/which-key.tsx
index 646c02ff53..bcb1942f5d 100644
--- a/packages/tui/src/feature-plugins/system/which-key.tsx
+++ b/packages/tui/src/feature-plugins/system/which-key.tsx
@@ -168,7 +168,7 @@ function layout(value: unknown): Layout {
return "dock"
}
-function HomeHint(props: { api: TuiPluginApi; placement?: "center" | "start" }) {
+export function HomeHint(props: { api: TuiPluginApi; placement?: "center" | "start" }) {
const trigger = commandShortcut(props.api, command.toggle)
const look = createMemo(() => skin(props.api))
diff --git a/packages/tui/test/feature-plugins/which-key-home-hint.test.tsx b/packages/tui/test/feature-plugins/which-key-home-hint.test.tsx
new file mode 100644
index 0000000000..7b5decd868
--- /dev/null
+++ b/packages/tui/test/feature-plugins/which-key-home-hint.test.tsx
@@ -0,0 +1,48 @@
+/** @jsxImportSource @opentui/solid */
+import { expect, test } from "bun:test"
+import { testRender, useRenderer } from "@opentui/solid"
+import { createDefaultOpenTuiKeymap } from "@opentui/keymap/opentui"
+import { RGBA } from "@opentui/core"
+import type { JSX } from "solid-js"
+import type { TuiPluginApi } from "@opencode-ai/plugin/tui"
+import { OpencodeKeymapProvider } from "../../src/keymap"
+import { HomeHint } from "../../src/feature-plugins/system/which-key"
+
+const api = {
+ theme: { current: new Proxy({}, { get: () => RGBA.fromInts(200, 200, 200) }) },
+ keys: { formatSequence: () => "" },
+} as unknown as TuiPluginApi
+
+function Harness(props: { children: JSX.Element }) {
+ return {props.children}
+}
+
+async function hintIndent(placement?: "center" | "start") {
+ const app = await testRender(
+ () => (
+
+
+
+ ),
+ { width: 80, height: 10 },
+ )
+ try {
+ await app.renderOnce()
+ const line = app
+ .captureCharFrame()
+ .split("\n")
+ .find((row) => row.includes("shortcuts"))
+ expect(line).toBeDefined()
+ return line!.length - line!.trimStart().length
+ } finally {
+ app.renderer.destroy()
+ }
+}
+
+test("left-aligns the home hint when placement is start", async () => {
+ expect(await hintIndent("start")).toBe(0)
+})
+
+test("centers the home hint by default", async () => {
+ expect(await hintIndent()).toBeGreaterThan(0)
+})