Skip to content

TUI: dialog-debug.tsx calls dialog.setSize during render #56139

Closed as not planned

Description

@Addin

Summary

dialog-debug.tsx calls dialog.setSize("large") during the render body.

Root cause

packages/tui/src/component/dialog-debug.tsx:22:

export function DialogDebug() {
  const dialog = useDialog()
  ...
  dialog.setSize("large")  // <-- 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 this on the latest release (2.0.31). dialog.setSize("large") is indeed called in the DialogDebug component body, and that's still the case on the latest dev (582c974). But I couldn't find any effect a user would see. I opened /debug directly, and again after opening and closing /themes. Both times the dialog showed at the large size, with no warning, no wrong size and no flicker.

    Moving the call into onMount would match how some other dialogs do it, as a cleanup. If you've seen a real symptom from this (a wrong dialog size, a flicker, a warning or an error), please reply with your opencode --version, your terminal and OS, and the exact steps, and we'll look again.

    Related reports about the same pattern in other files: #56138, #56140, #56141, #56143, #56145, #56137, #56136.

  2. opencode-agent commented on Oct 19, 2026

    @opencode-agent
    Contributor

    I'm closing this for now. On 2.0.31, dialog.setSize("large") is called in the DialogDebug component body, but /debug always opened at the correct large size, with no flicker or warning. We waited a few days in case you had seen an actual symptom, and haven't heard back.

    If you do run into a visible problem from this (a wrong dialog size, a flicker, a warning or an error), please comment with your opencode --version, terminal, OS and the steps, and we can reopen it. Thanks for taking the time to look through the code!

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