fix(tui): limit shell list commands to one line (#48184)

Co-authored-by: jlongster <17031+jlongster@users.noreply.github.com>
This commit is contained in:
opencode-agent[bot]
2026-09-09 11:09:32 -04:00
committed by GitHub
Unverified
parent e10408b219
commit c0cb1c7a91
2 changed files with 13 additions and 2 deletions
@@ -136,7 +136,7 @@ export function ShellTab(props: { sessionID: string }) {
attributes={active() ? TextAttributes.BOLD : undefined}
wrapMode="none"
>
{shell.command}
{shell.command.split("\n", 1)[0]}
</text>
</box>
)
@@ -23,7 +23,7 @@ const sessions = {
"child-b": session("child-b", "Second", "parent"),
}
const shells = [shell("sh-a", "bun test"), shell("sh-b", "bun dev")]
const shells = [shell("sh-a", "bun test"), shell("sh-b", "bun dev"), shell("sh-c", "python3 - <<'PY'\nimport json")]
async function renderComposer(
defaultTab: "subagents" | "shell",
@@ -191,6 +191,17 @@ test("disabled shell bindings have no component fallbacks", async () => {
}
})
test("shell list shows one line per command", async () => {
const composer = await renderComposer("shell", {})
try {
const frame = composer.app.captureCharFrame()
expect(frame).toContain("python3 - <<'PY'")
expect(frame).not.toContain("import json")
} finally {
composer.app.renderer.destroy()
}
})
test("configured composer bindings work with a focused textarea", async () => {
const composer = await renderComposer("subagents", { "composer.shell.kill": "ctrl+u" }, true)
try {