anomalyco / anomalyco/opencode

tui: diff viewer palette shows Open instead of Close and breaks exit after re-entry

Open
#39,387 1 comment 0 reactions 1 assignee View on GitHub

@kommander is already working on this.

Since Jul 28, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Description

When the command palette is opened from the active Diff Viewer, it still shows Open diff viewer and does not provide Close diff viewer.

Besides presenting the wrong action, this permits a broken route transition. Selecting Open diff viewer again replaces the original return route with the Diff Viewer itself. After that, q or escape runs the close action but navigates back into the viewer, making it appear impossible to close.

Expected behavior:

  • Outside the Diff Viewer, the palette shows Open diff viewer.
  • Inside the Diff Viewer, the palette shows Close diff viewer and does not expose Open diff viewer.
  • Closing returns to the route from which the viewer was originally opened.
Plugins

None required to reproduce.

OpenCode version

1.18.8

Steps to reproduce
  1. Start OpenCode.
  2. Press Ctrl+P and select Open diff viewer.
  3. Press Ctrl+P again from inside the Diff Viewer.
  4. Observe that Open diff viewer is still present and Close diff viewer is missing.
  5. Select Open diff viewer again.
  6. Press q or escape.
  7. Observe that the Diff Viewer remains open instead of returning to the original session.
Screenshot and/or share link

https://github.com/user-attachments/assets/394e7a55-87fb-4c8a-96c8-fd23f629c232

Operating System

MacOS 26.4

Terminal

Ghostty

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.