anomalyco / anomalyco/opencode
TUI: session directory filter keybind is inactive inside the session picker
@kommander is already working on this.
Since Aug 12, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
What happened
A key bound to app.toggle.session_directory_filter does nothing while the session picker is open. The same key works from the main screen.
The default for this keybind is none, so only users who bind it hit this.
Steps to reproduce
- Put this in
tui.json:{ "keybinds": { "app_toggle_session_directory_filter": "ctrl+a" } } - On the main screen, press
ctrl+a. The filter toggles, as expected. - Open the session picker (
session.list), pressctrl+a. Nothing happens.
Cause
app.toggle.session_directory_filter is in appBindingCommands, and that list is gathered under a mode:
useBindings(() => ({
mode: OPENCODE_BASE_MODE,
bindings: tuiConfig.keybinds.gather("app", appBindingCommands),
}))
Opening a dialog pushes "modal" (packages/tui/src/ui/dialog.tsx), so that whole layer goes inactive. The session picker is a dialog.
Confirmed by pushing the mode directly in a test: getOpencodeModeStack(keymap).push("modal") takes the command from 1 active binding to 0.
Expected
The toggle decides which sessions the picker lists, so it should be reachable while the picker is open. appGlobalBindingCommands is gathered without a mode and already holds session.list and the quick-switch commands for this reason.
Second, smaller problem
The command ends with an unconditional dialog.clear(). If it is triggered while the picker is open, the picker closes, so you cannot see the result of the toggle. The picker's resource queries on sync.session.query(), so it re-lists in place if left open.
I have a fix for both and will link a PR.
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.