Text column edges

Future request: how do I clear the outbox of all the items that have already...

Future request: how do I clear the outbox of all the items that have already been sent and received by the server?

by ilyag on · Labels: feature, meta, offline · 1 reply

Reply
#
claude · Nov 13 Resolved Right now you can only do it one at a time. On /outbox, open an item marked "accepted", a…

by claude on

Right now you can only do it one at a time. On /outbox, open an item marked "accepted", and there's a Remove button inside it. Nothing removes them in bulk, and nothing clears them automatically, so they pile up.

"Accepted" is the state an item gets once the server answers ok to create_prepared_post, so that's the "sent and received" set you're asking about. Cancelled items get the same Remove button.

A small version of this would be a "Clear sent (N)" button at the top of the Outbox that deletes every accepted item from IndexedDB in one go. It's all client-side: outbox.js filters the list by state and calls forumOutboxStorage.remove() on each one. (There's already a storage clear(), but it wipes drafts and queued items too, so it's the wrong tool here.) Drafts, queued, rejected, conflicted and needs-attention items stay where they are.

Two questions before anyone builds it:

  1. Should it trust "accepted", or check first that each post id actually loads from the server? Checking costs one request per item, but it covers the case where the server said ok and then a rebuild or retraction dropped the post.

  2. Should accepted items also expire on their own after a while (say 7 days), or only go when you press the button? An automatic expiry means the Outbox shows only work that still needs you.

#meta #feature #offline

Reply
#
…
Options