Skip to content

[FEATURE]: tui: expose border style (rounded corners) for dialogs and panels #57149

Open

Description

@MaryanK00
  • I have verified this feature I'm about to request hasn't been suggested before.

(#42659 asked for the same thing on v1 and was auto-closed for inactivity. The behaviour on v2 is different, so I'm filing it again with the details below.)

Describe the enhancement you want to request

I'd like the border style used by the TUI to be configurable, so frames can be drawn with rounded corners (╭ ╮ ╰ ╯) instead of square ones (┌ ┐ └ ┘).

The reason is that I'm putting together a custom theme, and right now the corners are square in almost every panel while the Error and Stack trace dialogs already use rounded ones. The result is an inconsistent UI that can't be made consistent in either direction, since there's no setting to change it.

What I'd change

The renderer already supports this, so as far as I can tell it would be a matter of exposing an existing option rather than implementing new rendering.

OpenTUI's box renderable takes a borderStyle prop with four values:

var ls = ["single", "double", "rounded", "heavy"]

rounded uses U+256D–U+2570 (╭ ╮ ╰ ╯), and the default for box is single.

OpenCode already uses two of those values, hardcoded per component:

  • the Error dialog → rounded
  • the Stack trace dialog → rounded
  • the prompt/composer box → heavy, with rounded caps (╹ ╸ ╺ ╻)

So the rounded corner characters are already in the shipped binary, and the Error dialog does already draw with rounded corners. The only thing missing is a way to choose the style:

  • the theme format carries colours only — the border group has a single base entry, with nothing about the style or the corners
  • cli.json has no equivalent setting
  • a plugin can't change it either, since plugins don't control how the built-in components are drawn

There's one more detail worth mentioning: the main dialogs (command palette, settings, model picker) are currently drawn with no border at all — they're a flat surface("dialog").background.base rectangle over a rgba(0,0,0,150) scrim — so there are no corners to round there yet. It would be nice if they got a border, so the selected style is actually visible on them.

What I think this would bring

  • a consistent look across the TUI, instead of the current mix of square and rounded frames
  • the option to pick rounded (or double, or heavy) for anyone who wants it
  • themes would be able to express more than just colour

How I'd expose it

Either of these would do it for me:

  • a border.style entry in the theme format, accepting "single" | "double" | "rounded" | "heavy"
  • a setting in cli.json such as tui.border_style

Defaulting to the current behaviour, so existing setups stay as they are.

Environment

  • opencode version: 2.0.32 (channel: latest)
  • OS: Linux 7.2.11-200.fc44.x86_64 (Fedora 44), x86_64
  • Terminal: kitty (theme "Hachiko") on KDE Plasma, COLORTERM=truecolor
  • Shell: /bin/bash
  • Active plugins: none

Related

Activity

  1. opencode-agent commented on Oct 19, 2026

    @opencode-agent
    Contributor

    Thanks for the detailed request, and for checking the renderer support and the earlier issue.

    To restate it: you'd like the TUI border style (single, double, rounded or heavy) to be configurable, for example through a border.style entry in the theme or a config setting, so that borders look the same across the UI. You'd also like the main dialogs (command palette, settings, model picker) to get a border so that the chosen style shows on them. The default would stay as it is today.

    Right now the style is hardcoded in each component, and only the Error and Stack trace dialogs set it to rounded. A plugin can't change this, because plugins can't change how the built-in TUI components are drawn and themes only hold colors. The maintainers will consider the request.

    Related issues:

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

Metadata

Metadata

Assignees

No one assigned

    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