Skip to content

feat: add filtering to manager ui#132

Open
ngtv2409 wants to merge 9 commits into
romus204:mainfrom
ngtv2409:manager-filter
Open

feat: add filtering to manager ui#132
ngtv2409 wants to merge 9 commits into
romus204:mainfrom
ngtv2409:manager-filter

Conversation

@ngtv2409

Copy link
Copy Markdown

Add new key f to filter parsers by status.

@tunaflsh

Copy link
Copy Markdown
Collaborator

I am thinking instead of prompting for the filter mode, just cycle between all, warn, fail, ok.

@ngtv2409

ngtv2409 commented Jun 17, 2026

Copy link
Copy Markdown
Author

I am thinking instead of prompting for the filter mode, just cycle between all, warn, fail, ok.

That's actually my first thought but I thought that being able to specify different status at the same time would be useful, though maybe it's not that useful. So I guess I'll do that then.

@tunaflsh

Copy link
Copy Markdown
Collaborator

It's much faster to just repeatedly press f. Another thing we can add maybe is to sort the list of languages based on the status in the all mode. That would have the same effect as the warn,ok filter?

@ngtv2409

Copy link
Copy Markdown
Author

It's much faster to just repeatedly press f. Another thing we can add maybe is to sort the list of languages based on the status in the all mode. That would have the same effect as the warn,ok filter?

I think that's a good point considering the use case of this.

@tunaflsh

Copy link
Copy Markdown
Collaborator

There are a few more edge cases.

  • When you are in the ok mode and remove a language, and want to reinstall it you will have to cycle back to all or fail and search for the language.
  • Also I think it makes more sense to have a mode installed instead of ok which should include both ok and warn. Because both are technically installed, but the other is just missing dependencies.

So what I propose is to keep the current list of languages and the order fixed unless your reopen the UI or press f. And have four modes: all, installed, warning, missing. Also, I think instead of printing "None" just cycle to the next mode.

@ngtv2409

Copy link
Copy Markdown
Author

good ideas.

@tunaflsh

This comment was marked as off-topic.

@ngtv2409

This comment was marked as off-topic.

@tunaflsh

This comment was marked as off-topic.

tunaflsh added 2 commits June 18, 2026 08:18
- The list and the order of the languages in a filter mode persists
  until refresh. Only the status updates.
- The status is synchronize with the keymaps and the user commands.
- _act() function is removed from the ui.
- Dynamically compute the buffer width with maxlang, maxline
@tunaflsh

Copy link
Copy Markdown
Collaborator

I did a lot of refactoring.

Changes

  • The list of languages is persistent until you refresh. So uninstalling a language from filtre mode installed doesn't make it disappear.
  • All buffer keymaps sync the status as before, but now user commands like TSInstall will also sync to the buffer.
  • Removed _act (BREAKING).
  • The filter cycle skips duplicating modes. For example, if the installed mode has only warnings pressing f will skip straight to the missing mode. The normal cycle is all -> installed -> warning -> missing.

@romus204 would you take a look?

@tunaflsh tunaflsh mentioned this pull request Jun 19, 2026
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