Skip to content

fix(tui): keep list dialog footers at the bottom and drop the empty footer gap - #64983

Merged
jlongster merged 1 commit into
devfrom
worktrees-footer-bottom
Nov 19, 2026
Merged

jlongster merged 1 commit into
devfrom
worktrees-footer-bottom

Conversation

@jlongster

Copy link
Copy Markdown
Contributor

What does this PR do?

Two spacing fixes for list dialogs under new designs:

  • List dialogs without footer actions end with one blank row, not two. DialogSelect always passed a footer to DialogLayout, even with no actions or content, so the layout kept its gap before an empty footer on top of its bottom padding. It now passes a footer only when there is something in it. This affects the command palette, agents, themes, variants and other lists without footer actions.
  • Manage workspaces keeps its footer at the bottom. The Worktrees dialog has a minimum height so it doesn't jump while loading, and with few worktrees the spare rows ended up below the footer band. DialogLayout (and DialogSelect) take a new grow option that lets the body fill that height, and the Worktrees dialog uses it.

With new designs off: the footer change only matters when DialogSelect has no actions, where the old design already renders its own legacy footer path, and grow makes the Worktrees list fill its minimum height there too.

Screenshots / recordings

OpenCode Drive, opencode2 dark, new designs on. Before (dev), then after.

Command palette

before after

Manage workspaces (delete confirm)

before

after

How did you verify your code works?

Captured before/after in OpenCode Drive; typecheck:tsc passes; tests via CI.

…ooter gap

User decisions:
- Manage workspaces keeps its footer at the bottom
- Command palette ends with one blank row instead of two
@jlongster
jlongster enabled auto-merge (squash) November 19, 2026 21:05

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. With new designs on I ran the base and this PR in OpenCode Drive. On the base, the command palette ends with two blank rows and the Worktrees footer floats mid-dialog when there are only a few worktrees. With this change, the palette ends with one blank row and the Worktrees footer stays at the bottom. Screenshots below. typecheck:tsc and the dialog-layout / dialog-select / command-selection tests pass.

Public API unchanged. grow is a new optional prop on the internal DialogLayout and DialogSelect TUI components.

No concerns.

Before

After

Before

After

@jlongster
jlongster merged commit 1997229 into dev Nov 19, 2026
11 checks passed
@jlongster
jlongster deleted the worktrees-footer-bottom branch November 19, 2026 21:09
@amrkmn amrkmn mentioned this pull request Nov 23, 2026
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant