Closed Bug 1844534 Opened 10 months ago Closed 10 months ago

The unread message count badge is not displayed on the top folders, but only on the subfolders containing the actual new emails

Categories

(Thunderbird :: Folder and Message Lists, defect)

Thunderbird 115
defect

Tracking

(thunderbird_esr115? fixed, thunderbird116? affected)

RESOLVED FIXED
117 Branch
Tracking Status
thunderbird_esr115 ? fixed
thunderbird116 ? affected

People

(Reporter: mihaicodrean, Assigned: darktrojan)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0

Steps to reproduce:

Fetched emails for a POP3 account, with filters in place to move them into subfolders.

Folder structure example:

Account Name
   Parent Folder (no badge)
       SubFolder (badge displayed)
           <unread emails>

Actual results:

The unread message count badge was displayed on the folders containing the emails, but not on their parent folders. And if these top-level folders are collapsed, one can't tell whether there are new/unread emails there or not, until expanding them.

Expected results:

Display the unread message count up to the top folder.

This seems to be a regression bug, because it used to work in 102.

BTW, if I expand the parent folder and then collapse it, the unread message count badge shows up on it. Maybe this can be a hint as to where the issue is.

Are you using The unified folders mode or regular folders?

Flags: needinfo?(mihaicodrean)
See Also: → 1843135

I'm using the "All folders" mode.
However, I think this just got fixed by 115.0.1. Let me test it some more and report back.

Flags: needinfo?(mihaicodrean)

However, I think this just got fixed by 115.0.1. Let me test it some more and report back.

Nope, still not working. I thought I've seen it working once, but maybe that was just wishful thinking.

BTW, I sometimes get this error, including when receiving the test emails that get filtered into the test sub-folder:

 NS_ERROR_CANNOT_CONVERT_DATA: Component returned failure code: 0x80460001 (NS_ERROR_CANNOT_CONVERT_DATA) [mozIStorageRow.getString] 9 GlodaDatastore.jsm:600

Is there a way to enable Gloda verbose logging, say to see the raw data that cannot be converted, along with the table/row/column details? I can build from sources if necessary.

I see I can put a breakpoint in GlodaDatastore.jsm:600 using the Developer Toolbox, and I can see the related errors using watch expressions:

row.GetInt64(0): (unavailable)
row.getString(1): "Init"
row.getInt64(2): (unavailable)
row.getInt64(3): 47
row.getInt64(4): (unavailable)
row.getString(5): null
row.getString(6): NS_ERROR_CANNOT_CONVERT_DATA
row.getString(7): null

This is for this code:

handleResult(aResultSet) {
    let row;
    // addr  opcode (s)      p1    p2    p3    p4 (s)   p5   comment (s)
    while ((row = aResultSet.getNextRow())) {
      this._curOps.push([
        row.getInt64(0), // addr
        row.getString(1), // opcode
        row.getInt64(2), // p1
        row.getInt64(3), // p2
        row.getInt64(4), // p3
        row.getString(5), // p4
        row.getString(6), // p5
        row.getString(7), // comment
      ]);
    }
  },

Thoughts? Or maybe this is unrelated?

Interestingly, if I check the type for that I get this:

row.getTypeOfIndex(6): 1

which would be VALUE_TYPE_INTEGER/1, not VALUE_TYPE_TEXT/3? I'm partly guessing here. Maybe I have corrupted data, although the reported bug did not happen in 102.

Andrew, would you be so kind as to point me in the right direction to identify the root cause of the Gloda errors above? I've noticed that you know Gloda inside-out: https://www.visophyte.org/blog/2010/04/06/performance-annotated-sqlite-explaination-visualizations-using-systemtap/

Flags: needinfo?(bugmail)

Ah, I've had "explainToPath" set. With that cleared, the Gloda tracing errors go away, so that's unrelated.

Alessandro, back to the bug at hand with the unread message count badge, is there anything I should dig into to assist?

Flags: needinfo?(bugmail) → needinfo?(alessandro)

All right, I can finally reproduce this consistently and this is my STR:

  • Have a a subfolder with a message in it, collapse the parent folder.
  • Mark the message inside the subfolder as unread (I used the gloda search to find it without accessing the folder)
  • The parent folder doesn't get the "unread" counter
  • Opening and closing the parent folder shows the "unread" count

I think there are 2 fixes we need to perform here.

  1. Back-end: Ensure the parent folder is notified and its properties change when receiving a new message in a subfolder that is not visible (Pinging Geoff for this).
  2. Front-end: Use a different visual representation for the unread message indicator of a parent folder if the message is inside a subfolders, otherwise is misleading and clicking on the parent folder doesn't show any unread messages. (Pinging Micah for a design exploration on this)
Flags: needinfo?(micah)
Flags: needinfo?(geoff)
Flags: needinfo?(alessandro)

If we're notified about a folder that's hidden by a collapsed ancestor, why not bubble the notification up to the ancestor and call updateUnreadMessageCount on it?

Status: UNCONFIRMED → NEW
Ever confirmed: true

Yeah, that works, I'll make a patch.

Assignee: nobody → geoff
Status: NEW → ASSIGNED
Flags: needinfo?(geoff)
Target Milestone: --- → 117 Branch

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/b8e718c254f5
In the folder tree, update the unread count of collapsed rows when a change occurs. r=aleca

Status: ASSIGNED → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED

Thanks! Will this also make it into ESR 115.x?

Yes, it will go to beta and then ESR 115.1 most likely next week.

Flags: needinfo?(micah)

Perfect, thanks!

Duplicate of this bug: 1846264
Duplicate of this bug: 1846107
Depends on: 1846611
Blocks: 1846611
No longer depends on: 1846611

(In reply to Alessandro Castellani [:aleca] from comment #16)

Yes, it will go to beta and then ESR 115.1 most likely next week.

Has this really made it into 115.1.0? I don't see it in the release notes and I'm still experiencing the issue.

Flags: needinfo?(alessandro)

Comment on attachment 9345920 [details]
Bug 1844534 - In the folder tree, update the unread count of collapsed rows when a change occurs. r=aleca

No Mihai, it has not been added to 115.1.0. I'm requesting it be uplifted now.

[Approval Request Comment]
Regression caused by (bug #):
User impact if declined: Unread counts of collapsed folders is missing/wrong
Testing completed (on c-c, etc.): in 117
Risk to taking this patch (and alternatives if risky): no

Flags: needinfo?(alessandro)
Attachment #9345920 - Flags: approval-comm-esr115?

Thanks Geoff!

Blocks: 1847972

Comment on attachment 9345920 [details]
Bug 1844534 - In the folder tree, update the unread count of collapsed rows when a change occurs. r=aleca

[Triage Comment]
Approved for esr115

Attachment #9345920 - Flags: approval-comm-esr115? → approval-comm-esr115+
Duplicate of this bug: 1848549
Duplicate of this bug: 1845178
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: