1jehuang / 1jehuang/jcode

Feature: /sessions <query> opens the session picker pre-filtered (search from the command line)

Open
#1,232 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement triage: needs-decision
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

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.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.