-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Description
Problem
The admin UI's Gateway Controls section only shows a "Restart Gateway" button with static text. There's no indication of whether the gateway is actually running, starting, or stopped.
This makes it hard to diagnose issues — for example, the sync endpoint returns 500 when the gateway isn't running (#207), but the admin UI gives no visual clue that the gateway is down. You have to check logs to understand what's happening.
After clicking "Restart Gateway", there's also no feedback on whether the restart succeeded. The button shows "Restarting..." briefly during the API call, but the restart is fire-and-forget (waitUntil) so the client never learns the outcome.
Proposal
Add a gateway status indicator and improve the controls:
- New endpoint
GET /api/admin/gateway/statusreturning process state (running/starting/stopped) using the existingfindExistingMoltbotProcess()+ a quick port check - Status badge next to "Gateway Controls" header — green "Running" / yellow "Starting" / red "Stopped"
- Context-aware button — show "Start Gateway" when stopped, "Restart Gateway" when running
- Post-restart polling — after restart, poll status until gateway is ready (or timeout with error)
- Disable "Backup Now" when gateway is stopped, since sync requires the gateway (R2 backup never runs: requires active gateway process, creating chicken-and-egg problem #207)
Related
- R2 backup never runs: requires active gateway process, creating chicken-and-egg problem #207 — R2 backup fails when gateway isn't running (chicken-and-egg)
- Handle 'already in use' error when R2 bucket is already mounted #209 — adds
ensureMoltbotGateway()before sync - fix: add gateway check and diagnostics to sync endpoint #211 — adds gateway check + diagnostics to sync endpoint
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels