Cwtch UI message errors are broken
- I sent two messages.
- they both failed to post to group/server with
2021/10/26 12:17:25 connections/engine.go [ERR ] failed to post a message to a group after 5 attemptsin the logs
- initially I got two pink errored messages in the ui with the (!) that said they had failed to post
- as new messages came in, they replaced my error messages, my error messages went away and were not visible
- there was a weird message reorder flicker for the 1 or 2 most recent message when mousing over the latest two messages and possibly the space below them where they would pop back in forth in order (could not capture with screen recorder)
currently there is a privatly shared 'Screencast from 2021-10-26 12:26:07 PM.webm' that goes with this issue demonstrating the last stage, private as it contains a contact list not in streamer mode as this was an unexpected, uneasy to reproduce issue
Something similar happened to me back on 2021-10-13. (See screenshot for context) I replied to this new user with "Greetings" not long after Sarah's reply. I shut down Cwtch not too long after that. The next time I opened Cwtch, my reply wasn't there. I began to wonder if I just hadn't hit send - except I'm pretty sure I did - so I second guessed myself and didn't report it. (I didn't see any error messages at the time but I might have missed it when I shut down. Nor did I notice the weird message reorder flicker - perhaps because no new messages came in until the next day?). Sadly, I doubt if I'd be able to pull a log entry for this after this amount of time. If Cwtch created its own log in MacOS it might be possible to find something, but anything that did get logged in the system log would be very tricky to find with my skill level ;)
this is a slightly different but related case. I sent two messages, but tor network was having issues, I lost connection to the server, reconnected, and could post new messages, but those two never errored out and kept getting pushed down the timeline (look at the time stamps in the image)
I did some digging into this yesterday, and came to the following conclusions:
Tor revently completely deprecated v2 onion services over the last week or so the number of services has increased significantly, and throuput and error rates have spiked (see: https://metrics.torproject.org/hidserv-rend-relayed-cells.html)
(1) has meant we've seen more error surfacing in Cwtch than we used to.
(2) Has surfaced a few cwtch-ui specific issues regarding handling of errored state messages e.g. the fall-back behaviour we include to reset message-pane message counts and because we don't "store" errored messages on the library side basically result in those messages getting replaced or collided with.
(3) is exacerbated in dual-pane mode by #200
We put off implementing #11 because up until now the Tor network has been mostly stable. It is probably now time to re-prioritize failed message handling.
I'll take a look into this with @erinn next week to see if we can get a (temp) fix in before 1.4.
Deleting a branch is permanent. It CANNOT be undone. Continue?