Schedule Message lets you pick a time beyond 24 h; the server rejects it with a raw technical error #275

Closed
opened 2026-10-04 17:41:31 -04:00 by jared · 1 comment
Owner

What happens
Production Synapse caps delayed events at max_event_delay_duration: 24h. The Schedule Message dialog (src/app/features/room/ScheduleMessageModal.tsx:139-160) only checks "at least 1 minute ahead", so any later date can be picked. The server then rejects it, and the user sees:

The requested delay (172800000ms) exceeds the allowed maximum (86400000ms)

(errcode ORG.MATRIX.MSC4140_DELAY_TOO_LARGE, reproduced against a local Synapse with the same 24 h cap.)

Fix

  • Set max on the date/time inputs to now + 24 h.
  • Validate in handleSubmit with a friendly message ("Messages can be scheduled up to 24 hours ahead").
  • Map ORG.MATRIX.MSC4140_DELAY_TOO_LARGE to the same text in case the server limit changes.

More context

Introduced with scheduling (9273eb5f / 6a919044, 2026-06-04). Production homeserver.yaml has max_event_delay_duration: 24h.

Acceptance criteria:

  • The date input's max is set to now + 24 h.
  • Picking a later time shows "You can schedule up to 24 hours ahead".
  • ORG.MATRIX.MSC4140_DELAY_TOO_LARGE maps to the same text.

Found in the October 2026 client audit (Playwright against a local Synapse + LiveKit stack, plus code reading). Code refs are at cinny 30e2dbcd, cinny-desktop 8f67ec7, element-call 3b0050e8.

**What happens** Production Synapse caps delayed events at `max_event_delay_duration: 24h`. The Schedule Message dialog (src/app/features/room/ScheduleMessageModal.tsx:139-160) only checks "at least 1 minute ahead", so any later date can be picked. The server then rejects it, and the user sees: ``` The requested delay (172800000ms) exceeds the allowed maximum (86400000ms) ``` (errcode `ORG.MATRIX.MSC4140_DELAY_TOO_LARGE`, reproduced against a local Synapse with the same 24 h cap.) **Fix** - Set `max` on the date/time inputs to now + 24 h. - Validate in `handleSubmit` with a friendly message ("Messages can be scheduled up to 24 hours ahead"). - Map `ORG.MATRIX.MSC4140_DELAY_TOO_LARGE` to the same text in case the server limit changes. ### More context **Introduced with** scheduling (9273eb5f / 6a919044, 2026-06-04). Production `homeserver.yaml` has `max_event_delay_duration: 24h`. **Acceptance criteria:** - The date input's `max` is set to now + 24 h. - Picking a later time shows "You can schedule up to 24 hours ahead". - `ORG.MATRIX.MSC4140_DELAY_TOO_LARGE` maps to the same text. --- _Found in the October 2026 client audit (Playwright against a local Synapse + LiveKit stack, plus code reading). Code refs are at cinny `30e2dbcd`, cinny-desktop `8f67ec7`, element-call `3b0050e8`._
jared added the bugpriority: lowarea: messaging labels 2026-10-04 17:41:31 -04:00
Author
Owner

Another raw error from the same dialog (found 2026-10-05). When you schedule while offline, the Schedule Message dialog shows fetch failed: Failed to fetch under the time picker. The composer text is kept, which is good, but the message should say something like "You're offline — the message wasn't scheduled. Try again when you're back online." The same error mapping as for the >24 h case would cover it (network errors → plain sentence).

Another raw error from the same dialog (found 2026-10-05). When you schedule while offline, the Schedule Message dialog shows **`fetch failed: Failed to fetch`** under the time picker. The composer text is kept, which is good, but the message should say something like "You're offline — the message wasn't scheduled. Try again when you're back online." The same error mapping as for the >24 h case would cover it (network errors → plain sentence).
jared closed this issue 2026-10-19 16:28:35 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: LotusGuild/cinny#275