Skip to content

[WS8] Surgical TUI performance improvements to upstream OpenCode TUI #168

@randomm

Description

@randomm

Parent: #158

Context

After evaluating alternatives:

  • ❌ oclite — abandoned (too much maintenance)
  • ❌ CodeNomad — GUI, not terminal
  • ❌ opencode web — trialed, not a great experience
  • ❌ Custom thin client — unnecessary effort

Decision: Use upstream's TUI but apply surgical performance fixes.

The upstream TUI has documented severe performance issues:

Our specific pain points:

  • 84MB binary (bloat)
  • Sluggish in long sessions (100+ subagent panes)
  • Too many bells and whistles

Approach

Make minimal, focused changes to the upstream TUI that:

  1. Fix the worst performance issues
  2. Are small enough to maintain across upstream syncs (like the rg tool patch)
  3. Could potentially be contributed upstream

Scope Definition (needs collaboration)

To investigate and discuss:

  • Which upstream TUI perf issues are fixable with small patches?
  • Can we add a scrollback limit / message virtualization with minimal code?
  • Can we disable expensive features (file watchers, animations) via config?
  • Binary size reduction — can we tree-shake unused features?
  • What's the minimum viable change for "not sluggish at 100+ panes"?

Constraints

  • Changes must be surgical — under 50 lines per file ideally
  • Must be maintainable with rebase-on-sync (like rg tool)
  • No structural refactoring of upstream TUI code
  • Prefer config flags over code changes where possible

Status: NEEDS SCOPING

This issue requires hands-on investigation with project owner to define specific changes. The upstream issue tracker has analysis of root causes that can guide targeted fixes.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions