Closed Bug 1721574 Opened 3 years ago Closed 3 years ago

Local Folders are always moved to the end of the account list after a restart

Categories

(Thunderbird :: Account Manager, defect)

Thunderbird 91
defect

Tracking

(thunderbird91 verified)

VERIFIED FIXED
92 Branch
Tracking Status
thunderbird91 --- verified

People

(Reporter: jose, Assigned: freaktechnik)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

+++ This bug was initially created as a clone of Bug #1706849 +++

Dragging feed accounts works, but after a restart they are back at the original position.

Maybe something that was overlooking in bug 1706849.

Flags: needinfo?(geoff)
Severity: -- → S4
Summary: Moving feed accounts to after local folders (where they used to be in TB 78) doesn't stick, moving back to before local folders after restart → Moving feed accounts to after local folders (qw in TB 78) doesn't stick, moving back to before local folders after restart
Summary: Moving feed accounts to after local folders (qw in TB 78) doesn't stick, moving back to before local folders after restart → Moving feed accounts to after local folders (as in TB 78) doesn't stick, moving back to before local folders after restart

Don't look at me, it happens with or without the change I made. Bug 244347 is what did it, most likely.

Flags: needinfo?(geoff)

(In reply to Geoff Lankow (:darktrojan) from comment #1)

Don't look at me, ...

I'm looking at the Thunderbird team (and NI'ed someone who has looked at this code before (bug 1706849, bug 1721761)) to fix a regression that will inconvenience some users who are used to a certain account order.

Keywords: regression
Regressed by: 244347

Quick testing shows that the move is properly persisted in the mail.accountmanager.accounts pref, but somethings seems to move Local Folders to the bottom again at startup.

That's what I saw, too, now that "something" needs to be found.

Probably the default location for the only default account Thunderbird ships with.

I personally prefer it at the bottom, since it is easier to find.

The issue was introduced here: https://hg.mozilla.org/comm-central/rev/800f2782950f#l11.12. This code runs at startup and moves "Local Folders" last. Not only feed accounts are moved before local folders, for example, moving "Local Folders" to the top doesn't stick either. Sadly the code wasn't commented, you need to read bug 244347 comment #128(!!) downwards to see the motivation. Our fix for the time being is here:
https://github.com/Betterbird/thunderbird-patches/blob/main/91/bugs/1721574-feed-account-move.patch

Right, I adjusted the summary accordingly, so this can be found easier. Moving local folders to the top was a feature of the add-on, see bug 244347 comment #135.

Summary: Moving feed accounts to after local folders (as in TB 78) doesn't stick, moving back to before local folders after restart → Moving feed accounts to after local folders (as in TB 78) doesn't stick, moving back to before local folders after restart. Moving local folders to the top doesn't stick either.

Let me clean up the summary a bit.

Assignee: nobody → martin
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Summary: Moving feed accounts to after local folders (as in TB 78) doesn't stick, moving back to before local folders after restart. Moving local folders to the top doesn't stick either. → Local Folders are always moved to the end of the account list after a restart

Thanks for validating our analysis. Do you think this comment could be useful? Insert a new account before "local folders" if "local folders" was last. Otherwise it's hard to tell what this code is for.

(In reply to Zoe Martin from comment #10)

Thanks for validating our analysis. Do you think this comment could be useful? Insert a new account before "local folders" if "local folders" was last. Otherwise it's hard to tell what this code is for.

I'm not sure what the context of the comment is, is this for a specific line of my patch? In general we want to always append accounts while building the account list, which is what this patch fixes.

Well, as per comment #6, the code of the new hunk wasn't documented, so we were tempted to revert it before reading about the motivation the original bug. That's why we added this:
https://github.com/Betterbird/thunderbird-patches/blob/main/91/bugs/1721574-feed-account-move.patch#L61

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/7e01d4429355
Ignore local folders position when creating accounts during startup. r=benc

Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 92 Branch

Comment on attachment 9232875 [details]
Bug 1721574 - Ignore local folders position when creating accounts during startup. r=benc

[Approval Request Comment]
Regression caused by (bug #): bug 244347
User impact if declined: Local Folders will always move to the end of the account list when Thunderbird is started
Testing completed (on c-c, etc.): automated tests, verified in daily
Risk to taking this patch (and alternatives if risky): Changes logic initializing the accounts, however should have a low probability of breaking the account loading all together. Worst I could see is that account order logic misbehaves in some other way.

Attachment #9232875 - Flags: approval-mozilla-beta? → approval-comm-beta?

Comment on attachment 9232875 [details]
Bug 1721574 - Ignore local folders position when creating accounts during startup. r=benc

[Triage Comment]
Approved for beta

Attachment #9232875 - Flags: approval-comm-beta? → approval-comm-beta+

Verified using TB 90.0b6 on Fedora 34.

Status: RESOLVED → VERIFIED
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/1d71053f4660 follow-up to clang-format. rs=clang-format
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: