Closed testbird closed 6 years ago
Here my last comment from ...android's issue 22
My proposal for a handy function: 1) IMPORTANT: make messages stickable or pinable first (I don't know the best wording ;-) ). That means that a message can be marked manually and then it is not touched by an automatic garbage collection. This enables the user to keep important messages! I think for that function database has to be extended? 2) introduce an option to set max number of messages in a chat's setting (and show somewhere current number of messages in a chat). 3) trigger the garbage collection whether manually or automatic (with new message in a chat or once per day or even with a button?)
Comments welcome ;-)
for 1. do you mean sth. like "starring" messages in Whatsapp? In fact, the core of Delta Chat already has this functionality :) see: https://deltachat.github.io/api/classmrmailbox__t.html#a8ed1c3bd08cd6515abf6046ebad9cafc
@testbird if you write "delete all older messages up to this one" you mean also delete from server? I think this is important to save online storage. Some providers have strictly limited storage.
Ok. now as I read your first post again it seams my post is unnecessary.
Hi @r10s, yes, as far as I found this is similar to that. Because I don't have whatsapp I thougt about a pin needle icon to indicate that a certain message is fixed. Therefore I used the wording "pinnable".
Just added database vacuum, as it is a prerequisite and was part of https://github.com/deltachat/deltachat-android/issues/22 (closed).
(from #164)
Concerning multi-client, I generally think old chat messages can be assumed to have been downloaded, and if several clients try to delete some old messages from the server, even different ones (until a threshhold is reached) there should not be a problem. After they are deleted, all clients will sync to the same state again (server state taking precedenc
Concerning the concurreny to classic emails, autodeleting chat messages allows icoming classic email to cause chat message deletes until only classic email fills the mailbox, and blocks all incoming messages.
But it makes sense for Email-chat to operate in a cautious mode that by default avoids blocking classic email communication:
Because of the more transient nature of chat messages, and bacause chat clients are more likely to listen to IMAP-push (part of the spec), and to download/archive before deleting, I think an autodeletion threshold for old chat messages on the server by default is ok. (Deltachat deleting classic email would not be ok. That needs to be handled by a resposible user or MUA.)
core function to "archive all (non-sticky) older messages up to this one"
UI option to "delete/archive old (non-sticky) messages up to this one" in active chats
UI feature to auto-archive older messages from chats (default those exceeding a 100 messages count?)
this won't work this way as "archiving" is an action taking place on chats, not on messages.
in general, imo, "archiving" won't help on the initial issue "avoid overgrowing amounts of old messages using all device "disk"-space".
Hm, is see, the current archiving is just an "inactived" property or flag on chats. That means auto-deleting would lead to incomplete "chat archives", that can only hold the last messages and never more than the limit.
I'm trying to avoid such unpleasant surprises by looking at the whole picture before looking on single problems (like auto-deleting messages).
I assumed "archived" was already a property of messages, because that allows consistent actions based on that distinction.
Sure archiving won't help with deleting (cutting down own storage space), but both might be designed to allow them to work nicely together.
That means auto-deleting would lead to incomplete "chat archives", that can only hold the last messages and never more than the limit.
sure, when the space on the device is limited, sooner or later this will lead to incomplete chats. this, however, has nothing to do with "archived chats" that are only a flag that remove them from the main chat list (as in whatsapp, signal etc.)
by looking at the whole picture before looking on single problems (like auto-deleting messages).
this is always useful :) however, in practice, with limited resources and limited skills, we have to work with "what we have" what we can realistically achieve :)
i think the intent of this issue is described in #244 so we can close this one.
Björn, I suspect you already know that wrong paths can easy get one lost in a mess, especially concerning basic things. "What we have" includes evaluations, analysis, and proposals made. Limited resources means of course limited pace, that is absolutely ok, but I truly think a too a high pace in dismissing and closeing issuess, isn't really solving anything, rather the contrary. If you need, take a time off, to get back in a state that allows detecting and considerating crucial things.
The intent of this issue isn't just #244 (fixed: history <-> local deletes), but working on a concept for all the related things to form a consistent solution, that may be implemented in small steps (finally reordering checkmarks above, you have write access).
Concerning a practical implementation sequence, it may not be necessary to enhance the "archived chats" implementation at first, but why not stay on top of things by developing or having a collaborative concept.
Moved these points to the top, does the beginning of the concept above match you intention, now?:
i won't got for an auto-archive. and i would see #244 independent of archived or not. in fact, the "archived" state typically used on messengers is a very unstable state - one message coming in and it has a different state. i do not think the user should worry about this. generally, for now, i see just very few options, and they are covered by #244
The local-only deletes of #244 won't help with server space limitations, and neither work for multi-client nor for a consistent, user understandable view of "incoming email" in the server's INBOX.
Auto-archive isn't a must at all, it could be left out in the list above. Local archives would just be a useful split to limit the space used on servers, that even works with multiple chatclients.
Mind you though, that it makes no sense for me evaluating, checking and optimizing different options for a project, if the results are just thrown away.
There are reasons behind the concept, that might not be obvious on the first view. Therefore please post your doubts or ask, before closing prematurely.
(For example, deleting "archived messages" from the server can work for multi-clients on a "if still exists" basis, since the messages should all be in all the local databases already.
EDIT: It can work in the same way without "archived messages", but implementing local archives won't hardly work with IMAP using a per chat property.)
well, the discussion can be continued anyway :) or, even better, for a high-level discussion with the wider community, being continued in the new forum (which, of course, was just not there in the past)
That would not follow any due diligence. I updated the first post, separating the auto-delete feature, anyway, before I forget about this.
Hint: Instead of fighting against an overwhelming amount of issues, you may make this one, that was consolidated from many issues, your own, and cover a lot of other issues. The plan may still be adjusted over time, if more aspects come in.
i personally prefer to have smaller issues (of course, more then)
Well, the individual issues to work on in a meta-issue like this one are as small as the checkmarks above.
See how github says "1 out of 19 are done"?: https://github.com/deltachat/deltachat-core/issues?utf8=%E2%9C%93&q=is%3Aissue+consolidated+is%3Aclosed+
EDIT: And I'd doubt we would be happier splitting it all up into separate issues.
i know the display "x of y" and i also use these lists sometiems.
but the 19 points here are more 19 points, to discuss. eg. it's not clear if an option as UI option to "archive old (non-sticky) messages up to this one" in active chats will ever exist. same for other points in this "todo"-list.
this can be done here (although i would suggest the forum), but, however, this is not an open issue in the meaning "there is sth. to do on the code" or "sth. is not working" and so on.
but we should definitely make this more clear in the readme and point to the forum for high-level-discussions :)
And, any better idea for a single option that allows bulk managing the chat history length? This is the best plan currently.
Even if you choose to throw my work away, and not to reopen the consolidated overview: Please properly limit #244 to chat messages that need also be deleted on the server by default, and allow the incoming emails (former "contact requests") be reduced by classic MUAs that clean up the INBOX. (Then one would only miss the "delete all old messages up to this one" to clean up the incoming emails from within deltachat in the rare case of deltachat using a separate account, but individual email deletion is possible).
yes, #244 is very basic, of course.
and: closing issues does not throw work away, eg. it is linked from other, open issues and, of course, they may have influenced them :)
Please properly limit #244 to chat messages that need also be deleted on the server by default
see comment at https://github.com/deltachat/deltachat-core/issues/244#issuecomment-416221265
It's that closing consolidated issues and implementing and closing "limited basic issues" that have been reviewed as not solving all the known problems, disregards the work gone into devising and documenting these things.
And it further guarantees that users will create new issues, without having a relevant open issue available to point to, that provides some status (checkmarks) and overview and plan to work with.
closing an issue does not disregards the work gone into it imo. it stays available, searchable, visible, and is linked from other issues. also it can be reopened, as needed. it's not deleted or so.
make "archived" a property of messages instead of chats (so messages can be moved into archives).
let the "archive chat" UI option add the property to the contained messages. Further incoming messages then simply open in an empty chat view again.
the "archive" function then would be different from the archive function that we have today and different form the one people know from other messenger. not sure if this makes sense.
Because old, "archived" messages would stay archived, and not just temporarily disabled or hidden, i.e. not popping up again completely with new messages arriving, I think it does something understandable that makes sense. No problem. It's perfect if the active chat length is configurable per chat, and if it is easy to extend the view to (load) the archived messages (could be default for searching/filtering). The active and archived chat lenght form intuitive ways to control the storage usage on the devices and server (smallest active chat length is kept on server).
I've had an idea for a very slim way to implement the basic storage limits to ensure continuous daily usage. The idea is to start only with the smallest changes but which are fully compatible for auto-archive and -delete and thus are future proof, without requiring any front-end support.
The existing message property that holds the "stared" value might be extended to also allow setting it to the "synced-new" and "synced" value. (complete list of values: https://github.com/deltachat/deltachat-core/issues/164#issuecomment-417868402)
The -core may then just
(The default number of most recent messages is low (e.g. 3) to work without any configuration UI and to ensures that the auto-delete can delete almost all messages, if really required, but would never delete complete chats or histories.)
This basic storage limit enforcement would then be compatible and scale to all implementation stages of this issue. And it should work regardless whether the front-ends already implements UI support for any selection of the features, or not (stared/archived messages, configuring auto-archive/delete).
For example, same storage-limit auto-delete code should work no matter if users are able to delete recent messages from all synced devices, or if a proper archiving feature deletes archived messages from the server. The limits can always be ensured by the same basic code. Multi-client should also work well, if the code doesn't error out if another client already deleted the message on the server, and it won't delete too much because the most recent messages of each chat are protected.
Even the legacy way of completely suspending and resuming "archived chats" (hidden/inactive) from the primary chat list could continue to work as is, until it is improved to support the individual "archived" state of messages.
also updated the above to use "synced-new" and "synced"-history now
To avoid overgrowing amounts of old messages using all device "disk"-space, there should be ways to limit the retained history on the server and locally.
(The underlying functions also need to work when checking and hard-limiting storage usage on server and device, and work for multi-client usage.)
EDIT: For the minimal, forward compatible implementation see https://github.com/deltachat/deltachat-core/issues/120#issuecomment-417267057
Some reasoning to arrive at a consistent solution:
Auto-delete chat messages by default from the servers's chat folder, to maintain free space and to provide multi-client consistency. There's otherwise no easy consistent way to distinguish when the user manually deletes messages to prevent filling up the server and the user only cleaning up the chat view (which needs to be synced with other clients).
Keeping message archives on the local devices allows for independent use of different storage sizes on the devices.
No auto-delete of emails from the servers' INBOX by default, as that folder is considered to be in the authority of classic MUAs.
Never auto-delete emails from the local "incoming emails" view (old "contact requests"), to provide a view that is consistent with other MUAs INBOX view. (Manual deletion of junk messages (locally and on server), and removing messages that got deleted on the server is ok.)
Restriction: Have a local-only INBOX display limit, e.g. for users that may not even have any subfolders but large (multi GB) INBOXes and never manually delete or clean up their email INBOX. The long list of incoming emails may not bother the user, but can be too much for the mobile data or the device's storage space. So an "show only the last 100 emails, and the next 100 only upon request" (and locally purging any further messages) could make sense as a measure against message overflow, but it could interfere with email compatibility and any later showing of subfolders in the incoming emails (contact requests).
Client-Server precedence
If a chat message gets deleted on the server, the clients locally deletes active chat messages, but keeps the message if it has the "archived" state (only local archive purging rules apply).
If a chat message is deleted on a client and there is no "archived" message property implemented, the user would need to be able (and have to manually decide, with an annoying question) whether to only delete locally or also on the server (to not have to remove it again from all other clients).
With the "archived" flag available but not set, deletions of messages can by default always also be carried out on on the server (if still there). When a message gets archived, it can also be deleted from the server by default, and only kept locally. These defaults limit the used server space by the device with the smallest active chat length setting. Some clients, e.g. a desktop client, may optionally archive all messages right away (set to: active chat lengh zero) and let other the clients limit the server space (set to: not deleting archived message from server). This desktop is then effectively only working with archives, and ensures that there is always a local copy kept on the desktop.
Prerequisite Conclusions
ToDo things:
-> for an updated list of needed message states see: https://github.com/deltachat/deltachat-core/issues/164#issuecomment-417841129
Chat message selection
Deletion management
message archiving (not to be confused with the legacy "archived (or rather hidden/inactive/backgrounded) chats" feature)
Storage Restrictions
DB size < free space
to ensure success.Non-chat emails ("contact requests")
Implementing the above solves at least the following issues: