anomalyco / anomalyco/opencode
tui: diff viewer palette shows Open instead of Close and breaks exit after re-entry
@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
- Start OpenCode.
- Press
Ctrl+Pand select Open diff viewer. - Press
Ctrl+Pagain from inside the Diff Viewer. - Observe that Open diff viewer is still present and Close diff viewer is missing.
- Select Open diff viewer again.
- Press
qorescape. - 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.