anomalyco / anomalyco/opencode

Session picker gives no indication that the list is scoped to a directory

Open
#42,058 2 comments 1 reaction 1 assignee View on GitHub

@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

Context

CONTRIBUTING says UI changes need a design review before implementation, so raising this rather than sending a PR.

The session picker shows footer hints for quick-switch and delete, but nothing for app.toggle.session_directory_filter. Even once the binding works in the picker (#42056) and is bindable, there is no indication in the picker that the current list is scoped to a directory, or that a key widens it. The scope of the list is invisible: a session that exists but is filtered out looks like a session that does not exist.

Proposal

Add one footer hint to DialogSessionList that names what the key will do next and flips with the current scope:

  • while narrowed to a directory: <key> all sessions
  • while showing everything: <key> this directory

Details that seem worth keeping either way:

  • read the key via useCommandShortcut("app.toggle.session_directory_filter"), as the delete and quick-switch hints already do, so a rebind is reflected and nothing is hardcoded
  • render nothing when the command is unbound, so the footer never advertises a dead key
  • render nothing when project.data.instance.path.worktree is absent, since sessionListQuery() returns { scope: "project" } regardless in that case and the toggle would appear to do nothing

Open questions for the design review

  1. Is a footer hint the right surface, or would you rather show current scope in the picker title or as a header line?
  2. Wording. "all sessions" / "this directory" describes the next action; showing current state instead ("this directory only") is the other option, and the two read quite differently in the footer.
  3. Should the hint appear at all when the command is unbound, as a discoverability nudge pointing at the palette entry, or stay hidden as proposed?

I have this implemented and tested locally, including the unbound and no-worktree cases, and am happy to open a PR if you want it in this shape, or to build whatever shape you prefer. Equally happy for this to be closed if it is not wanted.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.