Skip to content

fix(suggestions): prioritize exact matches with auto-execute - #175

Closed
JasCodes wants to merge 3 commits into
versenilvis:mainfrom
DeepTechSolutionsLLC:fix/auto-execute-exact-match
Closed

JasCodes wants to merge 3 commits into
versenilvis:mainfrom
DeepTechSolutionsLLC:fix/auto-execute-exact-match

Conversation

@JasCodes

@JasCodes JasCodes commented Oct 9, 2026

Copy link
Copy Markdown

With auto-execute enabled, a fully typed command could be replaced by a longer suggestion when pressing Enter. Exact matches now remain first in history and spec modes, including asynchronous AI updates.

Adds core.filter-exact-match:

  • "auto" (default): filter when auto-execute is off; retain and rank first when on.
  • true: always filter exact matches.
  • false: always retain and rank exact matches first.

Enter ignores stale menu selections while preserving explicit navigation and mid-line completion, without rerunning completion generators.

Includes configuration, ranking, AI, and terminal regression tests.

Validation: build, vet, lint, and targeted race checks pass. Full suite: 470 passed, 5 skipped, 1 rendering failure that also reproduces with the pre-change binary.

@versenilvis

versenilvis commented Oct 10, 2026 •

Copy link
Copy Markdown
Owner

can you record a video or take a screenshot
I can't get what does this PR do correctly?

@JasCodes

Copy link
Copy Markdown
Author
image If I press enter with auto-execute to true.

It will run lsappinfo instead of ls. so should not filter out exact match in that case.

I hope that clarifies.

@versenilvis

versenilvis commented Oct 11, 2026 •

Copy link
Copy Markdown
Owner

I still cant get what is this used for?
just use normally like if you want to choose any suggestion -> press tab
or else just press enter and the command will execute itself
then why do you need auto-execute at first?

@versenilvis

versenilvis commented Oct 11, 2026 •

Copy link
Copy Markdown
Owner

please read this:
#67 (comment)

"... but sometime you want to exec what you are typing instead of the suggestion right?, just press esc or shift tab to hide the menu and it will)"

@JasCodes

Copy link
Copy Markdown
Author

Hi, understood what you saying, but what I am saying with this pr ls will not be filtered out of suggestions once you pressed both ls and will be top option. In my optionion thats better UX for auto-execute set to true.

Or I still not getting you point in linked comment?

@versenilvis

Copy link
Copy Markdown
Owner

it would be better if you record a video so I can understand your situation
if you still want to use auto-exec and you are typing ls but instead of showing ls suggestion on top, it is showing lsappinfo like in the image, you can just press esc or shift tab to hide the menu and execute ls by pressing enter anyway
did you mean ls is a command in system but iris doesn't show it on top, right? if so this is another problem of suggestion, not auto execute

@JasCodes

Copy link
Copy Markdown
Author
image image

There is not problem with auto-execute, its working as intended. But Suggestion list filters it outs once the whole command is typed out.

This suggestioin list UX is okay when auto-execute is off, but when on better UX for suggestion list is to not filter out.

Hence I added not config item

core.filter-exact-match:

  • "auto" (default): filter when auto-execute is off; retain and rank first when on.
  • true: always filter exact matches.
  • false: always retain and rank exact matches first.

@versenilvis

versenilvis commented Oct 11, 2026 •

Copy link
Copy Markdown
Owner

oh, this is a feature not a bug
when you type "l" -> it shows "ls" in the list
but when you already typed "ls" -> not showing anymore
because you already typed "ls" which means you may wanna use it, there is no point to show it anymore
the current command in prompt is "ls" -> don't show it in the list anymore, because I want user just tab tab tab to complete a full command
here an example:
"git" -> tab -> show "push" -> tab -> show "origin" -> tab -> show "main" -> tab
full comamnd: git push origin main
(in the best scenario if everything is on top of the list)

but according to you, if we still show the current command in the prompt:
"git" -> tab -> still shows "git" -> tab -> trigger "git" -> nothing changes -> spamming tab doesnt change anything

@JasCodes

Copy link
Copy Markdown
Author

From UX point view lets take your example
image
Unless its git and first option you will end up doing something like

gi<tab><space>p<tab><tab>

But even if we disagree with what the correct UX, it make sense to at least have configurability to be there as non-default option.

core.filter-exact-match:

true: (default) always filter exact matches.
false: always retain and rank exact matches first.

@versenilvis

versenilvis commented Oct 11, 2026 •

Copy link
Copy Markdown
Owner

(in the best scenario if everything is on top of the list)

read this first, I just give u an example
ofc we also have to use navigation
please record a video that show an example for why we need this

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.

2 participants