What happens
Posting a work-item comment clears the editor before the request resolves, so a failed submit silently loses the typed text.
apps/web/src/components/work-item/CommentEditor.tsx:108-115:
const handleSubmit = () => {
if (isSubmitting) return;
const html = editor.getHTML().trim();
if (html === '<p></p>' || html === '') return;
void onSubmit(html, access); // fire-and-forget
editor.commands.clearContent(); // wipes immediately
setIsEmpty(true);
};
onSubmit isn't awaited, and there's no error handling. If it rejects (offline, 5xx, or the EXTERNAL-comment permission error) the comment is already gone and the user sees nothing.
Repro
- Open a work item, type a comment.
- Kill the network (or trigger a 4xx/5xx).
- Press submit → the editor empties, no error, comment lost.
Fix
await onSubmit(...) in a try/catch; only clearContent() on success and surface the failure — the same way DescriptionEditor.tsx already tracks a save state.
I'll open a PR.
What happens
Posting a work-item comment clears the editor before the request resolves, so a failed submit silently loses the typed text.
apps/web/src/components/work-item/CommentEditor.tsx:108-115:onSubmitisn't awaited, and there's no error handling. If it rejects (offline, 5xx, or the EXTERNAL-comment permission error) the comment is already gone and the user sees nothing.Repro
Fix
await onSubmit(...)in a try/catch; onlyclearContent()on success and surface the failure — the same wayDescriptionEditor.tsxalready tracks a save state.I'll open a PR.