6.0.0-git
2019-03-18

[#11362] Mobile view (smart phone): Delete not working
Summary Mobile view (smart phone): Delete not working
Queue IMP
Queue Version Git develop
Type Bug
State Resolved
Priority 1. Low
Owners slusarz (at) horde (dot) org
Requester thomas.jarosch (at) intra2net (dot) com
Created 2012-08-18 (2403 days ago)
Due
Updated 2012-10-15 (2345 days ago)
Assigned 2012-10-10 (2350 days ago)
Resolved 2012-10-15 (2345 days ago)
Milestone
Patch No

History
2012-10-15 20:47:31 Git Commit Comment #30 Reply to this comment
Changes have been made in Git (develop):

commit 895e88d35bb0bacba6df6a36f727cc4cd0bf88de
Author: Michael M Slusarz <slusarz@horde.org>
Date:   Sun Oct 14 23:24:08 2012 -0600

     [mms] Catch deleted flag changes in smartmobile view when not 
using CONDSTORE-enabled IMAP server (Bug #11362).

  imp/js/smartmobile.js |   38 +++++++++++++++++++-------------------
  1 files changed, 19 insertions(+), 19 deletions(-)

http://git.horde.org/horde-git/-/commit/895e88d35bb0bacba6df6a36f727cc4cd0bf88de
2012-10-15 20:47:27 Git Commit Comment #29 Reply to this comment
Changes have been made in Git (develop):

commit 5f02fa9b1948d2c95e654be7e90dc8de17df8360
Author: Michael M Slusarz <slusarz@horde.org>
Date:   Sun Oct 14 23:23:28 2012 -0600

     [mms] Correctly send deleted flag information to browser cache 
when using dynamic/smartmobile view (Bug #11362).

  imp/docs/CHANGES    |    2 ++
  imp/lib/Message.php |    3 +++
  imp/package.xml     |    2 ++
  3 files changed, 7 insertions(+), 0 deletions(-)

http://git.horde.org/horde-git/-/commit/5f02fa9b1948d2c95e654be7e90dc8de17df8360
2012-10-15 20:43:49 Git Commit Comment #28 Reply to this comment
Changes have been made in Git (develop):

commit fb837364f9d130945aa5973579a9f8b8efcaf819
Author: Michael M Slusarz <slusarz@horde.org>
Date:   Mon Oct 8 12:16:06 2012 -0600

     Revert "Set deleted flag after deleting messages (Bug #11362)."

     This reverts commit 0f2825e310ac49283d08a35c2d19d199af5452e5.

     Can't do this, since it does not correctly update the mailbox cache value.

     Regardless, flags should never be set on the browser-side - we need
     confirmation from the IMAP server that it has been set on the server or
     else it is a usability nightmare (flag setting MUST be an atomic
     operation from the POV of the user).

  imp/js/smartmobile.js |    7 +------
  1 files changed, 1 insertions(+), 6 deletions(-)

http://git.horde.org/horde-git/-/commit/fb837364f9d130945aa5973579a9f8b8efcaf819
2012-10-15 20:43:33 Git Commit Comment #27 Reply to this comment
Changes have been made in Git (develop):

commit 0f2825e310ac49283d08a35c2d19d199af5452e5
Author: Jan Schneider <jan@horde.org>
Date:   Mon Oct 8 18:13:01 2012 +0200

     Set deleted flag after deleting messages (Bug #11362).

  imp/js/smartmobile.js |    7 ++++++-
  1 files changed, 6 insertions(+), 1 deletions(-)

http://git.horde.org/horde-git/-/commit/0f2825e310ac49283d08a35c2d19d199af5452e5
2012-10-15 09:25:21 Thomas Jarosch Comment #26 Reply to this comment

[Show Quoted Text - 11 lines]
Thanks, this fix just made my day.

2012-10-15 05:26:36 Michael Slusarz Comment #25
State ⇒ Resolved
Reply to this comment
Turns out that we were not sending updated flag information at all via 
AJAX tasks when doing a delete (without Trash).  So that was fixed.

With that fixed, and similar to the way we handle folder updates, we 
will assume that any flag change sent by the server in an AJAX 
'imp:flag' task is a valid reason to refresh the mailbox view.  This 
will fix the delete flagging.

Without CONDSTORE we are still unable to catch delete flag changes 
made by other clients, but that is a known limitation.
2012-10-15 05:24:31 Git Commit Comment #24 Reply to this comment
Changes have been made in Git (master):

commit 895e88d35bb0bacba6df6a36f727cc4cd0bf88de
Author: Michael M Slusarz <slusarz@horde.org>
Date:   Sun Oct 14 23:24:08 2012 -0600

     [mms] Catch deleted flag changes in smartmobile view when not 
using CONDSTORE-enabled IMAP server (Bug #11362).

  imp/js/smartmobile.js |   38 +++++++++++++++++++-------------------
  1 files changed, 19 insertions(+), 19 deletions(-)

http://git.horde.org/horde-git/-/commit/895e88d35bb0bacba6df6a36f727cc4cd0bf88de
2012-10-15 05:24:26 Git Commit Comment #23 Reply to this comment
Changes have been made in Git (master):

commit 5f02fa9b1948d2c95e654be7e90dc8de17df8360
Author: Michael M Slusarz <slusarz@horde.org>
Date:   Sun Oct 14 23:23:28 2012 -0600

     [mms] Correctly send deleted flag information to browser cache 
when using dynamic/smartmobile view (Bug #11362).

  imp/docs/CHANGES    |    2 ++
  imp/lib/Message.php |    3 +++
  imp/package.xml     |    2 ++
  3 files changed, 7 insertions(+), 0 deletions(-)

http://git.horde.org/horde-git/-/commit/5f02fa9b1948d2c95e654be7e90dc8de17df8360
2012-10-13 16:15:05 Thomas Jarosch Comment #22 Reply to this comment
So why doesn't a click on the "Refresh" button force a full refresh
including the proper delete state?
Refresh does not mean "rebuild" the list.  Refresh means "poll": 
show any new messages/remove deleted messages since the last mailbox 
poll.  We send the current cached state of the mailbox to the 
server, and the server only returns data if that cached state has 
changed.
So for my "problematic" case this means the server side also thinks 
the message is not deleted.

May be I'm thinking here in too simple terms: When mark a message as 
\Deleted on the server, can't we just mark it as deleted on the client 
if we get a positive response from the IMAP server?
There must be a way to refresh this specific message only.

Besides that, I gave the smartphone view a good torture testing
for the final beta and everything else seems to work :)

Thomas

2012-10-12 17:50:57 Michael Slusarz Comment #21 Reply to this comment
So why doesn't a click on the "Refresh" button force a full refresh
including the proper delete state?
Refresh does not mean "rebuild" the list.  Refresh means "poll": show 
any new messages/remove deleted messages since the last mailbox poll.   
We send the current cached state of the mailbox to the server, and the 
server only returns data if that cached state has changed.
2012-10-12 14:01:26 Thomas Jarosch Comment #20 Reply to this comment
This is going to be a PITA to workaround.  I really don't want to 
force mailbox refreshes every time the mailbox is viewed, because 
that is a potential resource usage issue.  And the availability of 
CONDSTORE/QRESYNC is supposed to be transparent within the Imap 
object, so we should not be sending flags to the server to change 
refresh behavior on this basis.
So why doesn't a click on the "Refresh" button force a full refresh
including the proper delete state?

2012-10-10 19:24:26 Michael Slusarz Comment #19 Reply to this comment
Nope - still works perfectly here.  Although just thought of 
something... yes, that's the problem.  Your IMAP server does not 
support CONDSTORE/QRESYNC.

As indicated in docs/PERFORMANCE, we can't accurately determine that a 
mailbox's flags have changed on the server side without these 
extensions (i.e. we need the MODSEQ value).

This is going to be a PITA to workaround.  I really don't want to 
force mailbox refreshes every time the mailbox is viewed, because that 
is a potential resource usage issue.  And the availability of 
CONDSTORE/QRESYNC is supposed to be transparent within the Imap 
object, so we should not be sending flags to the server to change 
refresh behavior on this basis.
2012-10-10 08:26:53 Thomas Jarosch State ⇒ Assigned
 
2012-10-10 08:26:28 Thomas Jarosch Comment #18 Reply to this comment
Maybe this fixes for you?  (It was written to address another issue, 
but I am running out of ideas).
Sorry, didn't help.

May be it happens because I use a small test account with only a few messages?

I've recorded a short demo of the problem:
http://forum.intra2net.com/h5_smartphone_delete_problem.ogv

The link will be up for a few days only. Also you need to save the 
file, the webserver doesn't seem to send the proper mime type for .ogv.

Hope it helps.

Thomas

2012-10-09 17:37:17 Michael Slusarz Comment #17
State ⇒ Feedback
Reply to this comment
Maybe this fixes for you?  (It was written to address another issue, 
but I am running out of ideas).

commit e81a3717583e7c7ad3912a9679d3e4420781a1af
Author: Michael M Slusarz <slusarz@horde.org>
Date:   Tue Oct 9 10:07:18 2012 -0600

     Fix updating rowlist when deleting a message.

     Since smartmobile view currently only stores one page worth of rowlist
     information, we need to update this information anytime a message is
     deleted to ensure that current rowlist is correct (and page buffer is
     full).

  imp/js/smartmobile.js        |   24 ++++++++++++++----------
  imp/lib/Ajax/Application.php |   13 ++++++++++---
  2 files changed, 24 insertions(+), 13 deletions(-)

http://git.horde.org/horde-git/-/commit/e81a3717583e7c7ad3912a9679d3e4420781a1af
2012-10-08 18:20:03 Git Commit Comment #16 Reply to this comment
Changes have been made in Git (master):

commit fb837364f9d130945aa5973579a9f8b8efcaf819
Author: Michael M Slusarz <slusarz@horde.org>
Date:   Mon Oct 8 12:16:06 2012 -0600

     Revert "Set deleted flag after deleting messages (Bug #11362)."

     This reverts commit 0f2825e310ac49283d08a35c2d19d199af5452e5.

     Can't do this, since it does not correctly update the mailbox cache value.

     Regardless, flags should never be set on the browser-side - we need
     confirmation from the IMAP server that it has been set on the server or
     else it is a usability nightmare (flag setting MUST be an atomic
     operation from the POV of the user).

  imp/js/smartmobile.js |    7 +------
  1 files changed, 1 insertions(+), 6 deletions(-)

http://git.horde.org/horde-git/-/commit/fb837364f9d130945aa5973579a9f8b8efcaf819
2012-10-08 16:13:43 Jan Schneider Comment #15
State ⇒ Assigned
Reply to this comment
Flags are updated now in ImpMobile cache, but for some reason those 
aren't picked up when going back to the mailbox.
2012-10-08 16:13:30 Git Commit Comment #14 Reply to this comment
Changes have been made in Git (master):

commit 0f2825e310ac49283d08a35c2d19d199af5452e5
Author: Jan Schneider <jan@horde.org>
Date:   Mon Oct 8 18:13:01 2012 +0200

     Set deleted flag after deleting messages (Bug #11362).

  imp/js/smartmobile.js |    7 ++++++-
  1 files changed, 6 insertions(+), 1 deletions(-)

http://git.horde.org/horde-git/-/commit/0f2825e310ac49283d08a35c2d19d199af5452e5
2012-10-04 10:41:13 Thomas Jarosch Comment #13 Reply to this comment
Need a way to reliably reproduce or else the ticket will be closed.
Happens all the time for me :(

Here's what I do in detail:
- Click on a message in the INBOX to open it
- Press the "Delete" button. I get redirected to the INBOX folder again
- Message shows up normal, no strike-through.

No matter how often I press the "Refresh" on the lower button bar 
button, the message is still shown normal.

Then I press the "Search" button and search for this exact message.
In the search results it turns up as deleted (marked strike-through).
When I go back to the INBOX folder, it's shown normal again.

I'm testing with Firefox 15.0.1 in Linux / Fedora 17.
To make sure it's not some kind of funny Firefox+JQM business, I've 
also tested with Opera on Linux. -> Same result.

Caching problem? Is there some kind of cache I could inspect/dump?

2012-10-02 00:28:09 Michael Slusarz Comment #12
State ⇒ Feedback
Reply to this comment
Need a way to reliably reproduce or else the ticket will be closed.
2012-09-14 10:31:33 Thomas Jarosch Comment #11 Reply to this comment
-> It looks like some caching issue to me.
Are you sure it wasn't a stale browser cache? This feature required 
changes in CSS files.
It's shown correctly after logout + re-login. So I think the CSS files 
are current.
For a different test I resetted my complete browser (rm -rf .mozilla), 
so there should be no client side caching.

Does it work for you?

2012-09-14 10:08:08 Jan Schneider Comment #10 Reply to this comment
-> It looks like some caching issue to me.
Are you sure it wasn't a stale browser cache? This feature required 
changes in CSS files.
2012-09-14 08:35:50 Thomas Jarosch Comment #9
State ⇒ Assigned
Reply to this comment
Hmm, this doesn't seem to work correctly for me:

When I delete a message, the message is flagged as deleted on the server.
The smartphone view doesn't show it as deleted though.

When I log out and re-enter the smartphone view, it is correctly shown 
as deleted (strike through).

-> It looks like some caching issue to me.

2012-08-29 12:49:19 Git Commit Comment #8 Reply to this comment
Changes have been made in Git (master):

commit f0fde33f87b3bc55838c647c8b62698b1f9a6582
Author: Michael M Slusarz <slusarz@horde.org>
Date:   Fri Aug 24 22:56:03 2012 -0600

     [mms] Indicate deleted messages with strikethrough in smartmobile 
mailbox listing (Request #11362).

  imp/docs/CHANGES                              |    2 ++
  imp/js/smartmobile.js                         |    4 ++++
  imp/package.xml                               |    2 ++
  imp/templates/smartmobile/javascript_defs.php |    1 +
  imp/themes/default/smartmobile/screen.css     |    4 ++++
  5 files changed, 13 insertions(+), 0 deletions(-)

http://git.horde.org/horde-git/-/commit/f0fde33f87b3bc55838c647c8b62698b1f9a6582
2012-08-25 05:09:47 Michael Slusarz Assigned to Michael Slusarz
State ⇒ Resolved
 
2012-08-25 05:09:33 Git Commit Comment #7 Reply to this comment
Changes have been made in Git (develop):

commit f0fde33f87b3bc55838c647c8b62698b1f9a6582
Author: Michael M Slusarz <slusarz@horde.org>
Date:   Fri Aug 24 22:56:03 2012 -0600

     [mms] Indicate deleted messages with strikethrough in smartmobile 
mailbox listing (Request #11362).

  imp/docs/CHANGES                              |    2 ++
  imp/js/smartmobile.js                         |    4 ++++
  imp/package.xml                               |    2 ++
  imp/templates/smartmobile/javascript_defs.php |    1 +
  imp/themes/default/smartmobile/screen.css     |    4 ++++
  5 files changed, 13 insertions(+), 0 deletions(-)

http://git.horde.org/horde-git/-/commit/f0fde33f87b3bc55838c647c8b62698b1f9a6582
2012-08-24 16:37:38 Jan Schneider Comment #6 Reply to this comment
Would it be possible to strike them through like in the traditional view?
Yes, we should do that.
2012-08-24 15:37:42 Thomas Jarosch Comment #5 Reply to this comment

[Show Quoted Text - 11 lines]
Would it be possible to strike them through like in the traditional view?

For non-techy users without the trash mailbox this will look like a 
malfunction
since there is no way to tell the deleted worked at all. Even 
surprised me and I'm techy :)

2012-08-23 21:51:47 Michael Slusarz Comment #4 Reply to this comment

[Show Quoted Text - 42 lines]
No.  Messages in the smartmobile mode are not distinguished by any 
flag except for seen/unseen.  So deleted messages, if trash mailbox is 
not used, will continue to remain in the INBOX.

And these messages *shouldn't* be hidden since this is not the default 
behavior in the other views.  We are not going to add a 'hide deleted' 
option in smartmobile either since that interface needs to be as 
simple as possible.
2012-08-22 14:28:08 Thomas Jarosch Comment #3 Reply to this comment
I just noticed the "Delete" button is not working in the smartphone
view: It jumps back to the overview but the message stays in the
folder. "Copy" and "Move" work fine.
Works for me.  There can be a delay if the response from the server 
is slow (or no update if the response from the server is either 
never received or is broken), so not sure if this is what you have 
run into.
To me it looks like it doesn't handle the \Delete flag on parse. 
Here's a tcpdump of a message delete + a refresh of the INBOX.

*** Delete command ***
3 UID FETCH 10 (ENVELOPE)
* 1 FETCH (UID 10 ENVELOPE ("Mon, 30 Jul 2012 09:02:50 +0200 (CEST)" 
"Postmaster Warning: Delayed Mail" (("Mail Delivery System" NIL 
"MAILER-DAEMON" "intranator.net.lan")) (("Mail Delivery System" NIL 
"MAILER-DAEMON" "intranator.net.lan")) (("Mail Delivery System" NIL 
"MAILER-DAEMON" "intranator.net.lan")) ((NIL NIL "postmaster" 
"intranator.net.lan")) NIL NIL NIL 
"<20120730070250.9DB4A17769@intranator.net.lan>"))
3 OK Completed (0.000 sec)
4 UID STORE 10 +FLAGS.SILENT \deleted
4 OK Completed

*** Refresh of INBOX (logout + login) ***
...
5 UID FETCH 28,26,18,17,16,15,14,13,12,11,10,27 (ENVELOPE FLAGS 
RFC822.SIZE BODY.PEEK[HEADER.FIELDS (IMPORTANCE LIST-POST X-PRIORITY)])
...
* 10 FETCH (FLAGS (\Deleted \Seen) UID 26 RFC822.SIZE 1305 ENVELOPE 
("Sat, 18 Aug 2012 18:23:27 +0200" "" (("Thomas Jarosch" NIL 
"thomas.jarosch" "intra2net.com")) (("Thomas Jarosch" NIL 
"thomas.jarosch" "intra2net.com")) (("Thomas Jarosch" NIL 
"thomas.jarosch" "intra2net.com")) ((NIL NIL "admin" 
"intranator.net.lan")) NIL NIL NIL 
"<20120818182327.Horde.VnBhMQhKP71QL8F-w5gRAFA@intranator.net.lan>") 
BODY[HEADER.FIELDS (IMPORTANCE LIST-POST X-PRIORITY)] {2}


Should it mark deleted messages in a special way?
I would expect them to be hidden since there is no way to expunge them, too.


Enabling/disabling session cookies doesn't make a difference,
just to be on the safe side this time.

[Show Quoted Text - 11 lines]
Oh well, I was talking about the "< Back" button of the smartphone
which is the back button of the jquery UI. So this is working as expected.

Thomas

2012-08-20 20:08:20 Michael Slusarz Comment #2
State ⇒ Feedback
Reply to this comment
I just noticed the "Delete" button is not working in the smartphone 
view: It jumps back to the overview but the message stays in the 
folder. "Copy" and "Move" work fine.
Works for me.  There can be a delay if the response from the server is 
slow (or no update if the response from the server is either never 
received or is broken), so not sure if this is what you have run into.
btw: Something different: When you reply / forward / "edit as new" a 
message and hit the back button and then go to "New message", it 
will show the previous content of the last action. I think this is 
nice behavior and I hope it's by design ;)
I would heartily disagree.  If I start a message and hit the back 
button (I assume you mean the *browser* back button, not the jquery ui 
back button), that means I don't care about the contents of that 
message.  I really don't want to have to be clearing fields with 
various finger swipes on a (potentially small) mobile screen when/if I 
create a new message.
2012-08-18 15:57:49 Thomas Jarosch Comment #1
Type ⇒ Bug
State ⇒ Unconfirmed
Priority ⇒ 1. Low
Summary ⇒ Mobile view (smart phone): Delete not working
Queue ⇒ IMP
Milestone ⇒
Patch ⇒ No
Reply to this comment
Hi,

I just noticed the "Delete" button is not working in the smartphone 
view: It jumps back to the overview but the message stays in the 
folder. "Copy" and "Move" work fine.


btw: Something different: When you reply / forward / "edit as new" a 
message and hit the back button and then go to "New message", it will 
show the previous content of the last action. I think this is nice 
behavior and I hope it's by design ;)

Thomas

Saved Queries