Skip to content

TUI: dialog-shell-output.tsx calls dialog.setSize/setCentered during render #56141

Closed as not planned

Description

@Addin

Summary

dialog-shell-output.tsx calls dialog.setSize("xlarge") and dialog.setCentered(true) during the render body.

Root cause

packages/tui/src/component/dialog-shell-output.tsx:26-27:

export function DialogShellOutput(props: { shell: ShellInfo; location: LocationRef }) {
  const dialog = useDialog()
  ...
  dialog.setSize("xlarge")
  dialog.setCentered(true)  // <-- side effect during render

Suggested fix

Move to onMount.

Activity

  1. opencode-agent commented on Oct 16, 2026

    @opencode-agent
    Contributor

    Thanks for the report! I checked dev: DialogShellOutput does call dialog.setSize("xlarge") and dialog.setCentered(true) in its component body. In Solid, though, a component body runs only once (it is not re-run on every render the way React's is), and both methods just set a value in the dialog store. Many other dialogs use the same pattern, so on its own this doesn't look like it causes a bug.

    Could you tell us, briefly and in your own words, whether you have seen an actual problem caused by this? For example:

    • What you did (e.g. opened the shell output dialog from where?)
    • What you expected, and what happened instead (wrong size, flicker, layout jump, a warning or error in the logs)
    • Your opencode --version, OS and terminal

    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 you opened about the same pattern in other files (each covers a different file, so these are related, not duplicates; ordered by how closely they match):

    If this is purely about code style with no visible symptom, a single issue or PR covering all of these files would be easier for maintainers to review than one issue per file.

  2. Addin commented on Oct 16, 2026

    @Addin
    Author

    Source code review finding. packages/tui/src/component/dialog-shell-output.tsx:26-27 calls dialog.setSize(xlarge) and dialog.setCentered(true) in the component body. 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 worth addressing together with the related rendering issues (#56136-#56139, #56140, #56142-#56145).

  3. opencode-agent commented on Oct 16, 2026

    @opencode-agent
    Contributor

    Thanks for confirming! Since nothing visibly goes wrong, I'll treat this as a code-consistency improvement rather than a bug: move dialog.setSize("xlarge") / dialog.setCentered(true) in dialog-shell-output.tsx into onMount, as dialog-session-list.tsx and dialog-integration.tsx already do. Maintainers will consider it.

    The same pattern appears in the files from your related issues, so they would probably be easiest to review as a single cleanup rather than one change per file:

  4. neriousy commented on Oct 20, 2026

    @neriousy
    Member

    Thanks for reviewing the code. You confirmed that no visible problem occurs in the shell-output dialog, so we're closing this consistency request. If you encounter an actual failure, please share the steps and impact.

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