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: dialog-highlights.tsx calls dialog.setCentered during render #56142
exportfunctionDialogHighlights(props: {version: string;items: ReadonlyArray<TuiHighlight>}){constdialog=useDialog()...dialog.setCentered(true)// <-- side effect during render
Before we act on this, could you tell us whether this causes a problem you actually saw? In SolidJS a component's body runs once when the component is set up, and it is not re-run on each render like in React. So calling dialog.setCentered(true) there just sets a store value once. The same pattern is used in several other dialogs. Moving it to onMount might draw the dialog off-centre for one frame before it moves, which could look like flicker.
If you did see something go wrong, please share:
Your OpenCode version (opencode --version), your OS and your terminal
What you did, for example the steps that opened the "What's new" dialog
What you expected and what happened instead, such as a wrong position, flicker or a warning, with a screenshot or log if you have one
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 by likelihood (they are about the same pattern in other files, so they are not duplicates):
Source code review finding. packages/tui/src/component/dialog-highlights.tsx:20 calls dialog.setCentered(true) in the component body, while other dialogs use onMount for this (dialog-session-list.tsx:194, dialog-integration.tsx:518). No visible problem observed today, but it's a consistency issue. Related: #56136-#56139, #56140-#56141, #56143-#56145.
Closing this as not planned, since we haven't heard back. We asked whether calling dialog.setCentered(true) in the DialogHighlights component body causes a problem you actually saw. In SolidJS that code runs only once, so on its own it doesn't look like a bug, and moving it to onMount could make the dialog flicker.
If you do see something go wrong with the "What's new" dialog, such as a wrong position, flicker or a warning, please comment with your opencode --version, OS, terminal, steps and what you saw, and we can reopen this. Thanks!
Closing this one. In Solid the component body runs once at setup, not on every render, so that setCentered call just sets the value a single time and nothing goes wrong on current dev. You also mentioned you did not see a visible problem. If the dialog ever shows up in the wrong spot or flickers, reopen with steps and I will take a look.
Activity
opencode-agent commentedon Oct 16, 2026
Thanks for the report, @Addin!
Before we act on this, could you tell us whether this causes a problem you actually saw? In SolidJS a component's body runs once when the component is set up, and it is not re-run on each render like in React. So calling
dialog.setCentered(true)there just sets a store value once. The same pattern is used in several other dialogs. Moving it toonMountmight draw the dialog off-centre for one frame before it moves, which could look like flicker.If you did see something go wrong, please share:
opencode --version), your OS and your 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 by likelihood (they are about the same pattern in other files, so they are not duplicates):
setCenteredcall indialog-update.tsxdialog-pair.tsxcallssetSize/setCenteredin the component bodydialog-shell-output.tsx, same patterndialog-image-preview.tsx, same patternplugin/api.tsxcallssetSize/setCentereddialog-execute.tsxchanges dialog state in the component bodysetSizeindialog-skill.tsxanddialog-debug.tsxAddin commentedon Oct 16, 2026
Source code review finding. packages/tui/src/component/dialog-highlights.tsx:20 calls dialog.setCentered(true) in the component body, while other dialogs use onMount for this (dialog-session-list.tsx:194, dialog-integration.tsx:518). No visible problem observed today, but it's a consistency issue. Related: #56136-#56139, #56140-#56141, #56143-#56145.
opencode-agent commentedon Oct 19, 2026
Closing this as not planned, since we haven't heard back. We asked whether calling
dialog.setCentered(true)in theDialogHighlightscomponent body causes a problem you actually saw. In SolidJS that code runs only once, so on its own it doesn't look like a bug, and moving it toonMountcould make the dialog flicker.If you do see something go wrong with the "What's new" dialog, such as a wrong position, flicker or a warning, please comment with your
opencode --version, OS, terminal, steps and what you saw, and we can reopen this. Thanks!rekram1-node commentedon Nov 13, 2026
Closing this one. In Solid the component body runs once at setup, not on every render, so that setCentered call just sets the value a single time and nothing goes wrong on current dev. You also mentioned you did not see a visible problem. If the dialog ever shows up in the wrong spot or flickers, reopen with steps and I will take a look.