Skip to content

Feature Request: TUI option for minimal/collapsed diff display #9089

Closed as not planned

Description

@sukakcoding

Problem

When editing large files (300-500+ lines), the diff output in the TUI becomes very long and requires extensive scrolling. This makes it hard to follow the conversation flow.

Current Behavior

✅ Edited file src/components/App.tsx
┌─────────────────────────────────────────────────┐
│ - old line 1                                    │
│ + new line 1                                    │
│ - old line 2                                    │
│ + new line 2                                    │
│ ... (500 more lines of diff) ...                │
└─────────────────────────────────────────────────┘

Expected Behavior

Minimal mode - clean, compact:

✅ Edited file src/components/App.tsx (+245, -123 lines)

Minimal + expandable - click to see full diff:

✅ Edited file src/components/App.tsx (+245, -123 lines) [expand]

Use Case

  • Large refactors with many line changes
  • Generated code (500+ lines)
  • Config file updates
  • Keeping conversation flow readable

Suggested Implementation

New TUI config option in opencode.json:

{
  "tui": {
    "diff_display": "minimal"
  }
}
Mode Behavior
full Show complete diff (current default)
minimal Show only filename + line counts, with option to expand

When minimal:

  • Default view: collapsed (filename + stats only)
  • User can expand to see full diff if needed

Important Note

UI vs Context Separation:

The minimal feature should ideally:

  • UI: Show minimal/collapsed for clean scrolling experience
  • AI Context: Keep full diff in conversation history so AI maintains understanding

This prevents AI from "forgetting" what was edited while keeping the TUI clean for users.

User sees:  ✅ Edited file App.tsx (+50, -30 lines) [expand]
AI sees:    Full diff content in context for continuity

Activity

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

    @github-actions
    Contributor

    This issue might be a duplicate or related to existing issues. Please check:

    Feel free to ignore if your use case is specifically different from these.

  3. LIHUA919 commented on Jan 17, 2026

    @LIHUA919

    Hi! I'd like to work on this feature. Before I start implementation, I have a couple of questions:

    1. Compact Mode overlap: I noticed there's a planned Compact Mode feature (feat(tui): Compact Mode Phase 1 - Display Hierarchy Implementation #9017-9019) that includes a 4-level display hierarchy (FULL, COLLAPSED,
      SHORTHAND, HIDDEN). Would this diff display feature conflict with or be superseded by Compact Mode? Or should they be implemented independently?

    2. Design review requirement: Per CONTRIBUTING guidelines, core UI features may require design review. Does this feature need design approval before
      implementation?

    My proposed approach

    If this is good to implement, my plan would be:

    • Add a new tui.diff_display config option ("full" | "minimal")
    • When "minimal": Edit/Write tools show collapsed by default (filename + line stats)
    • User can click to expand and see full diff
    • Full diff remains in message metadata for AI context (no changes to AI understanding)

    Please let me know if this aligns with the team's vision, or if I should wait for Compact Mode instead.

  4. added 3 commits that reference this issue on Jan 17, 2026
    3268618
    996b820
    2a2423c
  5. kolinekp commented on Mar 11, 2026

    @kolinekp

    I think there might be two separate issues worth distinguishing here:

    1. The one described in this issue – large files produce large diffs (500+ lines of changes).
    2. A different case I'm experiencing – even a small change (a few lines) produces a surprisingly long diff in the TUI.

    In the second case, I suspect the culprit is the context lines surrounding each change. Standard unified diff includes several unchanged lines around every hunk, and if opencode renders those without collapsing, or uses a large context window – even a 2-line edit can look massive in the TUI.

    It would be worth knowing whether these two cases share the same root cause or need separate solutions. Either way, the minimal/collapsed diff view proposed here would help with both.


    Note: "Hide tool details" (accessible via Ctrl+P command palette) hides all tool execution info including every tool call opencode makes. This is worth mentioning because being able to see tool calls is actually a safety feature – for example, if opencode runs a shell command that looks suspicious or potentially malicious, you can catch it and interrupt before it does any damage. Hiding tool details removes that visibility entirely, so it's not a practical workaround for the diff verbosity problem.

  6. maxsoldev commented on Apr 8, 2026

    @maxsoldev

    I would double-down on this feature request. The issue is exacerbated when developing a new project from scratch or writing detailed .md docs. In such cases many hundreds of lines are displayed in terminal and one needs to scroll past them to get to previous messages. This is time consuming and frustrating when trying to navigate back and forth within a discussion

    A better option would be to collapse the content of the tool calls and keep the header e.g. "Wrote hello-world/src/App.css" which can be toggled to see the full contents if needed. As mentioned above "Hide tool details" hides all tool execution info including headers making what happened during the execution very opaque.

    A new setting providing a balance between those two extremes (show everything vs hide everything) by keeping headers and hiding full content behind toggle would be a very desirable improvement

    Image
  7. removed
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on May 3, 2026
  8. github-actions commented on Jul 6, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

  9. JonasDoe commented on Jul 6, 2026

    @JonasDoe

    The more agent driven we act (OpenSpec, BMad etc.), the less we care about diffs and the more we care about the general chat log. I think it's a big miss.

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