Back to journal

Keep the message when sending fails

On September 5, I improved the failure path in locdemunca.ro's support chat. Writing a message and successfully sending it are separate steps. When the request fails, the interface needs to explain what happened without making the visitor reconstruct the text they just wrote. The correction focused on that unfinished interaction.

The updated widget retains the draft when a send attempt fails and presents a localized error. Romanian and English visitors receive feedback in the language of the interface. Keeping the text makes recovery practical: the visitor can review it and try again, rather than first deciding whether the application lost it or silently accepted it. An error message alone would not be enough if the original draft had already disappeared.

The send path also guards the pending request. Another activation while the first attempt is still in progress should not start a competing submission of the same interaction. This keeps the visible state tied to the request being handled. It does not turn a pending request into a confirmed delivery, and the interface still needs the result before treating the attempt as complete. The change addresses uncertainty at the point where the visitor is waiting for a response from the application.

The original verification used intercepted local browser requests and regression tests to exercise failure and pending states. The change was merged on September 5. These checks show how the widget responds to controlled outcomes; they are not evidence that a real support message reached its recipient. That boundary keeps the account of the work precise while still identifying a concrete improvement: failed sending no longer needs to take the composed message away with it.

Reflection

A recoverable error preserves the work already done by the person using the page. For support chat, retaining the draft, explaining the failure and keeping one pending attempt are parts of the same small promise.