anomalyco / anomalyco/opencode
TUI dialogs sit too low once content grows
@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
- Open a session in the TUI.
- Open a tall plugin dialog (
/dcp, or anyapi.ui.dialog.replace()panel). - Compare a short loading or empty state with the full panel.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.