Tree Tabs
-
@stvad That's ok, I packed Nightly today, so can you check this one out?
https://drive.google.com/open?id=1jf-8QtsaFlVjvFFBaU3PYcN8C6R7VcJG -
Ah I see. Is there a way to get tabs for all windows i.e {'windowId': [tab_list]} map and maybe then query current window id and pick only relevant tabs from that map (unless querying current window id have the same bug)?
This is what chrome.tabs.query({currentWindow: true}) is for. And this is where the bug is
Even with just tabs query where I get all tabs, I have no way to get current window, until this window becomes active. Because any command to get current window returns, active, not current. I don't know how to explain this better... -
@kroppy I understand the issue. The previous suggestion was more of an attempt to distinguish between the situation 'chrome.tabs.query({currentWindow: true})' has a bug (in which case it would've been possible to work around by using other methods) vs all methods to get current window id have a bug.
-
@kroppy Thanks, I'll give it a try.
-
@stvad This version seems to be working alright so far :). Thank you!
-
@kroppy As we are talking here I have a few notes on/requests for groups:
-
A minimal request is for an active group to switch if you've switched the tab (i.e. with Cmd+Tab/Cmd1..8) and the new tab is in an inactive group, as the current situation is rather confusing.
-
Not sure how feasible is this one, as it'd likely require an override of standard shortcuts, but it'd be great if groups felt more like 'windows' w.r.t. tab switching (Cmd+1..8; Cmd+9; Cmd+PgUp/PgDown). What I mean by this is that if I'm withing some tab group and I press Cmd +1 (go to the first tab) I expect to end up with the first tab in the group active, but I end up on the first tab of the window, which can be invisible (due to 1) and so the overall experience is rather confusing (and I do it all the time ). The same goes for Cmd+9 (go to the last tab) and others.
Thanks!
-
-
@kroppy just experienced the same issue again :(. It may sound funny but I notice a correlation with 'proper' browser shutdown. I.e. previous 2 times when I happen to restart the browser were because it has crashed and in those cases, the TreeTabs have preserved its state just fine. But I just did proper browser shutdown and start - and got the recurrence of the problem as a result
-
- Oh gosh indeed, I have it fixed now. It will activate group on switch.
- Unfortunately reserved browser keys cannot be replaced Even by user. I think I discussed it here, if not here, maybe on GitLab. Also commented many times on Firefox addons page...
Ctrl or Cmd + number are blocked by all browsers. Also Ctrl+Tab, Ctrl+Shift+Tab. There are many others too.
-
rt the browser were because it has crashed and in those cases, the TreeTabs have preserved its state just fine. But I just did proper browser shutdown and start - and got the recurrence of the problem as a result
Whoooaaa this is weird!.... Can you do a tiny test? Can you exit Vivaldi from menu File->Exit? And start again to see if problem persists?
-
@kroppy did a proper shutdown (File -> exit) and got the issue reproduced again (though this time I didn't lose the groups, but all tabs ended up in 'ungrouped' and the tree structure was lost).
-
@stvad What worries me is that, if groups are there and tabs land in ungrouped, could mean that my extension can't recognize tabs for some reason. If groups are restored it means that "windows" array is properly saved, but not "tabs" array... Do you have any other extension running beside TreeTabs?
-
@kroppy 1) Yay!
2) Yeah, I figured that there may be something like that =.
My mind gave me here an approach that may not be practical, but probably at least interesting to entertain . What if we take the active group and even though we're displaying it where it is - move the underlying tabs to the position when the would've been if it were the first group (don't know how computationally expensive is it)? That would solve the Cmd1-8 thing. The last tab is complicated though - to get a consistent Cmd+9 behavior - you'd need to move it to the global last place, but then move it to its 'proper' position when it becomes active or something like that -
@kroppy As far as I remember groups were not saved last time =/. I'll let you know any other farther datapoints I'll have.
Yes, I do have a bunch of other extensions. Didn't notice data corruption issues with any of them so far. -
@stvad Interesting approach... Moving all tabs from the group would be impossible, browser can be totally unresponsive while moving them all at once, this is why I move them gradually after user moved tabs in the panel and if no other task is running. But if I can move first ten and last one it could be done. Problem is that we come back to ctrl+tab problem again. For example if I move 10 tabs to the front and if user goes to 11th, it will fail to stay in group. Obviously I can try to do that and see how heavy it is in reality. Problem would still persist with the last tab when pressing ctrl+shift+tab to go back, if there was any group in the middle.
I will try to figure something out. -
@stvad Data is not necessarily corrupted. It may be some extension that replaces tabs, session, urls, blocks javascript or something similar.
If you start vivaldi, and turn on debug mode in my extension, after start did it say in console something like "Attempt x failed, matched tabs was below 50%?
If so, maybe you should try disabling other extensions one by one, to see if problem persists? We could then find if any of those extensions is incompatible, and maybe I could find a workaround, by trying out that extension by myself.
It's really hard to guess, if I don't know much -
@kroppy Just lost all my folders again, and 'Load last internal backup' is greyed out again. Happened this time after a clean exit of browser and then a windows update on restarting the PC (could be coincidence, but the only thing I can think that changed). I have 6 extensions other than Tree Tabs, and have had all these for many months:
Adblock Plus
AppearIn screen share
LastPass
Streak CRM
Tampermonkey (one script on gmail domain)
Vue.jsAnything I can do to try to get the folders back?
-
@dsl101 Download latest Nightly version. It's 1.6 release candidate.
https://drive.google.com/drive/folders/1jf-8QtsaFlVjvFFBaU3PYcN8C6R7VcJG
Download one with today's date. -
Installed OK, but I guess it wasn't supposed to restore my old folders, but just be more resilient in case something bad happens again?
I exported the session before closing Vivaldi to upgrade TT, and I don't see any of my old folder names in that session file anyway. In fact, I see
"folders":{}
near the beginning, and the session exported from my laptop has lots of data in that object... -
Some more data points:
Since my laptop had many similar folders, I decided to try 'Import and merge session', to see if it would put at least some of the structure back. It opened a new browser window with a copy of all the tabs from my laptop, rather than merging the structure (so now I have one window with folders, identical to my laptop, and the original window with many dozens of tabs and no folders). Not sure if that's what was supposed to happen?
I've also got, in the new window with folders, many tabs which have a URL of
chrome-extension://fmbnbepfphepnocngkjfnkadjfjnnlhi/
. It has the Tree Tabs favicon, and the 'This site can't be reached' error page. All the pages like that are identical in URL, and there's nothing else after.Note the version of TT on my laptop (where the session was exported) isn't not the new version. So I upgraded my laptop installation of TT, exported its session (which still has folders) and tried to merge that with my desktop session. This time, 'Import and merge' didn't do anythingβno new window, no change to tabs, no folders, etc. So I'm not sure if that's expected or not at this stage.
Finally, importing the full session from my laptop created a new window with folders and tabs as expected, so I will abandon the old session and start from there :).
Many thanks again for your work on thisβdespite the teething troubles, it's a daily time saver for me when working on many different projects.
-
@dsl101 Sorry for the lack of response I was out for work.
but I guess it wasn't supposed to restore my old folders, but just be more resilient in case something bad happens again?
Yes in a nutshell. Emergency buttons should be immediately available if found in local storage.
Also there is a new manager in toolbar with autosaves. I will add merge session icon, for now you can load only to new windows.I exported the session before closing Vivaldi to upgrade TT, and I don't see any of my old folder names in that session file anyway. In fact, I see "folders":{} near the beginning, and the session exported from my laptop has lots of data in that object...
Probably overwritten already... Sorry