Closed Bug 1856266 Opened 7 months ago Closed 6 months ago

Originating message is not selected when opened in conversation, which causes other problems as well.

Categories

(Thunderbird :: Search, defect)

Thunderbird 119
defect

Tracking

(thunderbird_esr115+ fixed, thunderbird120+ fixed)

RESOLVED FIXED
121 Branch
Tracking Status
thunderbird_esr115 + fixed
thunderbird120 + fixed

People

(Reporter: wsmwk, Assigned: welpy-cw)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files)

Attached image Error Console
  1. do global search on something that returns > 1 messages
  2. do show results as list
  3. right click on message and pick open in conversation
  4. ctrl+A to select all (do not expand the collapsed thread)
  5. hit delete
  6. expand the thread - do not click on any messages
  7. do ctrl+a
  8. hit delete
  9. click on one message and do ctrl+a
  10. hit delete - all selected messages are deleted

Actual results

At step 5 nothing is deleted. I would have expected the top message to be deleted
At step 8 nothing is deleted. I would have expected al messages to be deleted

Aureliano, are you able to reproduce this using version 115?

Flags: needinfo?(euryalus.0)

This affects not only the conversation view, but other synthetic views are as well. Try [Ctrl]+[a] right after "Show results as list" in step 2: Error console fills up, right click shows a convoluted context menu.

The reason for all this is that there is no current index set when the view is opened, but gDBView.hdrForFirstSelectedMessage needs it to work in synthetic views, see source.

I suggest the following patch, which also fixes a regression from version 102. When opened in a conversation, the originating message is selected and displayed. In other synthetic views the current index is set without actually selecting anything.

This restores the way it was done in version 102 and before. Also sets the current index of any
other synthetic view to prevent nsMsgSearchDBView::GetHdrForFirstSelectedMessage from failing.

Assignee: nobody → h.w.forms
Status: NEW → ASSIGNED
Duplicate of this bug: 1860746
Summary: "select all" and do message deletion from search results fails → Originating message is not selected when opened in conversation, which causes other problems as well.
Duplicate of this bug: 1860773
Duplicate of this bug: 1860815
Target Milestone: --- → 121 Branch

Pushed by brendan@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/4c9fb539ab47
Select the initial message when opened in conversation. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Flags: needinfo?(euryalus.0) → needinfo?(vseerror)

Unfortunately tests are failing (I think) due to this. https://treeherder.mozilla.org/jobs?repo=comm-central&selectedTaskRun=Kn6_1kHpQoCBioE8qxoR_g.0

Running with ./mach test --verify --headless comm/mail/base/test/browser/browser_mailTabsAndWindows.js fails pretty soon for me locally. With the patch backed out it succeeds.

Status: RESOLVED → REOPENED
Resolution: FIXED → ---

Pushed by solange@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/168ff8d9bb14
Select the initial message when opened in conversation. r=mkmelin

Status: REOPENED → RESOLVED
Closed: 6 months ago6 months ago
Resolution: --- → FIXED
Duplicate of this bug: 1861464
Attachment #9359818 - Flags: approval-comm-beta?

I should probably test this.

Comment on attachment 9359818 [details]
Bug 1856266 - Select the initial message when opened in conversation. r=mkmelin

[Triage Comment]
Approved for beta

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

With nightly 11-08 behavior does not match comment 0 because after step 3 the conversation is not collapsed as indicated for step 4**. But at step 5 the delete still fails, if I first collapse it.

Uncaught : Component returned failure code: 0x80550018 [nsIMsgDBView.hdrForFirstSelectedMessage]
folder chrome://messenger/content/mailCommon.js:484
canMove chrome://messenger/content/mailCommon.js:492
isCommandEnabled chrome://messenger/content/mailCommon.js:650
<anonymous> chrome://messenger/content/about3Pane.js:6503
isCommandEnabled chrome://messenger/content/mailCommon.js:438
getEnabledControllerForCommand chrome://messenger/content/globalOverlay.js:49
goDoCommand chrome://messenger/content/globalOverlay.js:96
oncommand chrome://messenger/content/messenger.xhtml:1
mailCommon.js:484
03:40:07.620
An error occurred executing the cmd_delete command: [Exception... "Component returned failure code: 0x80550018 [nsIMsgDBView.hdrForFirstSelectedMessage]" nsresult: "0x80550018 (<unknown>)" location: "JS frame :: chrome://messenger/content/mailCommon.js :: folder :: line 484" data: no]

** Also, On beta 120.0b4 and b5, I'm not able to collapse the thread at all, which is strange and a possible regression.

Flags: needinfo?(vseerror) → needinfo?(h.w.forms)

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

With nightly 11-08 behavior does not match comment 0 because after step 3 the conversation is not collapsed is indicated for step 4**. But at step 5 the delete still fails, if I first collapse it.

That's really strange. I couldn't reproduce this with the latest comm-central build. Had the global indexer already completed its index?

** Also, On beta 120.0b4 and b5, I'm not able to collapse the thread at all, which is strange and a possible regression.

Do you mean that clicking on the v has no effect, or that there is no v in the first place? I have seen the latter sometimes in unified folders lately, but I have no idea what the reason might be ...

Flags: needinfo?(h.w.forms) → needinfo?(vseerror)

(In reply to Hartmut Welpmann [:welpy-cw] from comment #16)

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

With nightly 11-08 behavior does not match comment 0 because after step 3 the conversation is not collapsed is indicated for step 4**. But at step 5 the delete still fails, if I first collapse it.

That's really strange. I couldn't reproduce this with the latest comm-central build. Had the global indexer already completed its index?

They are old messages, so should be fully indexed

** Also, On beta 120.0b4 and b5, I'm not able to collapse the thread at all, which is strange and a possible regression.

Do you mean that clicking on the v has no effect, or that there is no v in the first place? I have seen the latter sometimes in unified folders lately, but I have no idea what the reason might be ...

v is missing, no widget to collapse or expand

Flags: needinfo?(vseerror)

Okay, now I have seen it once, too, but I can't reproduce it reliably. In one case, just collapsing the thread gave these error messages, on another occasion they appeared right after the thread was deleted. Another problem: The message pane never seems to be updated accordingly, so switching back to an empty conversation view produces these error messages as well.

So unfortunately my patch does not cover all problems regarding deletion of messages in a conversation view. As it does solve the problem reported in the (not entirely) duplicates, I would suggest to let this go on and defer solving the deletion intricacies to a later patch.

See Also: → 1864339
See Also: → 1864338
See Also: → 1864352

Comment on attachment 9359818 [details]
Bug 1856266 - Select the initial message when opened in conversation. r=mkmelin

[Approval Request Comment]
User impact if declined: User cannot identify the message they opened the conversation from.
Testing completed (on c-c, etc.): c-c and beta
Risk to taking this patch (and alternatives if risky): Low. The regressions found in testing are not directly caused by this patch.

Attachment #9359818 - Flags: approval-comm-esr115?

Comment on attachment 9359818 [details]
Bug 1856266 - Select the initial message when opened in conversation. r=mkmelin

[Triage Comment]
Approved for esr115

Thanks for the risk assessment

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

Attachment

General

Created:
Updated:
Size: