Skip to content

feat(admin,mobile): admin-controlled maintenance mode for mobile app #336

Description

@Adamskiee

Summary

Add a maintenance-mode control to the admin dashboard that lets an admin remotely put the mobile app into a "maintenance" state (e.g. during a server deploy, DB migration, or incident) and take it back out.

Motivation

There's currently no way to warn active mobile users that the backend is temporarily unavailable/degraded, or to prevent them from attempting actions (sending messages, placing calls, syncing) during planned maintenance windows. Admins can only watch the effects (failed requests, dropped WebSocket connections) after the fact.

Proposed behavior

  • Admin dashboard exposes a toggle (or scheduled window) to enter/exit maintenance mode, scoped either globally or possibly per-feature later.
  • While active, connected mobile clients are notified over the existing WebSocket channel (see docs/architecture/component-map.md/ws/) and switch to a dedicated "under maintenance" screen/banner that blocks or degrades relevant actions (chat send, call placement, sync) with a user-facing message.
  • Clients that reconnect or open cold while maintenance is active should also pick up the state (not just clients connected at toggle time) — likely needs a state check on auth/handshake, not just a broadcast event.
  • Admin should see which mode is currently active and possibly when it was last toggled and by whom.

Open questions / design work needed

  • Global-only vs. per-feature maintenance (e.g. block calls but allow chat)?
  • Should maintenance mode be a manual toggle only, or support a scheduled start/end?
  • Does this need a new DB-backed flag (server restart-safe) or is an in-memory/WS-broadcast flag sufficient given LAN-first, no-migration-tooling constraints (ADR 0002)?
  • Mobile: what does the maintenance UI state look like — full-screen blocker vs. dismissible banner?

Affected components

  • server/ — new endpoint(s) + WebSocket message type to set/query/broadcast maintenance state
  • admin-frontend/sapot-admin/ — new admin control UI
  • mobile-app/sapot-mobile-app/ — handle the new WS message/state, maintenance UI

This is unscheduled, cross-cutting work (server model + admin UI + mobile UI) — needs a design pass (see docs/adr/) before implementation.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    adminadmin-frontend Next.js dashboardenhancementNew feature or requestfuture-enhancementNot scheduled; tracked for later considerationmobilemobile-app Expo/React Native

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions