Skip to content

TUI does not fully repaint after Ctrl+Z + fg when terminal is resized #16327

Closed
anomalyco/opentui
#1008

Description

@Piping

Description

When OpenCode TUI is suspended with Ctrl+Z, the terminal is resized, and then resumed with fg, the UI may return in a partially stale state (misaligned characters / incomplete redraw).

Plugins

No response

OpenCode version

v1.2.20 (reproduced on current dev before fix)

Steps to reproduce

  1. Launch opencode in terminal (TUI mode).
  2. Press Ctrl+Z to suspend the process.
  3. Resize the terminal window while in shell.
  4. Run fg to resume opencode.
  5. Observe the restored screen.

Screenshot and/or share link

No response

Operating System

macOS

Terminal

Reproduced in local terminal session (reporter environment)

Expected behavior

After fg, TUI should fully repaint using current terminal dimensions.

Actual behavior

After fg, parts of the old frame can remain and rendering is not fully refreshed.

Related PR

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Mar 6, 2026
  2. github-actions commented on Mar 6, 2026

    @github-actions
    Contributor

    This issue doesn't fully meet our contributing guidelines.

    What needs to be fixed:

    • The Description field just repeats the issue title rather than providing actual details about the bug
    • Steps to reproduce are missing — please describe how to trigger this behavior
    • OpenCode version, Operating System, and Terminal fields are all empty — this context is important for diagnosing the issue

    Please edit this issue to address the above within 2 hours, or it will be automatically closed.


    This issue might be a duplicate of existing issues. Please check:

    If you believe this was flagged incorrectly, please let a maintainer know.

  3. changed the title [-]Ctrl-Z && fg does not update renderer when terminal size changed[/-] [+]TUI does not fully repaint after Ctrl+Z + fg when terminal is resized[/+] on Mar 6, 2026
  4. github-actions commented on Mar 6, 2026

    @github-actions
    Contributor

    Thank you for updating the issue! It now meets our contributing guidelines — the description, reproduction steps, and system info all look good. We appreciate you taking the time to fill things in properly.

  5. N-R-K commented on Apr 17, 2026

    @N-R-K

    Ran into this on linux as well. Using v1.4.0. Very annoying bug, would appreciate if a fix is merged soon.

  6. removed
    bugSomething isn't working
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on May 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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