Skip to content

fix(tui): keep session scope toggle usable in the picker - #50432

Closed
Mattheinrichs wants to merge 1 commit into
anomalyco:devfrom
Mattheinrichs:session-scope-hint
Closed

Mattheinrichs wants to merge 1 commit into
anomalyco:devfrom
Mattheinrichs:session-scope-hint

Conversation

@Mattheinrichs

@Mattheinrichs Mattheinrichs commented Sep 21, 2026 •

Copy link
Copy Markdown

Issue for this PR

Closes #42060
Closes #42058

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

A key bound to app.toggle.session_directory_filter does nothing while the session picker is open. The picker is a Dialog, and dialogs push the "modal" keymap mode, but the command was registered in appBindingCommands, which is scoped to the base mode — so that layer is inactive exactly where the toggle is used.

I moved the command into the mode-less appGlobalBindingCommands set, and stopped the toggle from calling dialog.clear() while the picker is open, so the list re-queries sync.session.query() and re-lists in place instead of hiding the result.

The session list footer now also shows the current scope and, when the command is bound, the key that flips it (#42058).

This is a re-submission of #42056, which was closed by the PR cleanup bot (created >1 month, <2 reactions) rather than on review. Original fix by @thepigdestroyer.

How did you verify your code works?

  • cd packages/tui && bun typecheck — clean
  • cd packages/tui && bun test — 197 pass, 1 skip, 0 fail
  • New keymap test registers the real appGlobalBindingCommands / appBindingCommands layers, pushes "modal", and asserts the toggle stays active while a base-mode command drops.
  • Two sessionScopeLabel cases added to the dialog session list tests.

Screenshots / recordings

TUI keymap/footer change; no screenshot captured.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

The session picker is a dialog, so it pushes the "modal" mode and the
session_directory_filter binding registered for the base mode became
inactive while the picker was open. Move it to the mode-less global set
so it keeps working, and skip clearing the dialog on toggle so the
re-listed scope stays visible.

The Session list footer now names the current scope and, when bound, the
key that flips it.

Fixes anomalyco#42060
Fixes anomalyco#42058

Re-submission of the auto-closed anomalyco#42056; original fix by @thepigdestroyer.
@github-actions

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Sep 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@thdxr

thdxr commented Oct 10, 2026

Copy link
Copy Markdown
Member

This branch has been upgraded to V2. We're no longer taking PRs for V1. If you think this is still relevant, please port it over and open it for V2.

— from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊

@thdxr thdxr closed this Oct 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TUI: session directory filter keybind is inactive inside the session picker Session picker gives no indication that the list is scoped to a directory

2 participants