Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tab positions changed. Every item moved one step up. #3504

Closed
thnee opened this issue Mar 20, 2024 · 9 comments
Closed

Tab positions changed. Every item moved one step up. #3504

thnee opened this issue Mar 20, 2024 · 9 comments

Comments

@thnee
Copy link

thnee commented Mar 20, 2024

Abstract

When starting Firefox, the positions of tabs has changed.

The tab positions change according to a specific pattern. It's like the position of which tab is a parent is shifted by one item.

Before. This is correct. This is how I organized my tabs.

X
A
    A1
    A2
    A3
B
    B1
    B2
    B3
C
    C1
    C2
    C3
Y

After. This is not correct. This is not how I had my tabs organized the day before.

X
A
A1
    A2
    A3
    B
B1
    B2
    B3
    C
C1
    C2
    C3
    Y

Steps to reproduce

This problem happens when starting up Firefox. Typically when starting Firefox first thing in the morning after having the computer turned off for several hours.

It never happens multiple times in the same day. There is always a long time between each occurrance of the problem. If I close the browser now and open it again, the tab positions do not change.

I'm not entirely sure what's going on here, it's pretty weird and frustrating.

But I did notice that today there was a new version of Firefox, and it had opened the "What's new in Firefox" tab at the end. Perhaps that new tab is what's causing everything to shift?

Expected result

Tabs should remain in the position that I left them.

Actual result

Tabs have changed position according to a specific pattern.

Environment

  • Platform (OS): Windows 10
  • Version of Firefox: 124.0 (64-bit)
  • Version (or revision) of Tree Style Tab: 4.0.8

Other extensions: Dark Reader, Imagus, Reddit Enhancement Suite, uBlock Origin.

Number of tabs open: 100+

userChrome.css

#TabsToolbar
{
    visibility: collapse;
}
@obacht8
Copy link

obacht8 commented Mar 20, 2024

same issue here
happened least on 2024.03.17 for the first time - so it´s maybe already since 4.0.7 or even 4.0.6, can´t say exactly as I have auto-update active for addons...
Firefox 123.0.1 (20240304104836) - this version is installed since 2024.03.07 , therefore I do not think it is the firefox-version that caused it (?) but who knows, I can´t even say for sure that I recognized the issue right away as I am always searching my tabs anyway...
Yes, very annoying...

@piroor
Copy link
Owner

piroor commented Mar 20, 2024

I've confirmed this after a restart across major versions of Nightly. The "You’ve just been upgraded to Firefox Nightly" tab - similar page will appear on release versions - looks to be the trigger.

I missed this for a long time because I ordinarily use the latest development revision of TST and it is loaded via web-ext as a temporary addon so the timing of initialization process is different from regular install...

@obacht8
Copy link

obacht8 commented Mar 20, 2024

Nightly

As far as I am aware I do not have nightly installed but the "normal" FF for desktop... Or is that just an example?

@piroor
Copy link
Owner

piroor commented Mar 20, 2024

It is just an example. Actually same problem should happen across major versions of regular Firefox, like 123 to 124.

@obacht8
Copy link

obacht8 commented Mar 20, 2024

I missed this for a long time

so maybe THAT was the reason I was always searching my tabs :-) I thought there might be something wrong with my memory...

@piroor
Copy link
Owner

piroor commented Mar 20, 2024

Sadly shifted tree structure is not unshifted easily - you need to use the developer console. Steps:

  1. Go to about:debugging.
  2. Click "This Firefox" in the left pane.
  3. Find "Tree Style Tab" in the "Extensions" section.
  4. Click "Inspect".
  5. Select the "Console" tab.
  6. Select "/background/background.html" from the target windows list: image
  7. Run following script.
(async () => {
  const TreeBehavior = await import('/common/tree-behavior.js');
  const Tree = await import('/background/tree.js');
  const tabs = await Tab.getAllTabs((await browser.windows.getCurrent()).id);
  const structure = TreeBehavior.getTreeStructureFromTabs(tabs);
  structure.shift();
  structure.push(TreeBehavior.STRUCTURE_NO_PARENT);
  Tree.applyTreeStructureToTabs(tabs, structure);
})();

@piroor
Copy link
Owner

piroor commented Mar 20, 2024

The commit d2c7e71 should fix this - already shifted tree are not fixed but existing tree won't be shifted after this change.

@piroor piroor added the fixed label Mar 20, 2024
@obacht8
Copy link

obacht8 commented Mar 20, 2024

Thanks for providing the repair-script, that did the trick!
Also Thanks for your quick response!
much appreciated!

edit: at first sight after the script a lot of tabs seem to be lost... don´t panic but restart FF and everything is there as it was before....

@thnee
Copy link
Author

thnee commented Mar 21, 2024

Thank you so much for the fast fix! I haven't verified it, as it only happens rarely when using normal Firefox with normal release cycle. But it definitely sounds like your testing with Nightly covers it!

@thnee thnee closed this as completed Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants