anomalyco / anomalyco/opencode

TUI dialogs sit too low once content grows

Open
#44,755 0 comments 0 reactions 1 assignee View on GitHub

@kommander is already working on this.

Since Aug 24, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Description

Tall TUI dialogs are not vertically centered. The host overlay in packages/tui/src/ui/dialog.tsx sets paddingTop to terminal height / 4 and never sets justifyContent="center", so the panel top is pinned at 25% and extra height grows downward.

Short dialogs look roughly centered. After the same dialog grows (plugin panel load, more rows), it sits too low and can clip the bottom. Plugin api.ui.dialog has no position or align field, so callers cannot correct this.

I hit this with plugin panels such as /dcp. Built-in select dialogs show the same top pin when they get tall.

Related but not the same: #37621 (plugin dialogs in the bottom-right), #7902 (overflow, closed as duplicate), and #44754 (replace() resets setSize()).

Plugins

@tarquinen/opencode-dcp is enough to see it via /dcp. Any plugin that calls api.ui.dialog.replace() hits the same host overlay.

OpenCode version

1.18.22

Steps to reproduce
  1. Open a session in the TUI.
  2. Open a tall plugin dialog (/dcp, or any api.ui.dialog.replace() panel).
  3. Compare a short loading or empty state with the full panel.
  4. The expanded panel starts about a quarter of the way down instead of staying vertically centered.
Screenshot and/or share link
Operating System

Linux

Terminal

Not terminal-specific. Reproduced from the 1.18.22 Dialog layout: alignItems="center" with paddingTop={dimensions().height / 4} and no justifyContent.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.