#596

mux-activity: fuzzy-search filter over the list of agents and panes with /

Openwiiiimmopened 17d ago

Press / in mux-activity and type to narrow every board to the agents and panes that fuzzy-match, the same way / already filters github-actions, github-prs, procs and vercel-deployments.

Context / problem

With many agents across several sessions, plus the background agents added by stealth-factory/opscope#616, finding one agent means scrolling through sections grouped by session. There is no way to narrow the list. Only Luvus's command labels can be filtered today, and only through settings.

Core already has both halves:

  • picker::fuzzy(query, text) from the command palette (stealth-factory/opscope#583): characters in order, case-insensitive, with matches at word starts preferred.
  • tc::filter_row() and tc::filtered_to_nothing(), which every pane uses to state its filters.

Scope

In:

  • / opens a query line. Typing narrows the boards live. enter keeps the filter and returns to the list; esc clears it. / again edits the query that is in force.
  • Each row is matched on what it shows: agent or command name, session or workspace, directory, branch, title and the reported message. Background agents from stealth-factory/opscope#616 are matched on name and detail.
  • Within a section, rows keep their normal order: urgency first, then grouped by session. Fuzzy score is used only to include or exclude rows, never to reorder, so a blocked agent does not drop below a better-matching idle one.
  • The section headings count the subset (3 of 14).
  • The applied filter is named in the body through tc::filter_row(), e.g. 4 of 22 shown · /api. A query that matches nothing says so through tc::filtered_to_nothing(), never as an empty board.
  • The selection stays on the same pane if it still matches; otherwise it moves to the first match. Enter still focuses the selected pane.
  • The same behaviour under Rex, Herdr and Luvus. The matcher works on the shared row model, not per backend.
  • A footer hint naming the next action ([/]filter, and [esc]clear while a filter is active), with matching help.txt, README and palette entries so check.rs passes.

Out:

  • Saving filters in config, or filtering by state (i already shows or hides the idle section).
  • Regex or field syntax such as state:blocked. Plain fuzzy matching only.

Acceptance

  • Typing api under Rex leaves only the agents and panes whose name, session, directory, branch, title or message fuzzy-matches api. Sections with nothing left show none of their rows, and the body says what is filtered.
  • A blocked agent that matches still sorts above a working one that matches.
  • A query that matches nothing shows the filtered_to_nothing wording.
  • esc restores the full list with the selection unchanged.
  • The match is pure, always-compiled code with unit tests (word-start preference, case, no match, empty query).
  • cargo test passes, including check.rs (hint ↔ key ↔ help ↔ doc).

Activity

1
linear-code[bot]17d ago