MitchellMarkGeorge / TabButler

A tab manager at your service.
https://tabbutler.netlify.app/
MIT License
43 stars 5 forks source link

Tab search doesn't work on already opened pages right after install #22

Closed andrei-g-git closed 2 years ago

andrei-g-git commented 2 years ago

Describe the bug After installing TabButler on Chrome or Brave, pressing ctrl + shift + space fails to open the tab search modal if done on a tab with an url that has already been open. The bug doesn't persist after loading another url in the same tab or another.

To Reproduce

  1. Open chrome, if TabButler is installed, uninstall
  2. Load a couple of websites (tested on wikipedia.org, twitter.com, reddit.com, duckduckgo.com, google.com)
  3. Install TabButler.
  4. Attempt to open the tab search modal on any of the previously opened websites.

Expected behavior The tab search popup should open on pressing ctrl + shift + space

Platform Info (please complete the following information):

MitchellMarkGeorge commented 2 years ago

@andrei-g-git I am aware of this issue and I have tried implementing a solution for this (might have to go a few commits back to see what I did ). Unfortunately my solution pretty much froze the entire browser when there were a lot of tabs (the reason the extension exists in the first place) 😫. I do have a few ideas of how to potentially improve it but on the welcome page right now we just tell the user that they might have to restart the browser. Not the best solution right now. I'm more than happy if you want to take a stab at it 😉😊

MitchellMarkGeorge commented 2 years ago

10

MitchellMarkGeorge commented 2 years ago

In my previous solution, I tried using a normal forEarch loop, but apparently they aren't very performant. I'll try again using the normal for loops and see if things are a bit better.

MitchellMarkGeorge commented 2 years ago

Currently working on this right now. Using the for loop seems to help but this requires host permissions to all urls that the user goes to. This might have to a sacrifice we will have to make to hace a food UX on install

MitchellMarkGeorge commented 2 years ago

@andrei-g-git I was able to finish this up. Please feel free to try it out and give any feedback.

andrei-g-git commented 2 years ago

Tried it, ctrl+shift+space works on chromium and firefox for me too now. Did turning the callback inside onInstalled.addListener , async do it?

MitchellMarkGeorge commented 2 years ago

@andrei-g-git Nope I pretty much just had to reimplement the whole thing with a native for loop.