Closed Bug 1906500 Opened 2 years ago Closed 1 year ago

Message selection may not be retained when using quick filter

Categories

(Thunderbird :: Search, defect)

Thunderbird 123
defect

Tracking

(thunderbird_esr115 wontfix, thunderbird_esr128 wontfix, thunderbird_esr140 unaffected, thunderbird131 unaffected, thunderbird132 unaffected, thunderbird133 unaffected)

RESOLVED FIXED
130 Branch
Tracking Status
thunderbird_esr115 --- wontfix
thunderbird_esr128 --- wontfix
thunderbird_esr140 --- unaffected
thunderbird131 --- unaffected
thunderbird132 --- unaffected
thunderbird133 --- unaffected

People

(Reporter: welpy-cw, Unassigned)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression, Whiteboard: [fixed by bug 1903910])

Attachments

(1 file)

Steps to reproduce:

  1. Select a folder in threaded view with all threads collapsed.
  2. Select a message below some other thread.
  3. Enter a search term matching that message as well as messages from the other thread.

Expected result:
The selection is kept for the message.

Actual result:
Some other message further down is selected, or no message is selected, and the error console displays

NS_ERROR_ILLEGAL_VALUE: Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIMsgFolder.GetMessageHeader]
    restoreSelection chrome://messenger/content/about3Pane.js:5004
    onMessagesLoaded chrome://messenger/content/mailCommon.js:1077
    _applyViewChanges resource:///modules/DBViewWrapper.sys.mjs:1529
    set userTerms resource:///modules/SearchSpec.sys.mjs:310
    updateSearch chrome://messenger/content/quickFilterBar.js:544
    searchTimeoutID chrome://messenger/content/quickFilterBar.js:511
about3Pane.js:5015:17
NS_ERROR_ILLEGAL_VALUE: Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIMsgFolder.GetMessageHeader]
    restoreSelection chrome://messenger/content/about3Pane.js:5004
    onMessagesLoaded chrome://messenger/content/mailCommon.js:1077
    set searching resource:///modules/DBViewWrapper.sys.mjs:946
    onSearchDone resource:///modules/SearchSpec.sys.mjs:524
about3Pane.js:5015:17

One way to fix this without risking further regressions would be landing/uplifting bug 1903910.

So, this is a potential dupe of bug 1903910?
We don't feel super comfortable in uplifting that and we deferred landing those patches on purpose.

I'm trying to assess the severity of this issue.
Losing the selection is indeed as issue, but it only happens after the interaction with quick filter, so there's a UX expectation of the message list changing followed by the needed interaction of selecting one of the results.

I think S3 is accurate as you reported, so I would feel comfortable not uplifting the fixes to 128 and let it ride the train.
Also considering that we're planning to switch to monthly releases before the end of the year, but that's not a super strong argument.

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

So, this is a potential dupe of bug 1903910?

I don't think so. Single-folder (quick filter) and multi-folder (unified folder) search views are broken in ESR 128 in different ways (and for different reasons):

Quick Filter may not only lose the selection, but also select and display a completely unrelated message (which some people may consider a security issue). This regression is caused by https://phabricator.services.mozilla.com/D198506 not explicitly keeping the selection when re-collapsing threads opened by nsMsgQuickSearchDBView (this bug).

Unified folders (including quick filters on them) don't keep any selections at all, since message keys are not unique in multi-folder search views (bug 1903910).

We don't feel super comfortable in uplifting that and we deferred landing those patches on purpose.

I am just trying to understand that purpose.

any relation to bug 1864911?

Depends on: 1903910
See Also: 1903910 →

(In reply to Wayne Mery (:wsmwk) from comment #3)

any relation to bug 1864911?

Actually not. Bug 1864911 is about the case when quick filter is closed with no messages selected. In that case 102 did restore one of the previously selected messages, while 115 and 128 do not.

Vlad/Ramona, Can you test this on beta and see if the issue still exists?

Flags: needinfo?(vlucaci)
Flags: needinfo?(ramona)

Hello!

I have tried to reproduce this issue using the provided steps in the Description as well as following the scenarios in bug 1903910 but was unable to reproduce it with 133.0a1(20241006105017) and 132.0b2(20241004165235)

However I am not entirely sure that I quite understood the STR properly and would very much like to try to reproduce it once more.

Hartmut, if possible, could you please provide more granular steps just to make sure I understood what to do exactly?
Thank you in advance!

Flags: needinfo?(vlucaci)
Flags: needinfo?(ramona)
Flags: needinfo?(h.w.forms)

(In reply to Vlad Lucaci, Thunderbird QA (:vlucaci) from comment #6)

I have tried to reproduce this issue using the provided steps in the Description as well as following the scenarios in bug 1903910 but was unable to reproduce it with 133.0a1(20241006105017) and 132.0b2(20241004165235)

This issue is fixed by the changes in bug 1903910 which has landed in the 130 branch. However, ESR 128 is still affected since that patch hasn't been uplifted to it.

Error console output from the screen recording:

Uncaught NS_ERROR_UNEXPECTED: Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIMsgDBView.viewIndexForFirstSelectedMsg]
    canMove chrome://messenger/content/mailCommon.js:507
    isCommandEnabled chrome://messenger/content/mailCommon.js:674
    <anonymous> chrome://messenger/content/about3Pane.js:6347
    isCommandEnabled chrome://messenger/content/mailCommon.js:449
    getEnabledControllerForCommand chrome://messenger/content/globalOverlay.js:49
    goUpdateCommand chrome://messenger/content/globalOverlay.js:79
    goUpdateGlobalEditMenuItems chrome://communicator/content/utilityOverlay.js:28
    <anonymous> chrome://global/content/editMenuOverlay.js:66
mailCommon.js:507
An error occurred updating the cmd_delete command: [Exception... "Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIMsgDBView.viewIndexForFirstSelectedMsg]"  nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)"  location: "JS frame :: chrome://messenger/content/mailCommon.js :: canMove :: line 507"  data: no] globalOverlay.js:81:13
Uncaught NS_ERROR_UNEXPECTED: Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIMsgDBView.viewIndexForFirstSelectedMsg]
    canMove chrome://messenger/content/mailCommon.js:507
    isCommandEnabled chrome://messenger/content/mailCommon.js:674
    <anonymous> chrome://messenger/content/about3Pane.js:6347
    isCommandEnabled chrome://messenger/content/mailCommon.js:449
    getEnabledControllerForCommand chrome://messenger/content/globalOverlay.js:49
    goUpdateCommand chrome://messenger/content/globalOverlay.js:79
    goUpdateGlobalEditMenuItems chrome://communicator/content/utilityOverlay.js:28
    <anonymous> chrome://global/content/editMenuOverlay.js:66
    focus chrome://messenger/content/search-bar.mjs:178
    handleEvent chrome://messenger/content/search-bar.mjs:165
mailCommon.js:507
An error occurred updating the cmd_delete command: [Exception... "Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIMsgDBView.viewIndexForFirstSelectedMsg]"  nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)"  location: "JS frame :: chrome://messenger/content/mailCommon.js :: canMove :: line 507"  data: no] globalOverlay.js:81:13
NS_ERROR_ILLEGAL_VALUE: Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIMsgFolder.GetMessageHeader]
    restoreSelection chrome://messenger/content/about3Pane.js:5021
    onMessagesLoaded chrome://messenger/content/mailCommon.js:1069
    _applyViewChanges resource:///modules/DBViewWrapper.sys.mjs:1546
    set userTerms resource:///modules/SearchSpec.sys.mjs:310
    updateSearch chrome://messenger/content/quickFilterBar.js:540
    searchTimeoutID chrome://messenger/content/quickFilterBar.js:507
about3Pane.js:5032:17
Summary: Message selection may not be retained when using quickfilter → Message selection may not be retained when using quick filter
Duplicate of this bug: 1949002
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Whiteboard: [fixed by bug 1903910]
Target Milestone: --- → 130 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: