Skip to content

Conversation

@matteomekhail
Copy link

@matteomekhail matteomekhail commented Nov 4, 2025

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 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 intelligent keyword matching to categorize tabs by topic (Development, Social, Shopping, Video, News, etc.)
- Groups similar tabs together with visual category headers
- Maintains logical ordering with priority-based sorting
- New tabs automatically stay above categorized groups

The grouping is triggered via a new 'Group' button in the workspace toolbar.
Categories include: Development, Social Media, Shopping, Video/Streaming, News, Productivity, Finance, Gaming, and more.

Localization support added for: en-US, en-GB, it
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. Feature labels Nov 4, 2025
@matteomekhail
Copy link
Author

image

This is how the "Group" button is implemented in the UI, and also how the categories are shown in the sidebar.

@dosubot dosubot bot added size:XXL This PR changes 1000+ lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Nov 4, 2025
@mr-cheffy
Copy link
Member

Have you tested this by the way?

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:XXL This PR changes 1000+ lines, ignoring generated files. labels Nov 4, 2025
@matteomekhail
Copy link
Author

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:

Screen.Recording.2025-11-04.at.21.18.31.mov

@mr-cheffy
Copy link
Member

I think we should be using Firefox's local llm for this, no?

@ZiedYousfi
Copy link

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.

@matteomekhail
Copy link
Author

I think we should be using Firefox's local llm for this, no?

didn't know i could do that, will implement that now

@mr-cheffy
Copy link
Member

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

@mr-cheffy mr-cheffy marked this pull request as draft November 9, 2025 17:34
@matteomekhail
Copy link
Author

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

@12th-devs
Copy link
Contributor

@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

@12th-devs
Copy link
Contributor

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
Copy link
Author

@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!

@mr-cheffy
Copy link
Member

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

@12th-devs
Copy link
Contributor

12th-devs commented Nov 11, 2025

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.

@12th-devs
Copy link
Contributor

12th-devs commented Nov 11, 2025

@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
Copy link
Author

@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

Uses Firefox's smart-tab-embedding and smart-tab-topic models to cluster tabs by semantic similarity and generate category labels based on URLs, titles, and browsing history.
@matteomekhail
Copy link
Author

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

Screen.Recording.2025-11-12.at.17.07.27.mov

Thanks @12th-devs again :)

@12th-devs
Copy link
Contributor

Yeah of course, glad it worked out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants