From e4273ffd945f16d6f74e9c64431808ea36148880 Mon Sep 17 00:00:00 2001 From: Owen Jacobson Date: Tue, 6 May 2025 01:07:54 -0400 Subject: Render "ghost" messages for unsent messages. There is a subtle race conditon in this code, which is likely not fixable without a protocol change: * Ghost messages can disappear before their "real" message replacement shows up, if the client finishes sending (i.e., receives an HTTP response on the POST) before the server delivers the real message. * Ghost messages can be duplicated briefly, if the client receives the real message before the client finishes sending. Both happen in practice; we make no ordering guarantees between requests. To aviod this, we'd to give clients a way to correlate pending sends with received messages. This would require fundamentally the same capabilities, like per-operation nonces, that preventing duplicate operations will require. --- ui/styles/messages.css | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ui/styles/messages.css') diff --git a/ui/styles/messages.css b/ui/styles/messages.css index 5890c1a..67a9517 100644 --- a/ui/styles/messages.css +++ b/ui/styles/messages.css @@ -39,6 +39,10 @@ position: relative; } +.message.unsent { + color: var(--colour-message-run-unsent-text); +} + .message.delete-armed, .message.delete-armed:hover { background-color: var(--colour-warn); -- cgit v1.2.3