Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions src/tui/overlay-paint.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 3 additions & 1 deletion src/tui/overlay-view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: "",
Expand Down Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion src/tui/shell/overlay-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Loading