Skip to content

api.ui.dialog.replace() resets size to medium #44754

Closed as not planned
Closed as not planned

Description

@aaronedev

Description

api.ui.dialog.setSize("large") and setSize("xlarge") do not survive the next replace().

Host replace() always writes size back to "medium" before swapping the stack. Plugins that size first, then replace, always get the medium width (60) instead of large (88) or xlarge (116).

@tarquinen/opencode-dcp does exactly that for /dcp: setSize("xlarge") then replace(). The xlarge request is discarded.

setSize should persist across replace(), or replace should take the size so callers do not have to win a race against the reset.

Related: #44755 (host Dialog pins tall panels at height / 4 instead of vertical center).

Plugins

@tarquinen/opencode-dcp (repro via /dcp). Any plugin that calls setSize then replace.

OpenCode version

1.18.22

Steps to reproduce

  1. In a TUI plugin:
    api.ui.dialog.setSize("xlarge")
    api.ui.dialog.replace(() => /* any panel */)
  2. Measure the panel width.
  3. It is 60 (medium), not 116 (xlarge).

Screenshot and/or share link

Operating System

Linux

Terminal

Not terminal-specific. Confirmed in 1.18.22 replace(): it always setStore("size", "medium").

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