Messages should not be marked as read when opened in a background tab
Categories
(Thunderbird :: Message Reader UI, defect)
Tracking
(thunderbird_esr115 fixed, thunderbird120 affected)
People
(Reporter: darktrojan, Assigned: darktrojan)
References
Details
(Keywords: regression)
Attachments
(2 files)
48 bytes,
text/x-phabricator-request
|
wsmwk
:
approval-comm-esr115+
|
Details | Review |
3.40 KB,
patch
|
darktrojan
:
review+
|
Details | Diff | Splinter Review |
I'm sure there's a recent bug about this, but I cannot find it. Something triggered me to think about this problem anyway.
If a message is opened in a background tab (e.g. with the Open Message in New Tab context menu item) the user can't possibly have read it, because it's not visible, so it shouldn't be marked as read. We should only mark it, or start the timer to mark it, once the user switches to that tab.
As an added wrinkle, on IMAP servers messages can be marked as read as we fetch them for display (if we don't have a local copy). So that needs to be stopped too.
Assignee | ||
Comment 1•11 months ago
|
||
This changes uses the page visibility API to avoid marking messages as read until the tab is
switched to. First I had to mark background browsers as inactive for the API to work.
In order to test the behaviour with an IMAP server, I had to modify the IMAP fakeserver to send
message flags in the response to a FETCH command, as real servers do. Then I discovered the \Seen
flag isn't propagated if it's the only flag, which seems like a real problem that should be fixed.
Depends on D192299
Assignee | ||
Comment 2•11 months ago
|
||
I should point out that we didn't have this problem until we gained the ability to load more than one message in a window at any one time.
Comment 3•11 months ago
|
||
from https://mzl.la/45U0KvC, bug 1858075
Probably should be closed
- Bug 520061 - Opening an email message in a new tab does not mark the message as read with "automatically mark as read" enabled
We also have - Bug 1858075 - Unread message gets marked 'read' when I move message to another folder
- Bug 814665 - timed "mark as read" is not consistently applied to message in standalone window/new window vs tab
Updated•11 months ago
|
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/e17b527b5e89
Don't mark messages in background tabs as read. r=mkmelin
Comment 5•11 months ago
|
||
This is causing some debug failures.
https://treeherder.mozilla.org/jobs?repo=comm-central&selectedTaskRun=auNwqtEuSjKJm3WVTcFPrQ.0
Assertion failure: ((bool)(__builtin_expect(!!(!NS_FAILED_impl(rv)), 1))) && uri (Mutating URI should never fail), at /builds/worker/checkouts/gecko/netwerk/base/nsIOService.cpp:1025
PROCESS-CRASH | MOZ_ASSERT(((bool)(__builtin_expect(!!(!NS_FAILED_impl(rv)), 1))) && uri) (Mutating URI should never fail) [@ mozilla::net::nsIOService::CreateExposableURI] | comm/mail/base/test/browser/browser_markAsRead.js
Comment 6•10 months ago
|
||
This has been backed out: https://hg.mozilla.org/comm-central/rev/cd28124806b25dfea973a476dd8ab306c5ae41f2
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/87df5e837524
Don't mark messages in background tabs as read. r=mkmelin
Comment 9•10 months ago
|
||
Have you tested this with filtes? I use filters to mark spam messages and certain messages in my inbox as read so that I don't get distracted by them. I check these spam folders in set intervals (when I have time for a breather), so it is not a problem for me, if they are marked as read.
Assignee | ||
Updated•10 months ago
|
Assignee | ||
Comment 11•10 months ago
|
||
(In reply to Thilo [:ThiloteE] from comment #9)
Have you tested this with filtes? I use filters to mark spam messages and certain messages in my inbox as read so that I don't get distracted by them. I check these spam folders in set intervals (when I have time for a breather), so it is not a problem for me, if they are marked as read.
This only affects the automatic marking-as-read that happens when a message is displayed. Doing it any other way will work as it did before.
Comment 12•10 months ago
|
||
Comment on attachment 9361762 [details]
Bug 1862822 - Don't mark messages in background tabs as read. r=#thunderbird-reviewers
[Triage Comment]
Approved for esr115
Comment 13•10 months ago
|
||
bugherder uplift |
Thunderbird 115.5.2:
https://hg.mozilla.org/releases/comm-esr115/rev/7cb7a33e1550
Comment 14•10 months ago
|
||
Assignee | ||
Comment 15•10 months ago
|
||
Comment on attachment 9367541 [details] [diff] [review]
comm-esr115.patch
That's what I had in mind. I suggest adding to the comment at the top to say we've ripped out the IMAP bits for ESR115.
I'm having a timing issue further down the patch, so it's still failing. Investigating.
Assignee | ||
Comment 16•10 months ago
|
||
Comment on attachment 9367541 [details] [diff] [review]
comm-esr115.patch
Replace this line with await TestUtils.waitForCondition(() => secondAbout3Pane.gDBView);
and it works a lot better. I'm not sure why, I guess we're missing some change that hasn't happened on ESR115.
Comment 17•10 months ago
|
||
bugherder uplift |
Thunderbird 115.5.2:
https://hg.mozilla.org/releases/comm-esr115/rev/7707c669d07b
Description
•