Feature: /sessions <query> opens the session picker pre-filtered (search from the command line)
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 19.9k
- Forks
- 2.3k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 30
Description
Hi, I am a jcode user and I want to share a small feature idea.
Problem
The session picker already has a search bar (press /). But to use it, you first open the picker, then press /, then type. When you already know what you are looking for, this is extra steps.
Proposal
Allow to pass the search text directly in the command:
/sessions deploy bug
This opens the session picker with the list already filtered by "deploy bug" and the search bar active, so the user can continue typing to refine, or press Enter to resume.
Also works with the aliases /session <query> and /resume <query>.
Implementation
I already implemented this in my fork, branch session-picker-search:
SessionPicker::start_search(query)enters search mode with an initial query and filters immediately.open_session_picker_with_query(Some(query))wires it into the local and remote command dispatch.- Unit tests for the bare command, the query version, and whitespace-only query.
/sessions -> picker opens like before
/sessions deploy -> picker opens filtered by "deploy", search bar active
Happy to open a PR if the feature is interesting. Thank you for jcode, it is a great tool.
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.
Research direction
Review the fork's SessionPicker::start_search(query) and open_session_picker_with_query(Some(query)) implementation, then trace how the bare and aliased commands dispatch locally and remotely. Run or extend the mentioned unit tests for bare commands, query arguments, and whitespace-only queries. Done means /sessions, /session, and /resume accept a query while preserving the existing picker behavior without one.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100