Skip to content

Add an in-pane search to filter agents in the projects pane - #265

Open
patrickdappollonio wants to merge 1 commit into
mainfrom
search-agents-slash
Open

Add an in-pane search to filter agents in the projects pane#265
patrickdappollonio wants to merge 1 commit into
mainfrom
search-agents-slash

Conversation

@patrickdappollonio

Copy link
Copy Markdown
Owner

Pressing / while the projects pane is focused opens a single-line search box inside the pane and filters the agent list as you type, matching against each agent's title, branch name, or project name. Project names stay as group headers for context, agents whose details don't match are hidden, and any project left with no matches drops out of the view entirely. Results stay one line each, so the arrow keys move between matches, Enter opens the highlighted agent, and Esc clears the search and restores the full list.

A few details make it feel right: a project-name match surfaces all of that project's agents, matches hidden inside a collapsed project are revealed while searching — and the project auto-expands only when you actually open one of those agents, never on cancel. Typed characters that are also global shortcuts, like q or ?, edit the query instead of firing, and Tab, the palette key, or clicking another pane cleanly leave search rather than being swallowed. The same key-handling fix is applied to the pre-existing files-pane search so the two behave consistently.

Under the hood the filtering lives in the single place that flattens projects and agents into the navigable list, the search box reuses the existing text-input component, and the highlight stays anchored to the same agent across background refreshes. The change is config-free and additive: the new / binding is user-rebindable like every other key, and the rest of the pane's behavior is unchanged.

Press / in the agents pane to open a search box inside the list and type to narrow it down by agent title, branch, or project name. Arrows move between matches, Enter opens the highlighted agent, and Esc clears it. Projects with no matches drop out, agents hidden inside collapsed projects are revealed, and the files pane search now uses the same key handling so typed characters edit the query instead of firing shortcuts.
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.

1 participant