feat: add intelligent tab grouping by similarity
This feature automatically organizes workspace tabs into categories based on their content and domain.
How it works:
- Analyzes all unpinned tabs in the active workspace
- Uses keyword matching to categorize tabs by topic (Development, Social, Shopping, Video, News, etc.)
- Groups similar tabs together with visual category headers (Similar to Arc Browser)
The grouping is triggered via a new 'Group' button in the workspace toolbar.
Is not probably the best way to categorize it, a better future way would be to use AI to generate the categories based on the pages, instead of having a map with keyword, but this is definetely a cheaper way.
Localization support added for: en-US, en-GB, it (AI generated Language files, IT as is my main language)
This is how the "Group" button is implemented in the UI, and also how the categories are shown in the sidebar.
Have you tested this by the way?
Have you tested this by the way?
Yes i did tested, but my bad, I've let AI do some things and didn't realized it forced pushed, I fixed it by restoring the working version, i'm really sorry for the confusion.
Here is a video showing the functionality:
https://github.com/user-attachments/assets/c83f04a2-c331-476c-b988-ec0192c4fd7a
I think we should be using Firefox's local llm for this, no?
This is noisier than it needs to be.
Also the list feels way too subjective. The Internet is way too big to be condensed and grouped in that way.
It also means that if we want to change the list we have to release a new version.
I think we should be using Firefox's local llm for this, no?
didn't know i could do that, will implement that now
This is noisier than it needs to be.
Also the list feels way too subjective. The Internet is way too big to be condensed and grouped in that way.
It also means that if we want to change the list we have to release a new version.
Yep, I believe having a small, local LLM that just takes a look at tab titles and domains could serve just as good. Good thing about Firefox's LLM is that its not intrusive, its private and doesn't really do anything unless it being explicitly called. IIRC they now use the GPU for them as well? Meaning they are faster and less resource intensive.
@matteomekhail read: https://firefox-source-docs.mozilla.org/toolkit/components/ml/api.html
Been trying to implement this LLM model solution in the last couple of days, and none of those can give me good result
BGE-base (or even small): Pros: stronger embeddings, fewer random merges. Cons: still splits similar brands (Audi/Mercedes), many micro-clusters
all-MiniLM-L6-v2: Pros: model tailored for clustering, lightweight. Cons: extremely sensitive threshold; based on configuration, either single-tab clusters, otherwise mixes distant domains
distilgpt2 : Pros: basically none lol, just very light and fast Cons: not instruction-tuned → needs heavy prompt engineering/parsing; still overuses the “Other” category, basically it can't understand how to categorize them
All the other Xenova model don't do the job as well, either they not able to generate the right categories title, or they will not categorize correctly ( ad example not merging adidas, nike, gucci or Lv under the same category)
The only approach that i've tried and it sorta work is a domain based, where i just look at the URL and merge them if they have the same based (merge all the yt tabs ad example) but that will not create a "video" category including other video provider like vimeo (as is a different domain)
I really want to implement this feature in the best possible way as it was my favorite feature on Arc, so if anyone has any idea or model to try i'll be very happy to
By "cluster" i mean a collection of tabs under a URL Thanks for making the PR a draft! i should have done it sooner @mr-cheffy
@matteomekhail I'm not sure if it could be any help, but I vibecoded a project like this that used two of the models Firefox uses to sort tabs (as I had the same issues as you with the other model) and had amazing results. I learned quite a lot about how it all worked in the process, so if I could help in any way, please feel free to reach out.
https://github.com/Vertex-Mods/Zen-Tidy-Tabs
I would also look on searchfox and try to find the prompt they use for naming the tabs, as I don't remember off the top of my head
@matteomekhail I'm not sure if it could be any help, but I vibecoded a project like this that used two of the models Firefox uses to sort tabs (as I had the same issues as you with the other model) and had amazing results. I learned quite a lot about how it all worked in the process, so if I could help in any way, please feel free to reach out.
https://github.com/Vertex-Mods/Zen-Tidy-Tabs
wow i just saw the screenshot and it looks good! i'll have a look at the code tomorrow, thank you!
Firefox does have an auto-grouping feature, might be worth to checkout how they do it:
https://searchfox.org/firefox-main/source/browser/components/tabbrowser/SmartTabGrouping.sys.mjs
Firefox does have an auto-grouping feature, might be worth to checkout how they do it:
https://searchfox.org/firefox-main/source/browser/components/tabbrowser/SmartTabGrouping.sys.mjs
~~That's the model I use in the script~~
Ignore this, two different things.
@matteomekhail I'm not sure if it could be any help, but I vibecoded a project like this that used two of the models Firefox uses to sort tabs (as I had the same issues as you with the other model) and had amazing results. I learned quite a lot about how it all worked in the process, so if I could help in any way, please feel free to reach out.
https://github.com/Vertex-Mods/Zen-Tidy-Tabs
wow i just saw the screenshot and it looks good! i'll have a look at the code tomorrow, thank you!
I might suggest feeding it the url along with the title when you give it to the naming model, and if possible the tabs history, as Arc seems to do that too. I can also provide the prompts that Arc uses, I will drop the link here when I find it.
This is all the prompts TBC uses in there AI stuff: https://github.com/neurokitti/Arc-genAI
@matteomekhail I'm not sure if it could be any help, but I vibecoded a project like this that used two of the models Firefox uses to sort tabs (as I had the same issues as you with the other model) and had amazing results. I learned quite a lot about how it all worked in the process, so if I could help in any way, please feel free to reach out.
https://github.com/Vertex-Mods/Zen-Tidy-Tabs
wow i just saw the screenshot and it looks good! i'll have a look at the code tomorrow, thank you!
I might suggest feeding it the url along with the title when you give it to the naming model, and if possible the tabs history, as Arc seems to do that too. I can also provide the prompts that Arc uses, I will drop the link here when I find it.
This is all the prompts TBC uses in there AI stuff: https://github.com/neurokitti/Arc-genAI
Yep, I thought about that too, I also considered feeding the metadata from each tab’s meta tag, but that feels a bit over-engineered The only issue I’ve found before with feeding the whole URL is that, on sites like YouTube, if a video has a title like “playing bla bla bla”, it treats it as if it were a playing website rather than a video player, and puts it in a different cluster. I’ll try your solution tomorrow and see if I get the same behavior
I've implemented the solution using 12th suggestion, and it works much better now. It’s still not a perfect solution (ad example streaming instead of clothing, see video for reference) , but given the models available at the moment, I believe it’s the best possible solution, can always be upgraded later as smaller and better models will release and become available in Firefox.
Any suggestion to improve it is appreciate it! Tomorrow i'll make the UI look cleaner & add an animation while the model works
Attached is the video showing a demo
https://github.com/user-attachments/assets/277b9c81-e502-4e95-bc9a-0aa346ab0fb5
Thanks @12th-devs again :)
Yeah of course, glad it worked out!
Please let me know when its done for review!
Please let me know when its done for review!
Sure it is ready now, Thank you!
What all still needs to happen here?
@matteomekhail from what I remember, the AI model sorted the tabs really fast, so I added a minimum time in the UI as it made it feel more natural, because of it doing the sorting instantly and seemed unsettling to me almost. Just something to consider based on your testing
@matteomekhail from what I remember, the AI model sorted the tabs really fast, so I added a minimum time in the UI as it made it feel more natural, because of it doing the sorting instantly and seemed unsettling to me almost. Just something to consider based on your testing
That's probably a good idea, i don't want it to feel fake thought, i will try to see what it feels better