posit-dev / posit-dev/positron

Console: Make Cmd+R (search history) use fuzzy matching and ranking

Open
#12,902 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area: console
Dominant language
TypeScript
Stars
4.3k
Forks
184
Avg merge
1d 11h
Merged PRs (30d)
206

Description

Today, the Cmd R history search in the Positron console uses exact substring matching. In order to find an element in the history, you must type an exact match for some part of the code.

Image

Compare to the algorithm used by the Command Palette:

Image

We could improve the usefulness of the history search in the Console by making it more like the Palette:

  • removing duplicates
  • ranking by "frecency" (notice how the Palette prioritizes "recently opened"; we'd prioritize "recently run")
  • making the search fuzzier, so the characters just need to appear in the code in any order -- e.g libgg would match library(ggplot2)

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

Start by locating the Console Cmd+R history search and the Command Palette matching algorithm, then compare their matching and ranking behavior. Done means history results remove duplicates, support fuzzy character matching such as libgg for library(ggplot2), and rank recently run entries higher.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
devtools, search
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.