File -> Compact Folders acts only on currently selected folder. Should compact all folders of an account.
Categories
(Thunderbird :: Mail Window Front End, defect)
Tracking
(thunderbird_esr115 affected, thunderbird128 affected)
People
(Reporter: mark, Unassigned, NeedInfo)
References
(Regression)
Details
(Keywords: regression, reproducible, triaged, Whiteboard: [regression 115.0])
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/117.0
Steps to reproduce:
Click File -> Compact Folders
Actual results:
With Thunderbird 115.2.2 (64-bit) and an IMAP account it appears that only the currently open folder is requested to be compacted.
Expected results:
All folders in the account should be compacted.
Reporter | ||
Comment 2•2 years ago
|
||
Perhaps I am confused. In older versions, when I selected File -> Compact Folders, the status line messages cycled through messages like
<account name> Compacting folder <folder name>
for all folders in the account. Now when I select File -> Compact Folders it just shows an unchanging
<account name> Compacting folder
as it does when I right-click a folder and select Compact.
Comment 3•2 years ago
|
||
I saw the cycling when I tried it just now.
Reporter | ||
Comment 4•2 years ago
|
||
I do not see that with Thunderbird 115.2.2 (64-bit) or with Thunderbird 115.2.2 (64-bit) on Mac OS 11.7.10.
I did see it previously with Thunderbird 102.15.1 (64-bit) and older versions.
Comment 6•2 years ago
|
||
Maybe it's related to subfolders (bug 1850687)
Reporter | ||
Comment 7•2 years ago
|
||
I am now also seeing this issue with Thunderbird 115.3.1 (64-bit) on Ubuntu 20.04
Updated•2 years ago
|
Comment 10•2 years ago
|
||
This is mostly a duplicate of what I reported back at bug 1827973.
What I see is if you are selected on a folder and do file | compact folders
it compacts only the selected folder. I think the reporter is expecting it to compact all the folders within the account of the selected folder, not just the selected folder.
If you are selected on the top level account name, file | compact folders
compacts all the folder of that account. It doesn't touch other accounts which I suppose is correct.
Bug 1827973 points out issues with "compacting" maildir folders so not exactly a duplicate of this.
Reporter | ||
Comment 11•2 years ago
|
||
I think the reporter is expecting it to compact all the folders within the account of the selected folder, not just the selected folder.
Yes, that is what I expect and the way it worked previously in older versions like 102.15.1
Reporter | ||
Comment 12•2 years ago
|
||
As I find out more about this, I think the current 115
behavior might be by design and might be OK. What I see now is I can right click
a folder in the accounts and folders panel and select compact
from the context menu and the folder is compacted, and I can right click
an account in the accounts and folders panel and select compact
from the context menu and all the folders in the account are compacted. Similar behavior occurs if I select a folder or account in the accounts and folders panel and then select compact
from the file
menu. In other words, right clicking an item and selecting compact
produces the same result as selecting the item and then selecting compact
from the file
menu.
The difference in prior versions is selecting a folder and then selecting compact
from the file
menu used to compact all folders in the account and now only compacts the selected folder. While this is different from prior behavior, I can't say it's wrong, especially since I now realize I can compact all the folders in the account by right-clicking the account and selecting compact from the context menu.
Comment 13•2 years ago
|
||
It cannot be intended behavior, because menu selection is "Compact Folders". As in plural. There is no Compact on File menu.
Reporter | ||
Comment 14•2 years ago
|
||
(In reply to Virgo Pärna from comment #13)
It cannot be intended behavior, because menu selection is "Compact Folders". As in plural. There is no Compact on File menu.
Good point.
Comment 15•2 years ago
|
||
I agree with the last comments : this menu option compacts all folders only if the account name is selected on the left pane, and if any other folder is selected, the menu option only compacts the current folder although it's still named "compact folderS".
For the sake of clarity and UX, this should be modified. A simple fix would be to gray out the option (as there is a per-folder compact button on top) when a normal folder is selected.
The better fix would be to have an switch or popup asking if one wants to also compact subfolders when acting on a normal folder.
Reporter | ||
Comment 16•2 years ago
|
||
Perhaps a simpler fix is to just change the text in the File
dropdown from Compact Folders
to Compact selected Folder(s)
Comment 17•1 year ago
|
||
This bug was not caused by bug 1890448. But perhaps the compact rewrite will bring more scrutiny.
Comment 19•7 months ago
|
||
Who is still seeing this??
I just came here because I reproduced it with nightly build on Mac -
- emptied trash folder via context menu
- compacted trash folder via context menu (which is essential a NOP)
- with trash folder still selected, File > Compact folders - fail - status bar showed no folders being iterated and showed "Done compacting (approx 0KB saved)"
- with account selected, File > Compact folders - success
Also, I haven't commented previously in this bug report, but I'm pretty sure I have seen this long before.
Comment 20•7 months ago
|
||
Note, we know from other past reports that users may have automatic compact disabled because of whatever problems they have experienced (inconvenient bad performance at startup for example) but DO their compacts manually.
Comment 21•7 months ago
|
||
Regression from bug 1823546 ?
Ramona, does File > Compact folders work for you with version 112 and the steps of comment 19, but fail with a current version? (you must have first deleted some messages in one or more folders)
Comment 22•7 months ago
|
||
I am still seeing it. I have IMAP account set to "mark as deleted", which makes it very obvious.
Reporter | ||
Comment 23•7 months ago
|
||
The issue as I see it is if a folder within the account is selected rather than the account itself, File > Compact folders
will compact only the selected folder, but the wording Compact folders
implies that all folders will be compacted. As I suggested here, if the wording in the menu were changed to Compact selected folder
, that would resolve this issue.
Comment 24•7 months ago
|
||
The compact operation affects the currently selected folder and any child folders. And similar to "Delete folder", it also operates on multiple folders if more than one is selected. In that case, should it not follow that it is renamed to "Compact folder" like "Delete folder"?
Comment 25•7 months ago
|
||
I note that it's still possible to compact all folders for a given IMAP account, from the context menu of the top-level of the account.
So perhaps renaming Compact Folders is all that is needed?
Comment 26•7 months ago
|
||
(In reply to Toby Pilling [:tobyp] from comment #24)
The compact operation affects the currently selected folder and any child folders. And similar to "Delete folder", it also operates on multiple folders if more than one is selected. In that case, should it not follow that it is renamed to "Compact folder" like "Delete folder"?
With imap if I select a folder having subfolders and do "Compact" with context menu for top level folder, I don't see the subfolders getting expunged. So, at least for imap, only the selected folder gets expunged (i.e., compacted) and subfolders are not affected.
If I "shift-click to mark the top level folder and any of its subfolder and do context "Compact", the selected folders are each sequentially imap selected and imap expunge is done on each marked folder.
So maybe the right-click/context label for imap folders should change from Compact
to Compact selected folder(s)
?
If you select imap server name (called root folder in code) and do context Compact
all folders are iterated though and selected and expunged, so this works as described by Calum in comment 25.
Comment 27•7 months ago
|
||
I'd like to suggest that for the sake of consistency, we change it to "Compact folder" and have it work in the same way as "Delete folder" does - so any folders selected via shift-click, and any subfolders are compacted.
For similar reasons, I'd keep the right-click/context label as it is, following how we handle "Delete".
Comment 28•7 months ago
|
||
File | Compact Folders will compact all folders of the account, if account is selected.
https://searchfox.org/comm-central/rev/b14c103d52c97a859175d37f264be38ebb4a4ceb/mail/base/content/about3Pane.js#6184,6187
IIRC, it that menu used to always do all the folders.
Comment 29•7 months ago
|
||
Yes, that's great and makes sense that if the account is selected, it would compact all folders (and sub-folders) within that account.
I believe it also makes sense that if I select one folder, it should compact only one, similar to how other menu options behave. I'm not so concerned about what used to happen but what makes most sense in terms of user control and consistent UX.
It would be necessary to ensure that subfoldes of the selected folder are compacted if that's not how it currently works.
Comment 30•7 months ago
•
|
||
I have no strong objection to changing, as long as there are (new) methods to do what users are currently able to do. For example what may still be missing then is a method to compact all folders in all accounts. Or as Gene and Toby point put out, how it acts on sub folders. And if how it currently operates is substandard, improve it.
Regarding "all accounts", I was able to multi-select 3 accounts but didn't attempt a File > compact - would it be too complicated to have it operate on all selected accounts?
Similarly, when multiple folders are selected
It's good that we are developing a solid understanding of how it currently works (or "worked"), before we actually make changes, especially in the imap context. I'm sorta brain dead on the subject right now, so I'm CCing some folks.
Comment 31•7 months ago
•
|
||
Wayne said:
Regarding "all accounts", I was able to multi-select 3 accounts but didn't attempt a File > compact - would it be too complicated to have it operate on all selected accounts?
I ctrl-clicked two imap accounts and and did File | Compact Folders. Nothing was compacted per IMAP:4 log. I am recording "console" events in the log (for another bug) and see this in in console:5 log:
[Parent 3235789: Main Thread]: E/console error: "An error occurred executing the cmd_compactFolder command: TypeError: can't access property "isServer", folder is null"
So attempting to compact two accounts by ctrl-clicking them is not working for me. If I only have one account selected and do File | Compact Folders it iterates through ALL selectable folders and expunges/compacts them, so the single-selection case works as expected.
Toby said:
It would be necessary to ensure that subfoldes of the selected folder are compacted if that's not how it currently works.
Yes, that's not how tb imap currently works.
I don't think that would be acceptable for all users, especially users using imap delete mode "when I delete, just mark as deleted" where a line is drawn through deleted messages. This would cause all messages marked deleted in the all subfolders, selected or not, to be unexpectedly and permanently deleted. So unless the root folder (account name) is selected, the File | Compact folders
menu item should only operate on selected folders (as it currently does).
If this is changed to compact the selected folder and ALL of its subfolders, selected or not, then a similar confirmation should be added as is seen when a folder with subfolders is deleted when not using "move to trash" delete mode. This would warn about unexpected expunges of messages marked deleted in subfolders.
Another reason not to compact/expunge all subfolders, selected or not, is that some imap servers put all folders under Inbox. So if you think you are only compacting Inbox, you would end up compacting all of your folders.
Comment 32•7 months ago
|
||
Thanks for the clarification Gene. I chatted with Magnus, Kai and Brendan about this yesterday and they had similar concerns about subfolders.
While I can see some users wanting to compact ALL folders in ALL accounts, we want to avoid making this happen without the user being fully aware that it could take a very long time and lead to potential problems.
Can anybody verify whether the "Compact folders" menu item previously operated on all folders in all accounts? If we didn't have that ability previously, it's a separate issue beyond the scope of this bug.
I personally feel that it is sufficient to provide a way for users to compact all folders within each account by clicking on each account and choosing the menu item for every account they wish to compact.
Currently, multiple folders and their subfolders can be ctrl-clicked to allow multiple specific folders to be compacted for granular control, and an entire account can be compacted by selecting that - so perhaps all we need to do is change the menu item from File | Compact folders
to File | Compact folder
or just File | Compact
?
Comment 33•7 months ago
|
||
As far as I remember, it compacted all folders on currently active account. Not all accounts.
Right now this can achieved by manually selecting account itself in tree and then selecting "Compact folders". Compacting all folders is useful for me, because I am using server side filtering, which means, that I basically have tens of folders, where new e-mails can appear. Usual practice is reading all unread messages and deleting, what I do not want to keep and then compacting all folders.
Comment 34•7 months ago
|
||
Wayne, can you confirm this? And would you find it acceptable to keep things functioning "as-is" and possibly just change the menu item for clarity?
Comment 35•7 months ago
|
||
I'm still running TB 91.13.1 -- the last before the major re-write of v102, where "unified" folders appeared. (In the old versions, I don't find accounts anywhere.) FILE/COMPACT FOLDERS would do ALL folders, whereas right-clicking a folder would give the simple menu item COMPACT which would compact that specific folder only. I find this extremely useful, as I can compact everything now and then when required without a lot of complication.
But I understand some of the problems with IMAP. (All my accounts were POP3 which didn't have the permanent-deletion issues...) It would be good not to get rid of the "compact all" functionality as long as users are warned and understand what could happen, and I don't like renaming the menu choices, especially to simply COMPACT which may or may not trigger all folders, nor to a selective name that can be misconstrued.
Comment 36•7 months ago
|
||
Oh, and my older version seems to do ALL accounts -- I don't know about "inactive", I've never seen that...
Comment 37•7 months ago
|
||
I checked by using 68.10.0 on old laptop that probably won't run anything newer.
Select any folder on an imap account
File | Compact Folders
compacts all folders only on that imap account
Right-click Compact
compacts only the selected folder (no subfolders are touched)
Select a root folder (account name) for imap account
File | Compact Folders
compacts all folders only on that imap account
Right-click shows no compact option, so must use File | Compact Folders
to compact all folders only on that account
AFAICT, there was no option to sweep through all email accounts (imap, pop3 and local) and compact every folder.
Comment 38•7 months ago
|
||
Thanks so much Gene.
Going back to the initial bug report that started this discussion, it seems like the wording of the menu item might lead other users to misinterpret the functionality.
As we've heard, we currently provide the ability for users to accomplish what they were previously able to in 68.10.0, and have additionally improved the granularity to allow users with more control over exactly what gets compacted. This enhancement also reduces the risk of 'over-compaction' and issues that can occur if compaction is interrupted etc.
Given that we have received feedback that using File | Compact
instead of File | Compact folders
is not desired, I propose that we change the menu item to File | Compact folder
and keep the functionality unchanged. This approach keeps the UI consistent with the naming of other menu options which operate on one or more folders, and will hopefully avoid any confusion about the menu item triggering a compaction on multiple folders if only one is currently selected. I do like the suggestion to use the longer and more specific Compact selected folder(s)
but that's a bit of a mouthful and will be tricky in lengthier languages.
In concert with this, we can also update support articles to clarify how users can accomplish the various compaction tasks, including the compaction of all folders within an account.
Does anybody have a problem with this?
Comment 39•7 months ago
|
||
If multiple accounts (root folders) are selected and do File | Compact Folders, nothing happens. So "Compact Folders" should be gray or not appear. Either that or should iterate over all selected accounts and compact all of each selected accounts folders.
Then again, I think this is bug since I just remembered describing the same thing in comment 31 and see error [Parent 3235789: Main Thread]: E/console error: "An error occurred executing the cmd_compactFolder command: TypeError: can't access property "isServer", folder is null"
If multiple accounts (root folders) are selected and right-click Compact is done on any selected account, all folders in selected accounts are compacted. So this works as expected.
If a not-select account is right clicked, Compact occurs only on that account and the selected accounts are not touched. Also OK.
If one or more accounts (root folder) is selected and if any non-root folder(s) anywhere is/are selected, File | Compact Folders is gray. So nothing happens which seems OK.
Right-click on any selected root folder or selected folder, shows no Compact option, so that's OK.
Right-click on any not-selected folder show Compact option and compacts that folder only. OK.
Right-click on any not-selected root folder shows Compact option and compacts all its folders. OK.
If multiple folders within an account are selected, right-click Compact compacts them as it should. But if File | Compact Folders is attempted, the console error described in comment 31, and in first paragraph above, occurs and no compact occurs.
I think this covers the typical compaction cases but there are probably some I missed. But looks like there is a bug when trying to do File | Compact Folders with multiple folders and/or root folders selected. Maybe multiple selections for File | Compact Folders is not intended to be supported and, if so, File | Compact Folder(s) should not appear or be grayed. Then you would only see File | Compact Folder active when selected on a single non-root folder and see File | Compact Folders active only when selected on a single root folder.
Comment 40•7 months ago
|
||
(In reply to gene smith from comment #39)
If multiple accounts (root folders) are selected and do File | Compact Folders, nothing happens. So "Compact Folders" should be gray or not appear. Either that or should iterate over all selected accounts and compact all of each selected accounts folders.
Yes. Either is perhaps reasonable. But for people with many accounts, actually doing all selections will be more reasonable.
Now that we know how it formerly worked, I'm fine with reinterpretations of how it should work for a broad spectrum of users.
Updated•5 months ago
|
Description
•