Skip to content

fix(calendar): show in-flight state on Save, and surface the silent length-guard rejection - #921

Open
texchi2 wants to merge 2 commits into
bulwarkmail:mainfrom
texchi2:fix/calendar-save-in-flight
Open

fix(calendar): show in-flight state on Save, and surface the silent length-guard rejection#921
texchi2 wants to merge 2 commits into
bulwarkmail:mainfrom
texchi2:fix/calendar-save-in-flight

Conversation

@texchi2

@texchi2 texchi2 commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #888 / #887. That PR fixed the crash in the calendar Save path (crypto.randomUUID
on insecure origins); this one fixes the two places where the same dialog gives the user no
feedback at all
, which is what made the crash present as "the Save button is dead".

Both are still reproducible on main today.

1. Save has no in-flight state

handleSave is async, and the button is disabled while isSaving — but nothing on screen
changes. On a slow link (mobile, VPN, a self-hosted server over a tunnel) the button simply stops
responding for the full duration of the request, which reads as a dead button and invites repeat
clicks. disabled prevents the double-submit, so this is a feedback bug rather than a data bug —
but "nothing happened" is the reason users click again.

Fix: {isSaving ? t("form.saving") : t("form.save")}, plus the missing calendar.form.saving
key. (calendar.form had no saving; the saving key that exists elsewhere in common.json is
in a different namespace.)

2. The length guard returns silently

if (trimmedTitle.length > 500 || description.trim().length > 10000 || location.trim().length > 500) return;

A save rejected here produces no toast, no field error, no dialog change — indistinguishable from
case 1. The inputs also enforce these limits via maxLength, so this is a backstop that should
rarely fire; when it does, it should say so. Fix: toast.error(t("notifications.event_error"))
before the return, using the key that already exists.

Notes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant