Records Feature record

FDR-035

Slow Mode

Active Last reviewed 2026-10-15 Source file

Overview

Slow Mode limits how frequently one member can create messages in a channel room. Room managers choose a visible interval from Off through six hours. The server remains authoritative while every active client receives both room configuration changes and the current viewer's next eligible posting time.

Behavior

  • Slow Mode is configured per channel room. 0 disables it; valid values are 0–21,600 seconds. The bundled client offers Off, 5s, 10s, 15s, 30s, 1m, 2m, 5m, 10m, 15m, 30m, 1h, 2h, and 6h presets.
  • Channel Slow Mode limits root messages per member. Thread Slow Mode limits each member separately in each thread. Both intervals are channel settings.
  • A root message starts both timers for its author. A reply checks and resets only that member's timer in that thread. Other threads remain independent. Attachment-only messages follow the same rule as messages with text.
  • Both intervals start at Off in new channels. Existing channels use their previous interval for both independent timers. A later change to one setting preserves the other. Thread settings apply to existing and new threads.
  • A channel echo is a projection of its original thread reply and does not check or start the channel timer. Thus, channel Slow Mode limits new roots, not all messages visible in the channel. Operators can deny message.echo in restricted rooms to prevent replies from bypassing that visibility limit.
  • Editing, deleting, reacting, typing, and staging attachments neither start nor reset the timer. Drafting and editing remain available while posting is blocked.
  • Members with effective room.manage or message.manage permission bypass enforcement and do not see a Slow Mode badge.
  • An hourglass badge sits on the top edge of the composer at the inline end, after the typing badge. It shows the remaining cooldown only while Slow Mode blocks posting. It disappears when the cooldown ends or Slow Mode is off. Hover, keyboard focus, or a tap shows the full explanation. Both badges share one row without moving messages; typing text truncates first in narrow panes.
  • The Room information panel always shows the current Slow Mode interval, or Off. When the server has a separate thread timer, the panel shows the channel and thread intervals in two rows.
  • Enabling, increasing, decreasing, or disabling Slow Mode immediately recalculates eligibility from the member's latest successful original post, including posts made while Slow Mode was disabled or while the member was exempt. Losing a bypass permission therefore applies the latest post.
  • Posting becomes legal at the exact boundary now >= latest_post_at + slow_mode_seconds.
  • A rejected post preserves its draft. New clients show the authoritative countdown; older clients receive server enforcement and their existing generic send failure.
  • An attempted send during an active cooldown briefly highlights and nudges the countdown badge. Reduced motion uses only the highlight. The draft stays intact and focus returns to the editor. Held send keys do not repeat feedback.

Design Decisions

1. Store configuration as a room fact

Decision: RoomSlowModeChangedEvent carries both intervals and the room catalog projects it into authoritative room state. Why: Slow Mode is durable room configuration, so replay, audit, and realtime delivery should use the same event-sourced path as other room settings. Tradeoff: Mixed-version clusters must finish upgrading every replica before operators rely on independent timers. Older servers enforce a shared timer. Rollback restores that older behavior; a settings write by an older server can also replace the independent thread setting. Stored events are not rewritten.

2. Derive cooldowns from successful posts

Decision: Cooldowns use the last successful root post in the channel and the last successful post in each thread, including its root. Restore retains both histories, also after message deletion. The room projection indexes the latest root per author. Thread cooldown reads scan existing thread rows backward and use retained message creation facts; they do not keep a second per-thread index. Response hydration shares room configuration, exemption checks, and thread deadlines within each response. Why: The latest successful message is already the durable source of truth. Derivation gives configuration changes immediate historical semantics without creating per-user timer records or cleanup work. Tradeoff: The timeline snapshot contract changes when index restore semantics change, even though the serialized payload does not add an index. Thread reads can scan the thread's reply history when the author has no recent eligible reply. They do not scan other threads or allocate detached message rows.

3. Enforce during preflight and commit authorization

Decision: Message posting checks Slow Mode before work begins and again in the room-wide OCC commit callback. Why: Preflight gives quick feedback; the commit check and full-room fence ensure concurrent posts on separate replicas cannot both succeed. Tradeoff: Slow Mode shares the room aggregate contention boundary used by message posting rather than adding a narrower author-specific write lane.

4. Keep edits outside the timer

Decision: Slow Mode applies only to new message creation. Why: Its purpose is pacing conversation volume, not preventing correction or moderation. Blocking edits would encourage leaving mistakes visible and would make moderation less responsive. Tradeoff: A member may continue revising the latest message during the cooldown.

5. Reuse room realtime events

Decision: Configuration changes and message posts use the normal semantic room and message events. Their authorized public data includes the current next-post time when it changes. Why: Existing room and message events provide ordered multi-session convergence and bounded reconnect resume. No Slow-Mode-specific realtime event is needed. Tradeoff: A room configuration change refreshes room settings and open thread deadlines. Older clients can display an inaccurate thread countdown.

6. Keep the API additive

Decision: Keep the existing interval for root posts and add an optional thread interval. New servers return both values, including explicit Off. Why: Clients can detect older servers by the absent thread interval and keep the existing shared-timer interface without a higher connection floor. The feature compatibility list requires beta.18 for full support and reports the shared-timer limitation on older servers. The connection floor stays at beta.9; field presence continues to select the runtime behavior. Tradeoff: Wire compatibility does not preserve the old shared-timer behavior. Users of older clients must update to see independent countdowns.

Open Questions

  • Whether future moderation tools should expose the most recent post time or remaining cooldown for another member. The current API exposes only the authenticated viewer's deadline.
Esc