anomalyco / anomalyco/opencode
api.ui.dialog.replace() resets size to medium
@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
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
- In a TUI plugin:
api.ui.dialog.setSize("xlarge") api.ui.dialog.replace(() => /* any panel */) - Measure the panel width.
- 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").
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.