You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TUI: plugin/api.tsx calls dialog.setSize/setCentered during render #56145
Thanks for the report! Before we can act on it, we need a concrete, user-visible problem.
api.ui.dialog.set() in packages/tui/src/plugin/api.tsx is an ordinary method that plugins call when they decide to, for example from a command handler. It doesn't run during any component's render. A plugin could call it while rendering, but that would be the plugin's choice, not something this file forces. onMount and effects only exist inside components, so they don't apply to this API object.
If you did run into an actual problem, could you describe it briefly in your own words?
Your OpenCode version (opencode --version), OS and terminal
The plugin code, or the steps, that trigger it
What you expected, and what happened instead (wrong dialog size or position, a warning, flicker, an error, etc.), with any error message or a screenshot
You can reply here with the details, or edit the issue. If you edit it, please also leave a comment saying you've updated it, so we know you're done.
Related issues, ordered from most to least likely to be relevant:
You're correct - this is called from the plugin API's method, which plugins invoke from command handlers, not during render. I misread the code context. and are plain store setters, and calling them from (which is invoked by plugins on user action) is perfectly fine.
I withdraw this issue (#56145) as it's based on an incorrect reading of when is invoked.
You're correct - this is called from the plugin API's set() method, which plugins invoke from command handlers, not during render. dialog.setSize() and dialog.setCentered() are plain store setters, and calling them from set() (invoked by plugins on user action) is perfectly fine.
I withdraw this issue (#56145) as it's based on an incorrect reading of when set() is invoked.
Thanks for checking and following up! Since there's no user-visible problem here, this issue will be closed automatically. You're welcome to close it yourself sooner.
When you look at the related issues you opened (#56137–#56144), a short note on each one about what you actually saw going wrong would help, such as a wrong dialog size, flicker or a warning. A note like that makes them much easier to act on than findings from reading the code alone. If you run into an actual dialog-sizing bug, feel free to open a new issue with your version, the steps to trigger it, and what you expected versus what happened.
Closing this as not planned, since you withdrew it. As you confirmed, api.ui.dialog.set() in packages/tui/src/plugin/api.tsx is only called from plugin code, not during render, so nothing needs to change. Thanks for checking again! If you hit a real dialog-sizing problem in v2, please open a new issue with your version, the steps to trigger it, and what you expected versus what happened.
Activity
opencode-agent commentedon Oct 16, 2026
Thanks for the report! Before we can act on it, we need a concrete, user-visible problem.
api.ui.dialog.set()inpackages/tui/src/plugin/api.tsxis an ordinary method that plugins call when they decide to, for example from a command handler. It doesn't run during any component's render. A plugin could call it while rendering, but that would be the plugin's choice, not something this file forces.onMountand effects only exist inside components, so they don't apply to this API object.If you did run into an actual problem, could you describe it briefly in your own words?
opencode --version), OS and terminalYou can reply here with the details, or edit the issue. If you edit it, please also leave a comment saying you've updated it, so we know you're done.
Related issues, ordered from most to least likely to be relevant:
api.ui.dialog.replace()resets the dialog size to medium (closed). This is a real plugin dialog-sizing symptom and may be what you're seeing.Addin commentedon Oct 16, 2026
Thank you for the correction. Looking more carefully at :
You're correct - this is called from the plugin API's method, which plugins invoke from command handlers, not during render. I misread the code context. and are plain store setters, and calling them from (which is invoked by plugins on user action) is perfectly fine.
I withdraw this issue (#56145) as it's based on an incorrect reading of when is invoked.
Addin commentedon Oct 16, 2026
Thank you for the correction. Looking more carefully at
packages/tui/src/plugin/api.tsx:338-339:You're correct - this is called from the plugin API's
set()method, which plugins invoke from command handlers, not during render.dialog.setSize()anddialog.setCentered()are plain store setters, and calling them fromset()(invoked by plugins on user action) is perfectly fine.I withdraw this issue (#56145) as it's based on an incorrect reading of when
set()is invoked.opencode-agent commentedon Oct 16, 2026
Thanks for checking and following up! Since there's no user-visible problem here, this issue will be closed automatically. You're welcome to close it yourself sooner.
When you look at the related issues you opened (#56137–#56144), a short note on each one about what you actually saw going wrong would help, such as a wrong dialog size, flicker or a warning. A note like that makes them much easier to act on than findings from reading the code alone. If you run into an actual dialog-sizing bug, feel free to open a new issue with your version, the steps to trigger it, and what you expected versus what happened.
opencode-agent commentedon Oct 19, 2026
Closing this as not planned, since you withdrew it. As you confirmed,
api.ui.dialog.set()inpackages/tui/src/plugin/api.tsxis only called from plugin code, not during render, so nothing needs to change. Thanks for checking again! If you hit a real dialog-sizing problem in v2, please open a new issue with your version, the steps to trigger it, and what you expected versus what happened.