Skip to content

[Bug] v1.16.0: TUI sidebar "Modified Files" section completely hidden after path truncation fix #30877

Closed as not planned

Description

@WhiteGiverMa

Description

After upgrading to v1.16.0, the "Modified Files" section in the TUI right sidebar no longer renders at all. Not truncated — the entire section is missing. Files with uncommitted changes are completely invisible.

Steps to Reproduce

  1. Open a project with uncommitted/modified files in opencode TUI
  2. Observe the right sidebar
  3. "Modified Files" section is absent — nothing rendered where the file list should be

Expected Behavior

The "Modified Files" section should show all files with uncommitted changes, with paths truncated at the beginning (as intended by the fix for #30514).

Actual Behavior

The entire "Modified Files" section is hidden/not rendered. There is no way to see which files have been modified.

Environment

  • OpenCode version: 1.16.0
  • Platform: Windows (WSL2)
  • UI: TUI (terminal)
  • Git: Project has uncommitted changes

Related

This appears to be a regression from #30514 ("TUI sidebar – modified file paths truncated at the end, hiding the filename"). The v1.16.0 release notes mention "Truncated long sidebar file paths" as a TUI Improvement — the fix for #30514 may have introduced an over-correction that hides the entire file list under certain conditions.

Screenshot

Will attach if needed — the sidebar simply shows no modified files section.

Activity

  1. WhiteGiverMa commented on Jun 5, 2026

    @WhiteGiverMa
    Author
    Image Image
  2. WhiteGiverMa commented on Jun 5, 2026

    @WhiteGiverMa
    Author

    No Modified Files shown while git status shows a lot of files.

  3. littleStudent commented on Jun 15, 2026

    @littleStudent

    I have the same issue since 1.16.0.
    It seems like the modified files list is not shown at all anymore.

  4. bernatGene commented on Jun 15, 2026

    @bernatGene

    same issue; currently 1.17.4, might be a opentui problem?

  5. polatdev commented on Jun 18, 2026

    @polatdev

    same issue, how to fix?

  6. aic0d3r commented on Jun 22, 2026

    @aic0d3r

    Can confirm this is still reproducible on 1.17.8 (Linux, TUI), and it is not caused by user plugins — I reproduced it with opencode run --pure, which logs skipping external plugins in pure mode.

    Repro

    1. git init an empty repo, add a file.
    2. Run opencode and ask it to edit the file.
    3. The file is modified on disk (git status confirms it).
    4. The TUI "Modified Files" / sidebar summary stays empty.

    Root cause signal from the local SQLite DB

    The edit/patch event is being recorded correctly in the part table:

    {"type":"patch","hash":"e3d14d7340059b5852f32f29574e98ff73eb3c47","files":["/tmp/opencode-repro-178/sample.txt"]}

    But the corresponding session row never gets populated:

    summary_files       = 0
    summary_additions   = 0
    summary_deletions   = 0
    summary_diffs       = (empty)
    

    So it looks like the regression is in the session summary projection that feeds the sidebar, not in edit/patch execution. The patch part is written; the per-session summary_* aggregation that the TUI sidebar reads is not being computed/written after v1.16.0.

    This matches the closed-but-still-broken pattern others have reported across 1.16.0 → 1.17.4 → 1.17.7 → 1.17.8. Happy to attach the exact DB rows / a small reproduction repo if it helps narrow down where the projection broke.

  7. aic0d3r commented on Jun 22, 2026

    @aic0d3r

    Follow-up with the exact regression commit + root cause from a v1.15.13 → v1.16.0 source bisection.

    Breaking commit

    2f2fcc165 — fix(opencode): remove automatic full session diffs (#30127) (@thdxr, merged 2026-05-31, shipped in v1.16.0)

    What it changed

    In packages/opencode/src/session/summary.ts, the summarize function used to compute the full session diff and write the aggregate to the session summary:

    // v1.15.13 (working)
    const diffs = yield* computeDiff({ messages: all })
    yield* sessions.setSummary({
      sessionID: input.sessionID,
      summary: {
        additions: diffs.reduce((sum, x) => sum + x.additions, 0),
        deletions: diffs.reduce((sum, x) => sum + x.deletions, 0),
        files: diffs.length,
      },
    })
    yield* storage.write(["session_diff", input.sessionID], diffs)
    yield* events.publish(Session.Event.Diff, { sessionID, diff: diffs })

    #30127 replaced that with hardcoded zeroes at the session level:

    // v1.16.0+ (broken)
    yield* sessions.setSummary({
      sessionID: input.sessionID,
      summary: { additions: 0, deletions: 0, files: 0 },
    })
    yield* events.publish(Session.Event.Diff, { sessionID, diff: [] })

    Per-message turn diffs (session.diff({ messageID })) were intentionally preserved — which is why part.type="patch" rows are still written correctly, but session.summary_files / summary_diffs are always 0/empty.

    Why the sidebar is empty

    The PR description is explicit about the intent: "return empty session-level diff data while preserving the existing API/event shape" and "keep message-scoped turn diffs available through session.diff({ messageID })". The TUI sidebar "Modified Files" section reads the session-level aggregate (session.summary / Session.Event.Diff), which #30127 now always empties. The message-scoped data that's still computed never reaches the sidebar.

    Suggested fix direction

    Either:

    1. Migrate the TUI sidebar "Modified Files" projection to aggregate from the message-scoped session.diff({ messageID }) turn diffs (which still work and are cheap per-turn), or
    2. Re-aggregate summary.files/additions/deletions from the per-message diffs inside summarize without recomputing the expensive full-session snapshot diff.

    This explains why it persists across 1.16.0 → 1.17.8 — the session-level summary was deliberately zeroed and the sidebar was never pointed at the surviving message-scoped data.

  8. FedericohMartin commented on Jul 9, 2026

    @FedericohMartin

    I can still reproduce this on OpenCode 1.17.16 on Linux.

    Local DB evidence matches the root cause described in #33444:

    • Current project metadata is correct: worktree = /home/fede/Desktop/Zoklo, vcs = git, sandboxes = [].
    • The repo has real dirty files, confirmed with git status --short.
    • Recent session rows stay empty: session.summary_files = 0, session.summary_additions = 0, session.summary_deletions = 0.
    • But user message rows do contain the actual per-turn diffs: message.data -> $.summary.diffs has file entries, patches, additions, deletions, and statuses.

    So the per-message diffs are being generated correctly, but the TUI sidebar remains empty because it reads the session-level aggregate.

    Environment:

    • OpenCode: 1.17.16
    • OS: Linux 6.8.0-134-generic x64
    • Terminal: xterm-256color
    • UI: TUI
    • Plugins loaded: local config plugins only; issue reproduces with normal TUI sidebar behavior

    This looks like the exact mismatch fixed by #33444: session-level summary remains empty while per-message turn diffs exist.

  9. WhiteGiverMa commented on Aug 8, 2026

    @WhiteGiverMa
    Author

    oh what come on opencode team, it's my favourite agent harness @thdxr

  10. kdbsoft commented on Aug 19, 2026

    @kdbsoft

    same issue

  11. juliolv commented on Aug 24, 2026

    @juliolv

    I've reproduced this and have a fix ready.

    It restores the session-level diff on both paths without reintroducing the full-session snapshot recompute that #30127 removed: the HTTP GET /session/<id>/diff (no messageID) now aggregates the per-message turn diffs already stored on each user message, and the live session.diff event publishes the same merged diff.

    I've already open a PR referencing this issue, here's a screenshot of this resolved locally:

    Image
  12. thdxr commented on Oct 11, 2026

    @thdxr
    Member

    Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.

    — from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊

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