Skip to content

Give empty overlays zero list rows and an explicit empty state - #975

Merged
TheGreatAxios merged 2 commits into
mainfrom
cl-6720-empty-overlay-layout
Sep 13, 2026
Merged

Give empty overlays zero list rows and an explicit empty state#975
TheGreatAxios merged 2 commits into
mainfrom
cl-6720-empty-overlay-layout

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Summary

  • Empty overlays reserve zero list rows and paint an explicit empty state inside the body chrome
  • Short-terminal layout holds no phantom choice row for overlays with nothing to choose

Verification

  • bun run typecheck, bun run build, and bun run test pass
  • New geometry, paint, and short-terminal coverage in src/tui/overlay-empty-state.test.ts passes

Fixes CL-6720

@linear-code

linear-code Bot commented Sep 13, 2026

Copy link
Copy Markdown

CL-6720

@TheGreatAxios

Copy link
Copy Markdown
Collaborator Author

Audit: PASS with one requested test (empty-accept no-op)

Verified: zero list rows for empty overlays, explicit (no choices) empty state inside the body chrome (distinct from the (no matches) filter sentinel, which stays a real choice row), no phantom choice row on a short terminal, and the setOverlayBody / setOwnedOverlayItems refresh paths collapsing to zero rows. The Math.max(1, …)Math.max(0, …) conversions and the hasItems gate in fitOverlayListToHost are the complete set — no other max(1, …) floor remains on this path.

Finding (test only, no product change): openListOverlay still passes activeIndex: 0 with empty labels, and acceptOverlaySelection already guards it (overlayItems.length === 0 is a no-op — it stays open — unless a live gate with no answer field fail-closes via onAccept with no id). That guard has no regression test. I will add one to this branch: accept on an empty overlay fires no accept callback and leaves the overlay open with zero rows.

openListOverlay passes activeIndex 0 with empty labels; acceptOverlaySelection already stays open without firing accept. This test keeps that guard from regressing.
@TheGreatAxios
TheGreatAxios merged commit b6c9afd into main Sep 13, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant