Skip to content

TUI dialogs sit too low once content grows #44755

Closed as not planned
Closed as not planned

Description

@aaronedev

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.

Activity

  1. thdxr commented on Oct 11, 2026

    @thdxr
    Member

    Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.

    — from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions