Add tabs navigation commands - #2
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds keyboard-driven tab navigation to the OpenCode TUI tabs plugin by introducing keymap/command registration and wiring it into the existing SessionTabs UI and controller.
Changes:
- Add a keymap module that registers “Next tab”, “Previous tab”, and “Close tab” as command-palette commands and optionally binds keys via plugin options.
- Extend the session tabs controller with
next,previous, andcloseActiveactions to support tab navigation and closing via commands. - Document the new commands/configuration and add CI + test coverage for the new behavior.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/tui.tsx | Passes plugin options-derived tab keybindings down to the tabs UI. |
| src/session-tabs/sessionTabsKeymap.ts | Implements keybinding resolution + keymap layer registration for tab commands. |
| src/session-tabs/sessionTabsKeymap.spec.ts | Tests keybinding resolution and command/keymap layer registration + cleanup. |
| src/session-tabs/sessionTabsController.ts | Adds navigation/close actions (next, previous, closeActive) used by commands. |
| src/session-tabs/sessionTabsController.spec.ts | Adds tests for wrap-around navigation and closing the active tab. |
| src/session-tabs/SessionTabs.tsx | Wires controller actions into the new keymap registration. |
| src/session-tabs/SessionTabs.spec.tsx | Updates rendering tests to include keymap support and verifies unregister-on-dispose. |
| README.md | Documents the new command palette entries and optional keybind configuration. |
| CHANGELOG.md | Notes the new tab navigation commands/keybinding options under Unreleased. |
| .github/workflows/ci.yml | Adds a CI workflow that installs with Bun and runs bun run check. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Minhir
force-pushed
the
add-tabs-navigation-commands
branch
from
August 5, 2026 18:27
e65dc05 to
70c5358
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.