jasonjmcghee / rem

An open source approach to locally record and enable searching everything you view on your Mac.
https://rem.ing
MIT License
2.18k stars 60 forks source link

Filter by app names #56

Closed caetano-dev closed 5 months ago

caetano-dev commented 5 months ago

This pull request adds a feature that lets the user choose a given app to search by adding a !<name> prefix.

caetano-dev commented 5 months ago

Damn, I had not thought about that! It will search only for the first word after the !

Maybe letting the user search for !app-store or !"App Store" could be a fix? Or maybe rethink the way we make this filtering.

Capture d’écran 2024-01-02 à 21 27 06
jasonjmcghee commented 5 months ago

I bet !"two words" is fine for now, but ideally we'd have a separate sql table of unique application names that we could retrieve from and have a dropdown filter

caetano-dev commented 5 months ago

I added a dropdown filter next to the search bar and reverted the changes to search with !.

The apps shown in the menu are updated according to the user's data, meaning that if the user opens a new app, it will be added to the menu, and if the user deletes all their data, the menu will only show "All apps".

https://github.com/jasonjmcghee/rem/assets/55260356/9fc82a0d-a5fa-4fda-8e53-16cba9e82a23

jasonjmcghee commented 5 months ago

On second pass, when does getAppFilterData get called? Only on initial creation? If I close search and use a new app and reopen it, will it show up?

caetano-dev commented 5 months ago

Yes. If you close search, open a new app and search for it again, it will show up.

I am working on the new database table for unique app names. I am testing it and will push the code soon. I hope it addresses the possible performance issues.

jasonjmcghee commented 5 months ago

Awesome - happy to merge this as is, and you can open a second pr!

caetano-dev commented 5 months ago

Before you merge: I noticed that after stopping the first screen recording and starting a new one, the new frames only show up after searching for something. Do you know if this is something that had already been happening before?

jasonjmcghee commented 5 months ago

When you open search / timeline it pauses the recording and processes what it's seen so far. It might be the case that we aren't calling the retrieve results again automatically when new frames come in and/or not showing frames that don't yet have a thumbnail.

Either case I don't think you introduced the behavior. But if you want to confirm, you can try on main branch!

jasonjmcghee commented 5 months ago

@caetano-dev want me to merge this first, then #62 ? Both are looking good!

caetano-dev commented 5 months ago

Sure, you can do that!

caetano-dev commented 5 months ago

Please, also try to test the changes in your machine before merging with the main branch.

It is working for me, but the more people test it, the better.

When testing #62, maybe you will need to purge the data to ensure the new table is created.

jasonjmcghee commented 5 months ago

Couple of small tweaks to make proper spacing for the search, and added a border for better visibility.

I'll add them after merging!

image