Skip to content

fix(workspaces): surface session directory filter state in list dialog#29172

Open
jamesmurdza wants to merge 1 commit into
anomalyco:devfrom
jamesmurdza:feat/session-list-directory-filter-ui
Open

fix(workspaces): surface session directory filter state in list dialog#29172
jamesmurdza wants to merge 1 commit into
anomalyco:devfrom
jamesmurdza:feat/session-list-directory-filter-ui

Conversation

@jamesmurdza
Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #27286

Type of change

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

What does this PR do?

When inside a workspace, the session list is silently filtered to that workspace's sessions, with no indication it's happening — so users lose track of sessions they know exist. The only toggle lives in the command palette (app.toggle.session_directory_filter) with no default keybind, so users can't tell that filtering is on, that a toggle exists, or how to reach it.

This surfaces the filter and makes it toggleable from the session list itself:

  • The dialog title shows the current scope: Sessions · current directory vs Sessions · all directories.
  • A new in-dialog action toggles the filter (footer label flips between show all and filter to dir), bound to <leader>f so it's reachable without the palette.

The default (session_directory_filter_enabled = true) is unchanged — only the visibility and reachability of the existing filter change.

How did you verify your code works?

Manually, in the TUI, against a build of this branch:

  1. Open the session list:
ctrl+x l
  1. The title reads Sessions · current directory, and the footer shows the toggle as show all ctrl+x f.

  2. Press <leader>f (ctrl+x f):

  • The title flips to Sessions · all directories.
  • The footer label flips to filter to dir.
  • Pressing again flips both back.

This confirms the filter state is now visible and the toggle is reachable and updates live.

Screenshots / recordings

Screenshot 2026-05-24 at 10 27 51 PM

Checklist

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

The session list silently filters to the current workspace's directory
when the filter is enabled, with no UI indication of why sessions are
missing. The existing toggle is buried in the command palette under
`app.toggle.session_directory_filter` with no default keybind.

- Show the filter state in the dialog title: `Sessions · current
  directory` vs `Sessions · all directories`.
- Add a dialog-scoped action `session.list.toggle_filter` bound to
  `<leader>f` so users can flip the filter without leaving the list.
  The footer label flips between `show all` and `filter to dir` to
  match the action it will take.
- Let dialog-select actions opt out of requiring a selected row
  (`requireSelection: false`) so the toggle works even when the filter
  has emptied the list — the exact case this feature addresses.

The default of `session_directory_filter_enabled = true` is preserved
— only the visibility and reachability change.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Signed-off-by: James Murdza <james@jamesmurdza.com>
@github-actions
Copy link
Copy Markdown
Contributor

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

Looking at the search results, I found one potentially related PR:

PR #29026: fix(tui): scope session list to current worktree directory
#29026

This PR is related because it addresses session list filtering based on directory scope — the same underlying feature that PR #29172 is surfacing in the UI. If PR #29026 is still open or recently merged, it could overlap with the changes in the current PR.

All other results either don't match the specific functionality or are the current PR itself (#29172).

Would you like me to check the status of PR #29026 to confirm if there's a conflict or overlap?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Workspaces/UX] Session list silently filtered when inside workspace context

1 participant