From 71f0bd829a6490785dcd6b6f59be783d801d6c35 Mon Sep 17 00:00:00 2001 From: Sawyer Cutler Date: Thu, 15 Oct 2026 21:50:15 -0700 Subject: [PATCH] feat(tui): paint overlay choices with native Select --- src/tui/overlay-paint.test.ts | 8 +++----- src/tui/overlay-view.ts | 4 +++- src/tui/shell/overlay-list.ts | 4 +++- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/tui/overlay-paint.test.ts b/src/tui/overlay-paint.test.ts index 6b5352c4c..4d75355f5 100644 --- a/src/tui/overlay-paint.test.ts +++ b/src/tui/overlay-paint.test.ts @@ -117,17 +117,15 @@ describe("overlay host never shares cells with the prompt border", () => { size, ); - const expected = [ - ` ▶ ${ITEMS[0]}`, - ...ITEMS.slice(1).map((i) => ` ${i}`), - ]; + // Selection is text color only: no marker column, so each row is the label. + const expected = ITEMS.map((i) => ` ${i}`); // Row 0 is the title/how-to line: the supplied title must show; its // exact hint wording is not part of this contract. expect(interior[0]).toContain("model"); expectCleanInterior(interior.slice(1), expected); // The selected row must be intact, not overwritten by the model label. - expect(interior).toContain(` ▶ ${ITEMS[0]}`); + expect(interior).toContain(` ${ITEMS[0]}`); for (const row of interior) { expect(row.includes(MODEL_LABEL)).toBe(false); expect(row.includes("alice")).toBe(false); diff --git a/src/tui/overlay-view.ts b/src/tui/overlay-view.ts index 471fa34f1..5afd0d073 100644 --- a/src/tui/overlay-view.ts +++ b/src/tui/overlay-view.ts @@ -368,6 +368,7 @@ export function createOverlayView(ctx: RenderContext) { ); list.setHeight(list.height, 1); list.select.showSelectionIndicator = false; + list.select.showScrollIndicator = false; list.select.options = lines.map((line) => ({ name: line, description: "", @@ -444,7 +445,8 @@ export function createOverlayView(ctx: RenderContext) { // nothing wraps, nothing clips. A cramped host may already have dropped // that air. list.setHeight(list.height, list.rowsPerItem); - list.select.showSelectionIndicator = true; + list.select.showSelectionIndicator = false; + list.select.showScrollIndicator = false; list.select.options = presentation.items.map((label, i) => { const id = presentation.itemIds?.[i]; return id === undefined diff --git a/src/tui/shell/overlay-list.ts b/src/tui/shell/overlay-list.ts index cb32a0204..96300053f 100644 --- a/src/tui/shell/overlay-list.ts +++ b/src/tui/shell/overlay-list.ts @@ -171,7 +171,9 @@ export function createOverlayList( width: "100%", flexShrink: 0, showDescription: shape.rowsPerItem > 1, - showSelectionIndicator: true, + showSelectionIndicator: false, + showScrollIndicator: false, + wrapSelection: false, itemSpacing: 0, // Selection is a text colour, not a filled band: the highlighted row // already stands out, and a block would fight the host's background.