mbnuqw / sidebery

Firefox extension for managing tabs and bookmarks in sidebar.
MIT License
3.26k stars 163 forks source link

Sidebery flatten all tabs after restart Firefox #1368

Open CoelacanthusHex opened 9 months ago

CoelacanthusHex commented 9 months ago

Steps to reproduce

Expected behavior

Tabs are grouped according to the state before the restart

Actual behavior

Observe that all tabs are flattened.

Debug info

Addon data ```json { "addonVersion": "5.0.0", "firefoxVersion": "122.0a1", "settings": { "nativeScrollbars": true, "nativeScrollbarsThin": true, "nativeScrollbarsLeft": true, "selWinScreenshots": false, "updateSidebarTitle": true, "markWindow": false, "markWindowPreface": "[Sidebery] ", "ctxMenuNative": true, "ctxMenuRenderInact": true, "ctxMenuRenderIcons": true, "ctxMenuIgnoreContainers": "", "navBarLayout": "horizontal", "navBarInline": true, "navBarSide": "left", "hideAddBtn": false, "hideSettingsBtn": false, "navBtnCount": true, "hideEmptyPanels": true, "hideDiscardedTabPanels": false, "navActTabsPanelLeftClickAction": "none", "navActBookmarksPanelLeftClickAction": "none", "navTabsPanelMidClickAction": "discard", "navBookmarksPanelMidClickAction": "none", "navSwitchPanelsWheel": true, "subPanelRecentlyClosedBar": true, "subPanelBookmarks": true, "subPanelHistory": true, "groupLayout": "grid", "containersSortByName": false, "skipEmptyPanels": false, "dndTabAct": true, "dndTabActDelay": 750, "dndTabActMod": "none", "dndExp": "pointer", "dndExpDelay": 750, "dndExpMod": "none", "dndOutside": "win", "dndActTabFromLink": true, "dndActSearchTab": true, "dndMoveTabs": false, "dndMoveBookmarks": false, "searchBarMode": "dynamic", "searchPanelSwitch": "same_type", "searchBookmarksShortcut": "", "searchHistoryShortcut": "", "warnOnMultiTabClose": "collapsed", "activateLastTabOnPanelSwitching": true, "activateLastTabOnPanelSwitchingLoadedOnly": true, "switchPanelAfterSwitchingTab": "always", "tabRmBtn": "hover", "activateAfterClosing": "next", "activateAfterClosingStayInPanel": false, "activateAfterClosingGlobal": false, "activateAfterClosingNoFolded": true, "activateAfterClosingNoDiscarded": true, "askNewBookmarkPlace": true, "tabsRmUndoNote": true, "tabsUnreadMark": false, "tabsUpdateMark": "all", "tabsUpdateMarkFirst": true, "tabsReloadLimit": 5, "tabsReloadLimitNotif": true, "showNewTabBtns": true, "newTabBarPosition": "after_tabs", "tabsPanelSwitchActMove": false, "tabsPanelSwitchActMoveAuto": true, "tabsUrlInTooltip": "full", "newTabCtxReopen": false, "tabWarmupOnHover": true, "tabSwitchDelay": 0, "moveNewTabPin": "start", "moveNewTabParent": "last_child", "moveNewTabParentActPanel": false, "moveNewTab": "end", "moveNewTabActivePin": "start", "pinnedTabsPosition": "panel", "pinnedTabsList": false, "pinnedAutoGroup": false, "pinnedNoUnload": false, "tabsTree": true, "groupOnOpen": true, "tabsTreeLimit": "none", "autoFoldTabs": false, "autoFoldTabsExcept": "none", "autoExpandTabs": false, "autoExpandTabsOnNew": false, "rmChildTabs": "folded", "tabsLvlDots": true, "discardFolded": false, "discardFoldedDelay": 0, "discardFoldedDelayUnit": "sec", "tabsTreeBookmarks": true, "treeRmOutdent": "branch", "ignoreFoldedParent": false, "colorizeTabs": false, "colorizeTabsSrc": "domain", "colorizeTabsBranches": false, "colorizeTabsBranchesSrc": "url", "inheritCustomColor": true, "hideInact": false, "hideFoldedTabs": false, "hideFoldedParent": "none", "nativeHighlight": false, "warnOnMultiBookmarkDelete": "collapsed", "autoCloseBookmarks": false, "autoRemoveOther": false, "highlightOpenBookmarks": false, "activateOpenBookmarkTab": false, "showBookmarkLen": true, "bookmarksRmUndoNote": true, "loadBookmarksOnDemand": true, "pinOpenedBookmarksFolder": true, "oldBookmarksAfterSave": "ask", "loadHistoryOnDemand": true, "fontSize": "xs", "animations": true, "animationSpeed": "norm", "theme": "plain", "density": "default", "colorScheme": "ff", "sidebarCSS": true, "groupCSS": false, "snapNotify": true, "snapExcludePrivate": false, "snapInterval": 0, "snapIntervalUnit": "min", "snapLimit": 0, "snapLimitUnit": "snap", "snapAutoExport": false, "snapAutoExportType": "json", "snapAutoExportPath": "Sidebery/snapshot-%Y.%M.%D-%h.%m.%s", "snapMdFullTree": false, "hScrollAction": "none", "navSwitchPanelsDelay": 128, "scrollThroughTabs": "none", "scrollThroughVisibleTabs": true, "scrollThroughTabsSkipDiscarded": true, "scrollThroughTabsExceptOverflow": true, "scrollThroughTabsCyclic": false, "scrollThroughTabsScrollArea": 0, "autoMenuMultiSel": true, "multipleMiddleClose": false, "longClickDelay": 500, "wheelThreshold": false, "wheelThresholdX": 10, "wheelThresholdY": 60, "tabDoubleClick": "none", "tabsSecondClickActPrev": true, "tabsSecondClickActPrevPanelOnly": false, "shiftSelAct": true, "activateOnMouseUp": false, "tabLongLeftClick": "none", "tabLongRightClick": "none", "tabMiddleClick": "close", "tabMiddleClickCtrl": "discard", "tabMiddleClickShift": "duplicate", "tabCloseMiddleClick": "close", "tabsPanelLeftClickAction": "none", "tabsPanelDoubleClickAction": "tab", "tabsPanelRightClickAction": "menu", "tabsPanelMiddleClickAction": "tab", "newTabMiddleClickAction": "new_child", "bookmarksLeftClickAction": "open_in_act", "bookmarksLeftClickActivate": false, "bookmarksLeftClickPos": "default", "bookmarksMidClickAction": "open_in_new", "bookmarksMidClickActivate": false, "bookmarksMidClickRemove": false, "bookmarksMidClickPos": "default", "historyLeftClickAction": "open_in_act", "historyLeftClickActivate": false, "historyLeftClickPos": "default", "historyMidClickAction": "open_in_new", "historyMidClickActivate": false, "historyMidClickPos": "default", "syncName": "Firefox Nightly @ Helium", "syncSaveSettings": true, "syncSaveCtxMenu": true, "syncSaveStyles": true, "syncSaveKeybindings": true, "selectActiveTabFirst": true }, "permissions": { "allUrls": true, "webRequest": true, "webRequestBlocking": true, "proxy": true, "tabHide": true, "clipboardWrite": true, "history": true, "bookmarks": true, "downloads": true }, "storage": { "size": "488 kb", "props": { "containers": "1.07 kb", "contextMenu": "1.65 kb", "expandedBookmarkFolders": "58 b", "favDomains": "10.7 kb", "favHashes": "2.51 kb", "favicons_01": "461 kb", "favicons_02": "2 b", "favicons_03": "2 b", "favicons_04": "2 b", "favicons_05": "2 b", "profileID": "14 b", "settings": "4.83 kb", "sidebar": "391 b", "sidebarCSS": "170 b", "tabsDataCache": "5.3 kb", "ver": "7 b" } }, "sidebar": { "panels": { "6J2btLmWkPFz": { "type": 2, "id": "6J2btLmWkPFz", "name": "len: 3", "color": "toolbar", "iconSVG": "icon_tabs", "iconIMGSrc": "", "iconIMG": "", "lockedPanel": false, "skipOnSwitching": false, "noEmpty": false, "newTabCtx": "none", "dropTabCtx": "none", "moveRules": [], "moveExcludedTo": -1, "bookmarksFolderId": -1, "newTabBtns": [], "srcPanelConfig": null } }, "nav": [ "6J2btLmWkPFz", "add_tp", "sp-0", "settings" ] }, "containers": [ { "id": "firefox-container-1", "cookieStoreId": "firefox-container-1", "name": "2", "icon": "...", "color": "blue", "colorCode": "#37adff", "proxified": false, "proxy": null, "reopenRulesActive": false, "reopenRules": [], "userAgentActive": false, "userAgent": "" }, { "id": "firefox-container-2", "cookieStoreId": "firefox-container-2", "name": "2", "icon": "...", "color": "orange", "colorCode": "#37adff", "proxified": false, "proxy": null, "reopenRulesActive": false, "reopenRules": [], "userAgentActive": false, "userAgent": "" }, { "id": "firefox-container-3", "cookieStoreId": "firefox-container-3", "name": "2", "icon": "...", "color": "green", "colorCode": "#37adff", "proxified": false, "proxy": null, "reopenRulesActive": false, "reopenRules": [], "userAgentActive": false, "userAgent": "" }, { "id": "firefox-container-4", "cookieStoreId": "firefox-container-4", "name": "2", "icon": "...", "color": "pink", "colorCode": "#37adff", "proxified": false, "proxy": null, "reopenRulesActive": false, "reopenRules": [], "userAgentActive": false, "userAgent": "" } ], "sidebarCSSLen": "156", "windows": [ { "state": "maximized", "incognito": false, "tabsCount": 52 } ], "bookmarks": { "bookmarksCount": 1997, "foldersCount": 75, "separatorsCount": 5, "maxDepth": 3 } } ```
Logs
CoelacanthusHex commented 9 months ago

Addition Information: I tested the Tree Style Tab, and it can restore the tree properly after restarting Firefox.

CoelacanthusHex commented 9 months ago

It can be reproduced in Firefox ESR 115.5.0 as well.

Avimitin commented 9 months ago

Using Firefox 120.0.1 on Arch Linux. This issue can be reproduce on my machine too.

qyl27 commented 9 months ago

Using Firefox 120.0.1 on Windows 11, it also can be reproduced on my machine.

Plugin debugging information:

```json { "addonVersion": "5.0.0", "firefoxVersion": "120.0.1", "settings": { "nativeScrollbars": true, "nativeScrollbarsThin": true, "nativeScrollbarsLeft": false, "selWinScreenshots": false, "updateSidebarTitle": true, "markWindow": false, "markWindowPreface": "[Sidebery] ", "ctxMenuNative": false, "ctxMenuRenderInact": true, "ctxMenuRenderIcons": true, "ctxMenuIgnoreContainers": "", "navBarLayout": "horizontal", "navBarInline": true, "navBarSide": "left", "hideAddBtn": false, "hideSettingsBtn": false, "navBtnCount": true, "hideEmptyPanels": true, "hideDiscardedTabPanels": false, "navActTabsPanelLeftClickAction": "none", "navActBookmarksPanelLeftClickAction": "none", "navTabsPanelMidClickAction": "discard", "navBookmarksPanelMidClickAction": "none", "navSwitchPanelsWheel": true, "subPanelRecentlyClosedBar": true, "subPanelBookmarks": true, "subPanelHistory": true, "groupLayout": "grid", "containersSortByName": false, "skipEmptyPanels": false, "dndTabAct": true, "dndTabActDelay": 750, "dndTabActMod": "none", "dndExp": "pointer", "dndExpDelay": 750, "dndExpMod": "none", "dndOutside": "win", "dndActTabFromLink": true, "dndActSearchTab": true, "dndMoveTabs": false, "dndMoveBookmarks": false, "searchBarMode": "dynamic", "searchPanelSwitch": "same_type", "searchBookmarksShortcut": "", "searchHistoryShortcut": "", "warnOnMultiTabClose": "collapsed", "activateLastTabOnPanelSwitching": true, "activateLastTabOnPanelSwitchingLoadedOnly": true, "switchPanelAfterSwitchingTab": "always", "tabRmBtn": "hover", "activateAfterClosing": "next", "activateAfterClosingStayInPanel": false, "activateAfterClosingGlobal": false, "activateAfterClosingNoFolded": true, "activateAfterClosingNoDiscarded": true, "askNewBookmarkPlace": true, "tabsRmUndoNote": true, "tabsUnreadMark": false, "tabsUpdateMark": "all", "tabsUpdateMarkFirst": true, "tabsReloadLimit": 5, "tabsReloadLimitNotif": true, "showNewTabBtns": true, "newTabBarPosition": "after_tabs", "tabsPanelSwitchActMove": false, "tabsPanelSwitchActMoveAuto": true, "tabsUrlInTooltip": "full", "newTabCtxReopen": false, "tabWarmupOnHover": true, "tabSwitchDelay": 0, "moveNewTabPin": "start", "moveNewTabParent": "last_child", "moveNewTabParentActPanel": false, "moveNewTab": "end", "moveNewTabActivePin": "start", "pinnedTabsPosition": "panel", "pinnedTabsList": false, "pinnedAutoGroup": false, "pinnedNoUnload": false, "tabsTree": true, "groupOnOpen": true, "tabsTreeLimit": "none", "autoFoldTabs": false, "autoFoldTabsExcept": "none", "autoExpandTabs": false, "autoExpandTabsOnNew": false, "rmChildTabs": "folded", "tabsLvlDots": true, "discardFolded": false, "discardFoldedDelay": 0, "discardFoldedDelayUnit": "sec", "tabsTreeBookmarks": true, "treeRmOutdent": "branch", "ignoreFoldedParent": false, "colorizeTabs": false, "colorizeTabsSrc": "domain", "colorizeTabsBranches": false, "colorizeTabsBranchesSrc": "url", "inheritCustomColor": true, "hideInact": false, "hideFoldedTabs": false, "hideFoldedParent": "none", "nativeHighlight": false, "warnOnMultiBookmarkDelete": "collapsed", "autoCloseBookmarks": false, "autoRemoveOther": false, "highlightOpenBookmarks": false, "activateOpenBookmarkTab": false, "showBookmarkLen": true, "bookmarksRmUndoNote": true, "loadBookmarksOnDemand": true, "pinOpenedBookmarksFolder": true, "oldBookmarksAfterSave": "ask", "loadHistoryOnDemand": true, "fontSize": "m", "animations": true, "animationSpeed": "norm", "theme": "proton", "density": "default", "colorScheme": "ff", "sidebarCSS": false, "groupCSS": false, "snapNotify": true, "snapExcludePrivate": false, "snapInterval": 0, "snapIntervalUnit": "min", "snapLimit": 0, "snapLimitUnit": "snap", "snapAutoExport": false, "snapAutoExportType": "json", "snapAutoExportPath": "Sidebery/snapshot-%Y.%M.%D-%h.%m.%s", "snapMdFullTree": false, "hScrollAction": "none", "navSwitchPanelsDelay": 128, "scrollThroughTabs": "none", "scrollThroughVisibleTabs": true, "scrollThroughTabsSkipDiscarded": true, "scrollThroughTabsExceptOverflow": true, "scrollThroughTabsCyclic": false, "scrollThroughTabsScrollArea": 0, "autoMenuMultiSel": true, "multipleMiddleClose": false, "longClickDelay": 500, "wheelThreshold": false, "wheelThresholdX": 10, "wheelThresholdY": 60, "tabDoubleClick": "none", "tabsSecondClickActPrev": true, "tabsSecondClickActPrevPanelOnly": false, "shiftSelAct": true, "activateOnMouseUp": false, "tabLongLeftClick": "none", "tabLongRightClick": "none", "tabMiddleClick": "close", "tabMiddleClickCtrl": "discard", "tabMiddleClickShift": "duplicate", "tabCloseMiddleClick": "close", "tabsPanelLeftClickAction": "none", "tabsPanelDoubleClickAction": "tab", "tabsPanelRightClickAction": "menu", "tabsPanelMiddleClickAction": "tab", "newTabMiddleClickAction": "new_child", "bookmarksLeftClickAction": "open_in_act", "bookmarksLeftClickActivate": false, "bookmarksLeftClickPos": "default", "bookmarksMidClickAction": "open_in_new", "bookmarksMidClickActivate": false, "bookmarksMidClickRemove": false, "bookmarksMidClickPos": "default", "historyLeftClickAction": "open_in_act", "historyLeftClickActivate": false, "historyLeftClickPos": "default", "historyMidClickAction": "open_in_new", "historyMidClickActivate": false, "historyMidClickPos": "default", "syncName": "", "syncSaveSettings": false, "syncSaveCtxMenu": false, "syncSaveStyles": false, "syncSaveKeybindings": false, "selectActiveTabFirst": true }, "permissions": { "allUrls": false, "webRequest": false, "webRequestBlocking": false, "proxy": false, "tabHide": false, "clipboardWrite": false, "history": false, "bookmarks": false, "downloads": false }, "storage": { "size": "6.87 kb", "props": { "containers": "1.07 kb", "favDomains": "167 b", "favHashes": "34 b", "favicons_01": "4.31 kb", "favicons_02": "2 b", "favicons_03": "2 b", "favicons_04": "2 b", "favicons_05": "2 b", "profileID": "14 b", "sidebar": "391 b", "tabsDataCache": "743 b", "ver": "7 b" } }, "sidebar": { "panels": { "fwqs1rjCeSSy": { "type": 2, "id": "fwqs1rjCeSSy", "name": "len: 3", "color": "toolbar", "iconSVG": "icon_tabs", "iconIMGSrc": "", "iconIMG": "", "lockedPanel": false, "skipOnSwitching": false, "noEmpty": false, "newTabCtx": "none", "dropTabCtx": "none", "moveRules": [], "moveExcludedTo": -1, "bookmarksFolderId": -1, "newTabBtns": [], "srcPanelConfig": null } }, "nav": [ "fwqs1rjCeSSy", "add_tp", "sp-0", "settings" ] }, "containers": [ { "id": "firefox-container-1", "cookieStoreId": "firefox-container-1", "name": "2", "icon": "...", "color": "blue", "colorCode": "#37adff", "proxified": false, "proxy": null, "reopenRulesActive": false, "reopenRules": [], "userAgentActive": false, "userAgent": "" }, { "id": "firefox-container-2", "cookieStoreId": "firefox-container-2", "name": "2", "icon": "...", "color": "orange", "colorCode": "#37adff", "proxified": false, "proxy": null, "reopenRulesActive": false, "reopenRules": [], "userAgentActive": false, "userAgent": "" }, { "id": "firefox-container-3", "cookieStoreId": "firefox-container-3", "name": "2", "icon": "...", "color": "green", "colorCode": "#37adff", "proxified": false, "proxy": null, "reopenRulesActive": false, "reopenRules": [], "userAgentActive": false, "userAgent": "" }, { "id": "firefox-container-4", "cookieStoreId": "firefox-container-4", "name": "2", "icon": "...", "color": "pink", "colorCode": "#37adff", "proxified": false, "proxy": null, "reopenRulesActive": false, "reopenRules": [], "userAgentActive": false, "userAgent": "" } ], "windows": [ { "state": "maximized", "incognito": false, "tabsCount": 8 } ], "bookmarks": "TypeError: browser.bookmarks is undefined" } ```
mauricekraus commented 9 months ago

Needless to say, it occurs on my machine as well (Arch + 120.0.1).

Maybe a quick (while dirty) workaround would be to automatically apply a snapshot? Applying a snapshot restores the layout for me.

devgid commented 7 months ago

@CoelacanthusHex I see you have

"hideEmptyPanels": true,

I noticed something that when you have multiple panels and the setting "Hide Empty Tabs Panel" set as On Then if I restart firefox the panels that had tabs are shown in the default panel and not their original panels. Can't recall if they are flattened.

This is a bug. However as workaround if I have "Hide Empty Tabs Panel" set as Off and I restart Firefox then tabs and panels are all restored correctly to their original positions.

devgid commented 7 months ago

Duplicate: https://github.com/mbnuqw/sidebery/issues/560

CoelacanthusHex commented 7 months ago

@CoelacanthusHex I see you have

"hideEmptyPanels": true,

I noticed something that when you have multiple panels and the setting "Hide Empty Tabs Panel" set as On Then if I restart firefox the panels that had tabs are shown in the default panel and not their original panels. Can't recall if they are flattened.

This is a bug. However as workaround if I have "Hide Empty Tabs Panel" set as Off and I restart Firefox then tabs and panels are all restored correctly to their original positions.

Sadly, it doesn't work for me. And I have only one panel.

devgid commented 6 months ago

Can confirm all my tabs just flattened, went to my default channel and my pinned tabs went to my default panel after restoring a window. (despite hideEmptyPanels being false)

Tried various things to try simulate the problem on a new window by doing things I did and keeping my exact same settings but couldn't the problem. Problem most likely doesn't seem to be settings related then)

merrkry commented 4 months ago

Reprodeceable on Archlinux + Firefox 125.0.1.

Note that you have to disable "General - Startup - Open previous windows and tabs" first, so that "restore the previous session" will appear next time start firefox.

yanivmo commented 4 months ago

In my case (MacOS 14.4.1 + FF 125.0.2, no other extensions) tabs and panels get flattened if I use "Restore the previous session". However, if I turn on "Open previous windows and tabs" in the FF settings, the panels and the tabs are restored correctly.