Closed Bug 466644 Opened 17 years ago Closed 17 years ago

"Unread folders" mode doesn't update

Categories

(Thunderbird :: Folder and Message Lists, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 3.0b3

People

(Reporter: omar.bajraszewski, Assigned: davida)

References

Details

(Keywords: qawanted, regression)

Attachments

(1 file, 6 obsolete files)

I usually use unread folder view to quickly view my new messages. Lately I noticed that it didn't refresh when I received new message. 1)Subscribe to IMAP Gmail account 2)Subscribe to RSS News 3)Receive new emails/news 4)Switch to Unread folders view 5)Read your IMAP messages 6)Switch back to All folders view and return to Unread Folders view to hide read IMAP folder 7)Receive new e-mail Result: You can see new message alert but the view isn't refreshed. Unread Folders view doesn't display your Inbox with new just received messages
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1b2pre) Gecko/20081124 Lightning/1.0pre Shredder/3.0b1pre
I have noticed this same behavior ever since moving to the Tb 3 installs - this occurs in both 32bit builds as well as 64bit builds. I am currently using Tb 3 b2 64bit (Shredder 20090305), but also saw this behavior in Tb 3b1, Tb 3a1 and Tb 3b2 (all 32bit versions). If I go back to the All folders view and then forward again to Unread view, folders with new unread messages show up - upon marking them read the folder remains in the view, and any folders that subsequently have new messages in them do not appear in the unread folder view unless I repeat the above steps.
Build info: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1b3pre) Gecko/20090305 Shredder/3.0b2
BTW, this should be a duplicate of https://bugzilla.mozilla.org/show_bug.cgi?id=468329 - or vice versa, since technically this bug is the older of the two bugs.
This is a bad regression.
Assignee: nobody → david.ascher
Status: NEW → ASSIGNED
Flags: blocking-thunderbird3+
Summary: Unread message folder view doesn't refresh → "Unread messages" mode doesn't update
Target Milestone: --- → Thunderbird 3.0b3
Component: Mail Window Front End → Folder and Message Lists
Keywords: regression
OS: Windows Vista → All
QA Contact: front-end → folders-message-lists
Hardware: x86 → All
Bienvenu feels this might be fixed.
Keywords: qawanted
Whiteboard: closeme
If you're still seeing this bug, pipe up. Otherwise we'll consider it closed.
my mistake - I believe this is still happening - I've fixed the summary to reflect the fact that it's folders, not messages.
Summary: "Unread messages" mode doesn't update → "Unread folders" mode doesn't update
Whiteboard: closeme
I don't know if the new folder pane ever had code to handle this correctly - it needs to know when a folder switches from not having unread to having unread messages.
No, the folder pane only considered the idea that the list of folders would change via onItemAdded/onItemRemoved calls. (Folder property changes are observed, but not the idea that folders should disappear.) This will need some work to make folders disappear from the list.
(In reply to comment #8) > If you're still seeing this bug, pipe up. Otherwise we'll consider it closed. Yes, I can still reproduce it
(In reply to comment #8) > If you're still seeing this bug, pipe up. Otherwise we'll consider it closed. Still happening for me in 3.0b2.
jminta, folders don't have to disappear from the list (at least, they didn't before), but folders that newly have unread should appear in the list. That shouldn't be hard.
Also reproducible, and I am using Shredder nightlies, hoping it gets fixed, and they get updated almost daily for me. Currently Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1b4pre) Gecko/20090407 Shredder/3.0b3pre Also, Tb 2.x did not exhibit this problem, in that unread view would update correctly, IIRC. I can always install to verify....
jminta, it looks like the generators would have to be extended to fix this. Perhaps generators should be objects that support a few methods like "build" and "wantsThisFolder". Then OnItemAdded could ask the generator for the current mode if it "wantsThisFolder" for newly added folders. Or generators could have an onFolderAdded method, since the different generators will have to add the folder into the view differently. Do you think you might have time to whip up a quick patch that does this? I'd be happy to drive it into the tree.
jminta, any chance you can get to this soon? If yes, i'll assign the bug to you.
Attached patch Patch (obsolete) — — Splinter Review
Wow, a 2-line patch seems to work.
Attachment #375767 - Flags: review?(bienvenu)
Whiteboard: [has patch needs r bienvenu]
Attached patch more efficient patch (obsolete) — — Splinter Review
this will be faster.
Attachment #375767 - Attachment is obsolete: true
Attachment #375773 - Flags: review?(bienvenu)
Attachment #375767 - Flags: review?(bienvenu)
Priority: -- → P3
won't this patch remove a folder from the unread view if the last message is read? If we were reading the folder, that would seem to leave us in a state where the thread pane doesn't agree with the folder pane...
Attached patch avoid disappearing folders (obsolete) — — Splinter Review
Nice catch. This one updates on transition from 0, not to 0.
Attachment #375773 - Attachment is obsolete: true
Attachment #375826 - Flags: review?(bienvenu)
Attachment #375773 - Flags: review?(bienvenu)
Attached patch not stale patch (obsolete) — — Splinter Review
sigh, patch handling snafu. this is the patch.
Attachment #375826 - Attachment is obsolete: true
Attachment #375827 - Flags: review?(bienvenu)
Attachment #375826 - Flags: review?(bienvenu)
If I'm sitting in a folder and have read the last unread message, and a new unread message comes into an other folder, rebuild will still get rid of the selected folder. I'm not a big fan of rebuild, since it's fairly brute force, but maybe we can make it smarter by always including the selected folder, if there is any.
> maybe we can make it smarter by always including the selected folder, if there is any. I like that and it might solve another minor annoyance of mine at the same time: Flipping through the available folder pane views bounces around to random (more or less) mailboxes, depending on what is or is not in a certain view.
I have a fix not for the _rebuild function, which is complex, but for the "unread" mode, where it's trivial. I don't know that that addresses the general comment in Comment #24, but it works for the unread use case which this bug is about, so I'm going w/ it. If there's a more generic problem, it's likely best for a different bug.
Attached patch patch v3 (obsolete) — — Splinter Review
keep the selected folder in the 'unread' list always.
Attachment #375827 - Attachment is obsolete: true
Attachment #375945 - Flags: review?(bienvenu)
Attachment #375827 - Flags: review?(bienvenu)
sorry for the delay. Just tried this out. rebuild doesn't seem to cause an invalidation of the folder pane, so mousing over it after a rebuild changes what gets displayed as the mouse moves. And I think what's selected in the folder pane gets confused, as if the selection needs to be saved and restored when we do a rebuild. Oh yeah, and when we do the background send, we add an unread message to the outbox, so with this patch, the outbox gets added to the folder pane, and then the message gets sent and deleted, but the outbox stays in the folder pane. I'm not sure why it didn't disappear when the message was sent, but ideally we wouldn't add it in the first place. If a folder goes from no unread to having unread, but is already in the unread view, there's no need to do a rebuild. Finally, I'm not sure how this is going to play with tabs. If you switch tabs and a folder that's selected in another tab goes away because of a rebuild, then switching back to that tab might have an interesting behavior. The tab controller should probably make sure that the folder it's trying to restore is actually in the folder pane.
Comment on attachment 375945 [details] [diff] [review] patch v3 minusing based on prev comments.
Attachment #375945 - Flags: review?(bienvenu) → review-
Strange. I didn't see the invalidation problems you saw -- I could get the folderpane to redraw itself by doing IMAP operations from another client. I'll poke at it some more. re: the outbox: Agreed, those should get filtered out. re: avoiding rebuild in some cases, agreed. re: tabs: I agree it's a problem, but it doesn't feel like this patch makes that situation any worse. From looking at the code, it looks like the folder pane would end up w/ no selected row, which is odd, but not disastrous. I'll work on a revised patch.
(In reply to comment #29) > Strange. I didn't see the invalidation problems you saw -- I could get the > folderpane to redraw itself by doing IMAP operations from another client. I'll > poke at it some more. It could be because I have background send turned on, via a hidden pref - I don't think Standard8 has turned that on by default yet. It causes the Outbox to get added, etc - mailnews.sendInBackground
Attached patch patch v4 (obsolete) — — Splinter Review
I think the weird delta computation in _rebuild's call to rowCountChanged was wrong, and could explain your invalidation problems. I'm excluding all folders which have content written by the user (drafts, unsent, templates, "Queue"?) from the unread list. So I think this new patch addresses all current issues, except for any tab-specific issues. Do you think this patch will make any tab issues worse?
Attachment #375945 - Attachment is obsolete: true
Attachment #376787 - Flags: review?(bienvenu)
Comment on attachment 376787 [details] [diff] [review] patch v4 I suspect that weird row count update code was correct - we're telling it the delta from the old count and the new count, which is what the tree desperately wants to know. It's not for invalidation of X rows; it's to tell the tree how many rows there are now. It's rowCountChanged, not rowsChanged(count), in other words. You're right that tab switching really needs to handle the case that the folder is no longer in the view, and I certainly wouldn't block this patch on that.
Ah, ok. Does that mean that _rebuild should do explicit invalidates? I don't really understand the right model for invalidation, and i know that it's easy to get a bit carried away...
yes, it seems like _rebuild has to do an invalidate. Actually, the tree has an invalidate() call that says the whole tree is invalid, and I think that's what you want.
Attached patch WIP — — Splinter Review
Attachment #376958 - Attachment is patch: true
Attachment #376958 - Attachment mime type: application/octet-stream → text/plain
Attachment #376958 - Flags: review?(bienvenu)
Attachment #376787 - Attachment is obsolete: true
Attachment #376787 - Flags: review?(bienvenu)
Comment on attachment 376958 [details] [diff] [review] WIP this only started working when I changed + this.getIndexOfFolder(aItem) == 0) // we don't already have it to !this.getIndexOfFolder(aItem) - if that makes sense, r=me.
Attachment #376958 - Flags: review?(bienvenu) → review+
fix checked in with the above change.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Whiteboard: [has patch needs r bienvenu]
Blocks: 492951
Guys, Since I use the 3.0 Beta 3 pre-release nightly builds, I can tell you that *something* somewhere is working. I am not sure what needs to be fixed or whatever, but all my unread folders with new messages are auto displaying in the unread folders when new messages arrive. Currently, I am using Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1b5pre) Gecko/20090514 Shredder/3.0b3pre and it is working like a champ. I also wanted to say that I *believe that I noticed this as of a couple of nightly builds ago, but I cannot verify for certain - I *can* verify that as of this build it is *definitely working. Cheers! Thanks for all the hard work on this minor issue!
I can also confirm that the update problem is resolved *however* - the count of unread messages is updated much, much later after reading mails. The counter should be updated *immediately*. Everything else is a weird usability problem In addition: I encountered the case where the list of unread folders became empty however message pane remained filled with message from the last used folder. Please fix
(In reply to comment #39) > - the count of unread messages is updated much, much later after reading mails. > The counter should be updated *immediately*. Everything else is a weird > usability problem > > In addition: I encountered the case where the list of unread folders became > empty > however message pane remained filled with message from the last used folder. > > Please fix This has already been fixed by bug 492951 and will be in the next nightly build.
I hae found one thing that might be unrelated or not - if I have a particular folder focused / selected when updating mail, and a new folder appears in hte unread folders section, Thunderbird will move the focus / selected folder to a different folder in the view...
I realize this is marked as resolved / fixed, but the fix has introduced a new issue - should I file a new bug? The bug i as follows: Using all builds since this fix was added to the codebase, including the most current one, Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1pre) Gecko/20090525 Shredder/3.0b3pre: If I have a folder selected in the unread folders view, and Tb starts checking mail, and folders appear above the currently selected folder in the tree, the view remains the same. However, if folders appear after the currently selected folder in the tree, then for some reason the currently selected folder moves on its own accord to the next one lower in the tree. This is reproducible 100% on my machine. Stats: Windows 7 64bit RC1, Tb build as noted above, running on a Quad Core 6600 OC'd to 3.21 GHz w/ 4 GB RAM (1000MHz, PC8000) installed.
I should add that this is using a combination of IMAP mail (GMail accounts) as well as POP mail (a few accounts) as well as Webmail based accounts using the WebMail extension (Hotmail and Yahoo).
New bugs for new issues. (Make sure it's not an extension issue though.)
Thank you.
Depends on: 495020
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: